com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant Java Examples

The following examples show how to use com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CurriculaTable.java    From unitime with Apache License 2.0 6 votes vote down vote up
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;
	}
}
 
Example #2
Source File: DataTable.java    From unitime with Apache License 2.0 5 votes vote down vote up
@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;
	}
}
 
Example #3
Source File: CellPanel.java    From consulo with Apache License 2.0 5 votes vote down vote up
/**
 * 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);
  }
}
 
Example #4
Source File: ClientUtils.java    From sc2gears with Apache License 2.0 5 votes vote down vote up
/**
 * 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 );
}
 
Example #5
Source File: RoomsTable.java    From unitime with Apache License 2.0 5 votes vote down vote up
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;
	}
}
 
Example #6
Source File: SimpleEditPage.java    From unitime with Apache License 2.0 5 votes vote down vote up
@Override
public HorizontalAlignmentConstant getCellAlignment() {
	switch (iField.getType()) {
	case toggle:
		return HasHorizontalAlignment.ALIGN_CENTER;
	case students:
		return HasHorizontalAlignment.ALIGN_RIGHT;
	default:
		return HasHorizontalAlignment.ALIGN_LEFT;
	}
}
 
Example #7
Source File: UniTimeTable.java    From unitime with Apache License 2.0 4 votes vote down vote up
@Override
public HorizontalAlignmentConstant getCellAlignment() {
	return HasHorizontalAlignment.ALIGN_CENTER;
}
 
Example #8
Source File: SuggestionsTable.java    From unitime with Apache License 2.0 4 votes vote down vote up
protected HorizontalAlignmentConstant getColumnAlignment(SuggestionColumn column, int idx) {
	switch (column) {
	default:
		return HasHorizontalAlignment.ALIGN_LEFT;
	}
}
 
Example #9
Source File: AssignmentTable.java    From unitime with Apache License 2.0 4 votes vote down vote up
protected HorizontalAlignmentConstant getColumnAlignment(AssignmentColumn column, int idx) {
	switch (column) {
	default:
		return HasHorizontalAlignment.ALIGN_LEFT;
	}
}
 
Example #10
Source File: UniTimeTable.java    From unitime with Apache License 2.0 4 votes vote down vote up
@Override
public HorizontalAlignmentConstant getCellAlignment() {
	return HasHorizontalAlignment.ALIGN_RIGHT;
}
 
Example #11
Source File: UniTimeTable.java    From unitime with Apache License 2.0 4 votes vote down vote up
@Override
public HorizontalAlignmentConstant getCellAlignment() {
	return HasHorizontalAlignment.ALIGN_CENTER;
}
 
Example #12
Source File: CellPanel.java    From consulo with Apache License 2.0 4 votes vote down vote up
/**
 * @deprecated Call and override {@link #setCellHorizontalAlignment(Element,
 *             HorizontalAlignmentConstant)} instead.
 */
@Deprecated
protected void setCellHorizontalAlignment(com.google.gwt.user.client.Element td,
                                          HorizontalAlignmentConstant align) {
  td.setPropertyString("align", align.getTextAlignString());
}
 
Example #13
Source File: CourseFinderClasses.java    From unitime with Apache License 2.0 4 votes vote down vote up
@Override
public HorizontalAlignmentConstant getCellAlignment() {
	return HasHorizontalAlignment.ALIGN_CENTER;
}
 
Example #14
Source File: Lookup.java    From unitime with Apache License 2.0 4 votes vote down vote up
@Override
public HorizontalAlignmentConstant getCellAlignment() {
	return HasHorizontalAlignment.ALIGN_CENTER;
}
 
Example #15
Source File: PublishedSectioningSolutionsTable.java    From unitime with Apache License 2.0 4 votes vote down vote up
protected HorizontalAlignmentConstant getColumnAlignment(TableColumn column, int idx) {
	switch (column) {
	default:
		return HasHorizontalAlignment.ALIGN_LEFT;
	}
}
 
Example #16
Source File: CellPanel.java    From consulo with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("deprecation")
protected void setCellHorizontalAlignment(Element td,
                                          HorizontalAlignmentConstant align) {
  setCellHorizontalAlignment(DOM.asOld(td), align);
}
 
Example #17
Source File: TemplateWizardPopup.java    From document-management-system with GNU General Public License v2.0 4 votes vote down vote up
/**
 * setCellHorizontalAlignment
 */
