当前位置: 首页>>代码示例>>Java>>正文


Java HorizontalAlignmentConstant类代码示例

本文整理汇总了Java中com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant的典型用法代码示例。如果您正苦于以下问题:Java HorizontalAlignmentConstant类的具体用法?Java HorizontalAlignmentConstant怎么用?Java HorizontalAlignmentConstant使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


HorizontalAlignmentConstant类属于com.google.gwt.user.client.ui.HasHorizontalAlignment包,在下文中一共展示了HorizontalAlignmentConstant类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getColumnAlignment

import com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant; //导入依赖的package包/类
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;
	}
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:17,代码来源:CurriculaTable.java

示例2: getSafeHtml

import com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant; //导入依赖的package包/类
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();
}
 
开发者ID:codenvy-legacy,项目名称:plugin-datasource,代码行数:17,代码来源:AlignableColumnHeader.java

示例3: getCellAlignment

import com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant; //导入依赖的package包/类
@Override
public HorizontalAlignmentConstant getCellAlignment() {
	switch (iField.getType()) {
	case toggle:
		return HasHorizontalAlignment.ALIGN_CENTER;
	case students:
		return HasHorizontalAlignment.ALIGN_RIGHT;
	default:
		return HasHorizontalAlignment.ALIGN_LEFT;
	}
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:12,代码来源:SimpleEditPage.java

示例4: getColumnAlignment

import com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant; //导入依赖的package包/类
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;
	}
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:11,代码来源:RoomsTable.java

示例5: getCellAlignment

import com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant; //导入依赖的package包/类
@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;
	}
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:12,代码来源:DataTable.java

示例6: getHorizontalAlignment

import com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant; //导入依赖的package包/类
public HorizontalAlignmentConstant getHorizontalAlignment() {
	if( SiteManager.isUserLoggedIn() ) {
		return HasHorizontalAlignment.ALIGN_CENTER;
	} else {
		return HasHorizontalAlignment.ALIGN_LEFT;
	}
}
 
开发者ID:ivan-zapreev,项目名称:x-cure-chat,代码行数:8,代码来源:SiteTitle.java

示例7: alignTableCells

import com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant; //导入依赖的package包/类
/**
 * 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 );
}
 
开发者ID:icza,项目名称:sc2gears,代码行数:13,代码来源:ClientUtils.java

示例8: setHorizontalAlignment

import com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant; //导入依赖的package包/类
/**
 * 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);
		}
	}
}
 
开发者ID:opendata-euskadi,项目名称:r01fb,代码行数:13,代码来源:GWTWidgets.java

示例9: setHorizontalAlignmentForFlexCellFormatter

import com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant; //导入依赖的package包/类
public void setHorizontalAlignmentForFlexCellFormatter(int row,
                                                       int column,
                                                       HorizontalAlignmentConstant horizontalAlignmentConstant) {
    getFlexCellFormatter().setHorizontalAlignment(row,
                                                  column,
                                                  horizontalAlignmentConstant);
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:8,代码来源:DirtyableFlexTable.java

示例10: setCellHorizontalAlignment

import com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant; //导入依赖的package包/类
/**
 * 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);
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:15,代码来源:CellPanel.java

示例11: getColumnAlignment

import com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant; //导入依赖的package包/类
protected HorizontalAlignmentConstant getColumnAlignment(AttributesColumn column, int idx) {
	switch (column) {
	default:
		return HasHorizontalAlignment.ALIGN_LEFT;
	}
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:7,代码来源:InstructorAttributesTable.java

示例12: getColumnAlignment

import com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant; //导入依赖的package包/类
protected HorizontalAlignmentConstant getColumnAlignment(InstructorsColumn column, int idx) {
	switch (column) {
	default:
		return HasHorizontalAlignment.ALIGN_LEFT;
	}
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:7,代码来源:InstructorsTable.java

示例13: getCellAlignment

import com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant; //导入依赖的package包/类
@Override
public HorizontalAlignmentConstant getCellAlignment() {
	return HasHorizontalAlignment.ALIGN_RIGHT;
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:5,代码来源:RoomsTable.java

示例14: getColumnAlignment

import com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant; //导入依赖的package包/类
protected HorizontalAlignmentConstant getColumnAlignment(RoomGroupsColumn column, int idx) {
	switch (column) {
	default:
		return HasHorizontalAlignment.ALIGN_LEFT;
	}
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:7,代码来源:RoomGroupsTable.java

示例15: getColumnAlignment

import com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant; //导入依赖的package包/类
protected HorizontalAlignmentConstant getColumnAlignment(RoomFeaturesColumn column, int idx) {
	switch (column) {
	default:
		return HasHorizontalAlignment.ALIGN_LEFT;
	}
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:7,代码来源:RoomFeaturesTable.java


注:本文中的com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。