Java 类com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant 实例源码

项目:unitimes    文件:CurriculaTable.java   
public HorizontalAlignmentConstant getColumnAlignment(CurriculumColumn column) {
    switch (column) {
    case SELECT:
        return HasHorizontalAlignment.ALIGN_CENTER;
    case LAST_LIKE:
    case PROJECTION:
    case REQUESTED:
    case ENROLLED:
    case SNAPSHOT_REQUESTED:
    case SNAPSHOT_PROJECTION:
    case REGISTERED:
        return HasHorizontalAlignment.ALIGN_RIGHT;
    default:
        return HasHorizontalAlignment.ALIGN_LEFT;
    }
}
项目:unitime    文件:CurriculaTable.java   
public HorizontalAlignmentConstant getColumnAlignment(CurriculumColumn column) {
    switch (column) {
    case SELECT:
        return HasHorizontalAlignment.ALIGN_CENTER;
    case LAST_LIKE:
    case PROJECTION:
    case REQUESTED:
    case ENROLLED:
    case SNAPSHOT_REQUESTED:
    case SNAPSHOT_PROJECTION:
    case REGISTERED:
        return HasHorizontalAlignment.ALIGN_RIGHT;
    default:
        return HasHorizontalAlignment.ALIGN_LEFT;
    }
}
项目:plugin-datasource    文件:AlignableColumnHeader.java   
private static SafeHtml getSafeHtml(final String text, final HorizontalAlignmentConstant alignment) {
    SafeHtmlBuilder safeBuilder = new SafeHtmlBuilder();
    boolean needCloseTag = false;
    if (HasHorizontalAlignment.ALIGN_RIGHT.equals(alignment)) {
        safeBuilder.appendHtmlConstant("<p style=\"text-align:right;\">");
        needCloseTag = true;
    } else if (HasHorizontalAlignment.ALIGN_CENTER.equals(alignment)) {
        safeBuilder.appendHtmlConstant("<p style=\"text-align:center;\">");
        needCloseTag = true;
    }
    safeBuilder.appendEscaped(text);
    if (needCloseTag) {
        safeBuilder.appendHtmlConstant("</p>");
    }
    return safeBuilder.toSafeHtml();
}
项目:unitimes    文件:SimpleEditPage.java   
@Override
public HorizontalAlignmentConstant getCellAlignment() {
    switch (iField.getType()) {
    case toggle:
        return HasHorizontalAlignment.ALIGN_CENTER;
    case students:
        return HasHorizontalAlignment.ALIGN_RIGHT;
    default:
        return HasHorizontalAlignment.ALIGN_LEFT;
    }
}
项目:unitimes    文件:RoomsTable.java   
protected HorizontalAlignmentConstant getColumnAlignment(RoomsColumn column, int idx) {
    switch (column) {
    case CAPACITY:
    case EXAM_CAPACITY:
    case AREA:
        return HasHorizontalAlignment.ALIGN_RIGHT;
    default:
        return HasHorizontalAlignment.ALIGN_LEFT;
    }
}
项目:unitimes    文件:DataTable.java   
@Override
public HorizontalAlignmentConstant getCellAlignment() {
    if (iHeader == null || iHeader.getAlignment() == null)
        return HasHorizontalAlignment.ALIGN_LEFT;
    switch (iHeader.getAlignment()) {
    case CENTER: return HasHorizontalAlignment.ALIGN_CENTER;
    case LEFT: return HasHorizontalAlignment.ALIGN_LEFT;
    case RIGHT: return HasHorizontalAlignment.ALIGN_RIGHT;
    default: return HasHorizontalAlignment.ALIGN_LEFT;
    }
}
项目:x-cure-chat    文件:SiteTitle.java   
public HorizontalAlignmentConstant getHorizontalAlignment() {
    if( SiteManager.isUserLoggedIn() ) {
        return HasHorizontalAlignment.ALIGN_CENTER;
    } else {
        return HasHorizontalAlignment.ALIGN_LEFT;
    }
}
项目:sc2gears    文件:ClientUtils.java   
/**
 * Sets the horizontal alignment of all cells of the specified table.
 * @param table      table whose cells to be aligned
 * @param hAlignment horizontal alignment to be set
 */