public void setCellHorizontalAlignment(Widget w, HorizontalAlignmentConstant align) {
	vPanel.setCellHorizontalAlignment(w, align);
}
 
Example #18
Source File: ConflictTable.java    From unitime with Apache License 2.0 4 votes vote down vote up
protected HorizontalAlignmentConstant getColumnAlignment(ConflictColum column, int idx) {
	switch (column) {
	default:
		return HasHorizontalAlignment.ALIGN_LEFT;
	}
}
 
Example #19
Source File: RoomFeaturesTable.java    From unitime with Apache License 2.0 4 votes vote down vote up
protected HorizontalAlignmentConstant getColumnAlignment(RoomFeaturesColumn column, int idx) {
	switch (column) {
	default:
		return HasHorizontalAlignment.ALIGN_LEFT;
	}
}
 
Example #20
Source File: RoomGroupsTable.java    From unitime with Apache License 2.0 4 votes vote down vote up
protected HorizontalAlignmentConstant getColumnAlignment(RoomGroupsColumn column, int idx) {
	switch (column) {
	default:
		return HasHorizontalAlignment.ALIGN_LEFT;
	}
}
 
Example #21
Source File: RoomsTable.java    From unitime with Apache License 2.0 4 votes vote down vote up
@Override
public HorizontalAlignmentConstant getCellAlignment() {
	return HasHorizontalAlignment.ALIGN_RIGHT;
}
 
Example #22
Source File: RoomsTable.java    From unitime with Apache License 2.0 4 votes vote down vote up
@Override
public HorizontalAlignmentConstant getCellAlignment() {
	return HasHorizontalAlignment.ALIGN_RIGHT;
}
 
Example #23
Source File: TaskExecutionsTable.java    From unitime with Apache License 2.0 4 votes vote down vote up
protected HorizontalAlignmentConstant getColumnAlignment(TaskExecutionsTableColumn column, int idx) {
	switch (column) {
	default:
		return HasHorizontalAlignment.ALIGN_LEFT;
	}
}
 
Example #24
Source File: TasksTable.java    From unitime with Apache License 2.0 4 votes vote down vote up
protected HorizontalAlignmentConstant getColumnAlignment(TasksTableColumn column, int idx) {
	switch (column) {
	default:
		return HasHorizontalAlignment.ALIGN_LEFT;
	}
}
 
Example #25
Source File: InstructorsTable.java    From unitime with Apache License 2.0 4 votes vote down vote up
protected HorizontalAlignmentConstant getColumnAlignment(InstructorsColumn column, int idx) {
	switch (column) {
	default:
		return HasHorizontalAlignment.ALIGN_LEFT;
	}
}
 
Example #26
Source File: InstructorAttributesTable.java    From unitime with Apache License 2.0 4 votes vote down vote up
protected HorizontalAlignmentConstant getColumnAlignment(AttributesColumn column, int idx) {
	switch (column) {
	default:
		return HasHorizontalAlignment.ALIGN_LEFT;
	}
}
 
Example #27
Source File: PagingTableConfig.java    From sc2gears with Apache License 2.0 4 votes vote down vote up
public HorizontalAlignmentConstant[] getColumnHorizontalAlignments() {
 return columnHorizontalAlignments;
}
 
Example #28
Source File: PagingTableConfig.java    From sc2gears with Apache License 2.0 4 votes vote down vote up
public void setColumnHorizontalAlignments( HorizontalAlignmentConstant... columnHorizontalAlignments ) {
 this.columnHorizontalAlignments = columnHorizontalAlignments;
}
 
Example #29
Source File: WizardPopup.java    From document-management-system with GNU General Public License v2.0 4 votes vote down vote up
/**
 * setCellHorizontalAlignment
 */
public void setCellHorizontalAlignment(Widget w, HorizontalAlignmentConstant align) {
	vPanel.setCellHorizontalAlignment(w, align);
}
 
Example #30
Source File: CellPanel.java    From consulo with Apache License 2.0 2 votes vote down vote up
/**
 * Overloaded version for IsWidget.
 *
 * @see #setCellHorizontalAlignment(Widget,HasHorizontalAlignment.HorizontalAlignmentConstant)
 */
public void setCellHorizontalAlignment(IsWidget w,
                                       HorizontalAlignmentConstant align) {
  this.setCellHorizontalAlignment(w.asWidget(), align);
}