protected void layoutRequired( Map<String, String> attributes, Widget container, GwtMetawidget metawidget ) { State state = getState( container, metawidget ); FlexTable flexTable = (FlexTable) ( (ComplexPanel) container ).getWidget( 0 ); int row = flexTable.getRowCount() - 1; int column = flexTable.getCellCount( row ); state.formatter.setStyleName( row, column, getStyleName( ( state.currentColumn * LABEL_AND_COMPONENT_AND_REQUIRED ) + 2, metawidget ) ); if ( attributes != null && TRUE.equals( attributes.get( REQUIRED ) ) && !TRUE.equals( attributes.get( READ_ONLY ) ) && !metawidget.isReadOnly() ) { flexTable.setText( row, column, "*" ); return; } // Render an empty div, so that the CSS can force it to a certain // width if desired for the layout (browsers seem to not respect // widths set on empty table columns) // // Note: don't do <div/>, as we may not be XHTML flexTable.setHTML( row, column, "<div></div>" ); }
index = index - 7; daysTable.setText(0, i, SHORT_DAY_NAMES[index]); formatter.setStyleName(0, i, "week-day-cell"); if (DateHelper.isWeekEndDay(index)) formatter.addStyleName(0, i, "holiday-cell"); if (isShowWeeksColumn()) { daysTable.setText(row, 0, String.valueOf(i)); formatter.setStyleName(row, 0, "week-number-cell"); formatter.setStyleName(row, j, "day-cell"); else formatter.setStyleName(row, j, "disabled-day-cell");
formatter.setStyleName(thisRow, parentColumn, "subgrid-cell"); formatter.setColSpan(thisRow, parentColumn, grid.getCellCount(parentRow) - parentColumn); grid.setWidget(thisRow, parentColumn, gridPanel);
cf.setStyleName(row, col, cellClass); cf.setStyleName(row, i, "x-grid3-header x-grid3-hd x-grid3-cell x-grid3-td-" + cm.getColumnId(i)); cf.getElement(row, i).setAttribute("role", "presentation"); cf.getElement(row, i).setPropertyInt("gridColumnIndex", i); cf.setStyleName(row, i, "x-grid3-header x-grid3-hd x-grid3-cell x-grid3-td-" + cm.getColumnId(i));
state.formatter.setStyleName( row, actualColumn, styleName ); state.formatter.setStyleName( row, actualColumn, styleName );
HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_BOTTOM ); formatter.setStyleName( 0, 0, "modeller-fact-TypeHeader" );
HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_BOTTOM); formatter.setStyleName(0, 0, "modeller-fact-TypeHeader");
HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_BOTTOM); formatter.setStyleName(0, 0, "modeller-fact-TypeHeader");
setText(rowIndex,0, row.getTitle()); getFlexCellFormatter().setStyleName(rowIndex,0, "rowTitle"); if(row.getTitleCellStyleName() != null){ getFlexCellFormatter().addStyleName(rowIndex,0, row.getTitleCellStyleName()); getFlexCellFormatter().setStyleName(rowIndex,1, "cell1"); getFlexCellFormatter().setColSpan(rowIndex, 1,2); if(row.getContentCellStyleName() != null){ getFlexCellFormatter().setColSpan(rowIndex, 1,1); getFlexCellFormatter().setColSpan(rowIndex, 2,1); getFlexCellFormatter().setStyleName(rowIndex,1, "cell1"); getFlexCellFormatter().setStyleName(rowIndex,2, "cell2"); if(row.getContentCellStyleName() != null){ getFlexCellFormatter().addStyleName(rowIndex,1, row.getContentCellStyleName());
private void addSection(SummaryTableBlock section){ int topRowIndex = -1; if(section.getTitle() != null && !section.getTitle().isEmpty()){ getFlexCellFormatter().setStyleName(rowIndex,0, "sectionTitleRow"); getFlexCellFormatter().setColSpan(rowIndex, 0, 3); getFlexCellFormatter().setVerticalAlignment(rowIndex, 0, HasVerticalAlignment.ALIGN_BOTTOM);
/** * This method renders the header. */ protected void prepareHeader() { FlexTable layout = getLayout(); FlexTable.FlexCellFormatter formatter = layout.getFlexCellFormatter(); layout.setText(0, 0, getDateString(getDate())); layout.setWidget(0, 1, getCloseButton()); formatter.setStyleName(0, 1, "switch-cell"); formatter.setStyleName(0, 0, "header-cell"); formatter.setColSpan(0, 0, 4); layout.setWidget(1, 0, getYearBeforeButton()); formatter.setStyleName(1, 0, "switch-cell"); layout.setWidget(1, 1, getMonthBeforeButton()); formatter.setStyleName(1, 1, "switch-cell"); layout.setWidget(1, 2, getTodayButton()); formatter.setStyleName(1, 2, "today-button-cell"); layout.setWidget(1, 3, getMonthAfterButton()); formatter.setStyleName(1, 3, "switch-cell"); layout.setWidget(1, 4, getYearAfterButton()); formatter.setStyleName(1, 4, "switch-cell"); }
/** * This method renders the time section. */ protected void prepareTime() { if (!isShowTime()) return; FlexTable time = new FlexTable(); time.setStyleName("time-table"); int index = 0; if ("12".equals(constants.hoursCircleBasis())) { time.setWidget(0, index++, prepareAmPmListBox(getAmPmMarker())); time.setWidget(0, index++, prepareTimeListBox(getHours(), "hh", 1, 12)); } else time.setWidget(0, index++, prepareTimeListBox(getHours(), "HH", 0, 23)); time.setText(0, index++, ":"); time.setWidget(0, index++, prepareTimeListBox(getMinutes(), "mm", 0, 59)); time.setText(0, index++, ":"); time.setWidget(0, index, prepareTimeListBox(getSeconds(), "ss", 0, 59)); FlexTable layout = getLayout(); layout.setWidget(3, 0, time); FlexTable.FlexCellFormatter formatter = layout.getFlexCellFormatter(); formatter.setColSpan(3, 0, 5); formatter.setStyleName(3, 0, "time-cell"); }
public void onEndBuild( GwtMetawidget metawidget ) { Facet facet = metawidget.getFacet( "buttons" ); if ( facet != null ) { State state = getState( metawidget, metawidget ); FlexTable flexTable = (FlexTable) metawidget.getWidget( 0 ); int row = flexTable.getRowCount(); int numberOfColumns = getEffectiveNumberOfColumns( metawidget ); if ( numberOfColumns > 0 ) { state.formatter.setColSpan( row, 0, numberOfColumns * LABEL_AND_COMPONENT_AND_REQUIRED ); } if ( mFooterStyleName != null ) { state.formatter.setStyleName( row, 0, mFooterStyleName ); } flexTable.setWidget( row, 0, facet ); } }
public void doLayout(){ rowIndex = 0; this.removeAllRows(); if(model.getContentColumnHeader1() != null && model.getContentColumnHeader2() != null){ super.setText(rowIndex, 1, model.getContentColumnHeader1()); super.setText(rowIndex, 2, model.getContentColumnHeader2()); getFlexCellFormatter().setStyleName(rowIndex,1, "columnTitle"); getFlexCellFormatter().setStyleName(rowIndex,2, "columnTitle"); rowIndex++; } for(SummaryTableBlock section: model.getSectionList()){ addSection(section); } }
private void addHeaderRow(final LazyStackPanelRow row) { flexTable.setWidget( rowIndex, 0, row ); flexTable.getFlexCellFormatter().setStyleName( rowIndex, 0, "guvnor-LazyStackPanel-row-header" ); rowIndex++; }
private void addHeaderRow(final LazyStackPanelRow row) { flexTable.setWidget(rowIndex, 0, row); flexTable.getFlexCellFormatter().setStyleName(rowIndex, 0, "guvnor-LazyStackPanel-row-header"); rowIndex++; }
private void addHeaderRow(final LazyStackPanelRow row) { flexTable.setWidget(rowIndex, 0, row); flexTable.getFlexCellFormatter().setStyleName(rowIndex, 0, "guvnor-LazyStackPanel-row-header"); rowIndex++; }