public static void alignTableCells( final HTMLTable table, final HorizontalAlignmentConstant hAlignment ) {
    final CellFormatter cellFormatter = table.getCellFormatter();

    for ( int i = table.getRowCount() - 1; i >= 0; i-- )
        for ( int j = table.getCellCount( i ) - 1; j >= 0; j-- )
            cellFormatter.setHorizontalAlignment( i, j, hAlignment );
}
项目:r01fb    文件:GWTWidgets.java   
/**
 * Sets the horizontal alignment for a widget collection
 * @param align 
 * @param widgets 
 */
public static void setHorizontalAlignment(final HorizontalAlignmentConstant align,final HasHorizontalAlignment... widgets) {
    if (widgets != null && widgets.length > 0) {
        for (HasHorizontalAlignment w : widgets) {
            if (w != null) w.setHorizontalAlignment(align);
        }
    }
}
项目:unitime    文件:SimpleEditPage.java   
@Override
public HorizontalAlignmentConstant getCellAlignment() {
    switch (iField.getType()) {
    case toggle:
        return HasHorizontalAlignment.ALIGN_CENTER;
    case students:
        return HasHorizontalAlignment.ALIGN_RIGHT;
    default:
        return HasHorizontalAlignment.ALIGN_LEFT;
    }
}
项目:unitime    文件:RoomsTable.java   
protected HorizontalAlignmentConstant getColumnAlignment(RoomsColumn column, int idx) {
    switch (column) {
    case CAPACITY:
    case EXAM_CAPACITY:
    case AREA:
        return HasHorizontalAlignment.ALIGN_RIGHT;
    default:
        return HasHorizontalAlignment.ALIGN_LEFT;
    }
}
项目:unitime    文件:DataTable.java   
@Override
public HorizontalAlignmentConstant getCellAlignment() {
    if (iHeader == null || iHeader.getAlignment() == null)
        return HasHorizontalAlignment.ALIGN_LEFT;
    switch (iHeader.getAlignment()) {
    case CENTER: return HasHorizontalAlignment.ALIGN_CENTER;
    case LEFT: return HasHorizontalAlignment.ALIGN_LEFT;
    case RIGHT: return HasHorizontalAlignment.ALIGN_RIGHT;
    default: return HasHorizontalAlignment.ALIGN_LEFT;
    }
}
项目:appformer    文件:DirtyableFlexTable.java   
public void setHorizontalAlignmentForFlexCellFormatter(int row,
                                                       int column,
                                                       HorizontalAlignmentConstant horizontalAlignmentConstant) {
    getFlexCellFormatter().setHorizontalAlignment(row,
                                                  column,
                                                  horizontalAlignmentConstant);
}
项目:consulo    文件:CellPanel.java   
/**
 * Sets the horizontal alignment of the given widget within its cell.
 *
 * @param w the widget whose horizontal alignment is to be set
 * @param align the widget's horizontal alignment, as defined in
 *          {@link HasHorizontalAlignment}.
 */
public void setCellHorizontalAlignment(Widget w,
                                       HorizontalAlignmentConstant align) {
  Element td = getWidgetTd(w);
  if (td != null) {
    setCellHorizontalAlignment(td, align);
  }
}
项目:unitimes    文件:InstructorAttributesTable.java   
protected HorizontalAlignmentConstant getColumnAlignment(AttributesColumn column, int idx) {
    switch (column) {
    default:
        return HasHorizontalAlignment.ALIGN_LEFT;
    }
}
项目:unitimes    文件:InstructorsTable.java   
protected HorizontalAlignmentConstant getColumnAlignment(InstructorsColumn column, int idx) {
    switch (column) {
    default:
        return HasHorizontalAlignment.ALIGN_LEFT;
    }
}
项目:unitimes    文件:RoomsTable.java   
@Override
public HorizontalAlignmentConstant getCellAlignment() {
    return HasHorizontalAlignment.ALIGN_RIGHT;
}
项目:unitimes    文件:RoomsTable.java   
@Override
public HorizontalAlignmentConstant getCellAlignment() {
    return HasHorizontalAlignment.ALIGN_RIGHT;
}
项目:unitimes    文件:RoomGroupsTable.java   
protected HorizontalAlignmentConstant getColumnAlignment(RoomGroupsColumn column, int idx) {
    switch (column) {
    default:
        return HasHorizontalAlignment.ALIGN_LEFT;
    }
}
项目:unitimes    文件:RoomFeaturesTable.java   
protected HorizontalAlignmentConstant getColumnAlignment(RoomFeaturesColumn column, int idx) {
    switch (column) {
    default:
        return HasHorizontalAlignment.ALIGN_LEFT;
    }
}
项目:unitimes    文件:UniTimeTable.java   
@Override
public HorizontalAlignmentConstant getCellAlignment() {
    return HasHorizontalAlignment.ALIGN_RIGHT;
}
项目:unitimes    文件:UniTimeTable.java   
@Override
public HorizontalAlignmentConstant getCellAlignment() {
    return HasHorizontalAlignment.ALIGN_CENTER;
}
项目:unitimes    文件:UniTimeTable.java   
@Override
public HorizontalAlignmentConstant getCellAlignment() {
    return HasHorizontalAlignment.ALIGN_CENTER;
}
项目:unitimes    文件:Lookup.java   
@Override
public HorizontalAlignmentConstant getCellAlignment() {
    return HasHorizontalAlignment.ALIGN_CENTER;
}
项目:document-management-system    文件:TemplateWizardPopup.java   
/**
 * setCellHorizontalAlignment
 */
public void setCellHorizontalAlignment(Widget w, HorizontalAlignmentConstant align) {
    vPanel.setCellHorizontalAlignment(w, align);
}
项目:x-cure-chat    文件:ThreeLevelSiteMenu.java   
public HorizontalAlignmentConstant getHorizontalAlignment() {
    return HasHorizontalAlignment.ALIGN_RIGHT;
}
项目:x-cure-chat    文件:SiteNavigator.java   
@Override
public HorizontalAlignmentConstant getHorizontalAlignment() {
    return HasHorizontalAlignment.ALIGN_CENTER;
}
项目:sc2gears    文件:PagingTableConfig.java   
public void setColumnHorizontalAlignments( HorizontalAlignmentConstant... columnHorizontalAlignments ) {
 this.columnHorizontalAlignments = columnHorizontalAlignments;
}
项目:sc2gears    文件:PagingTableConfig.java   
public HorizontalAlignmentConstant[] getColumnHorizontalAlignments() {
 return columnHorizontalAlignments;
}
项目:unitime    文件:InstructorAttributesTable.java   
protected HorizontalAlignmentConstant getColumnAlignment(AttributesColumn column, int idx) {
    switch (column) {
    default:
        return HasHorizontalAlignment.ALIGN_LEFT;
    }
}
项目:unitime    文件:InstructorsTable.java   
protected HorizontalAlignmentConstant getColumnAlignment(InstructorsColumn column, int idx) {
    switch (column) {
    default:
        return HasHorizontalAlignment.ALIGN_LEFT;
    }
}
项目:unitime    文件:RoomsTable.java   
@Override
public HorizontalAlignmentConstant getCellAlignment() {
    return HasHorizontalAlignment.ALIGN_RIGHT;
}
项目:unitime    文件:RoomsTable.java   
@Override
public HorizontalAlignmentConstant getCellAlignment() {
    return HasHorizontalAlignment.ALIGN_RIGHT;
}
项目:unitime    文件:RoomGroupsTable.java   
protected HorizontalAlignmentConstant getColumnAlignment(RoomGroupsColumn column, int idx) {
    switch (column) {
    default:
        return HasHorizontalAlignment.ALIGN_LEFT;
    }
}
项目:unitime    文件:RoomFeaturesTable.java   
protected HorizontalAlignmentConstant getColumnAlignment(RoomFeaturesColumn column, int idx) {
    switch (column) {
    default:
        return HasHorizontalAlignment.ALIGN_LEFT;
    }
}
项目:unitime    文件:UniTimeTable.java   
@Override
public HorizontalAlignmentConstant getCellAlignment() {
    return HasHorizontalAlignment.ALIGN_RIGHT;
}
项目:unitime    文件:UniTimeTable.java   
@Override
public HorizontalAlignmentConstant getCellAlignment() {
    return HasHorizontalAlignment.ALIGN_CENTER;
}
项目:unitime    文件:UniTimeTable.java   
@Override
public HorizontalAlignmentConstant getCellAlignment() {
    return HasHorizontalAlignment.ALIGN_CENTER;
}
项目:unitime    文件:Lookup.java   
@Override
public HorizontalAlignmentConstant getCellAlignment() {
    return HasHorizontalAlignment.ALIGN_CENTER;
}
项目:consulo    文件:CellPanel.java   
@SuppressWarnings("deprecation")
protected void setCellHorizontalAlignment(Element td,
                                          HorizontalAlignmentConstant align) {
  setCellHorizontalAlignment(DOM.asOld(td), align);
}