public void highlightCell(String rowKey, int cellIndex, String style){ if(rowMap.containsKey(rowKey)){ this.getCellFormatter().setStyleName(rowMap.get(rowKey).intValue(),cellIndex, style); } }
public void clearHighlightCell(String rowKey, int cellIndex){ if(rowMap.containsKey(rowKey)){ this.getCellFormatter().setStyleName(rowMap.get(rowKey).intValue(),cellIndex,""); } } private void addSection(SummaryTableBlock section){
private void handleCellStyle(Grid wrapped, Element element, int columnIndex) { String styleName = element.getAttribute(STYLE_ATTR); if (styleName.length() > 0) { wrapped.getCellFormatter().setStyleName(currentRowIndex, columnIndex, styleName); } }
/** * @param rfl List<VeryfyRuleFired> * @param scenario = the scenario to add/remove from */ public VerifyRulesFiredWidget(final FixtureList rfl, final Scenario scenario, boolean showResults) { outer = new Grid( 2, 1 ); this.showResults = showResults; outer.getCellFormatter().setStyleName( 0, 0, "modeller-fact-TypeHeader" ); //NON-NLS outer.getCellFormatter().setAlignment( 0, 0, HasHorizontalAlignment.ALIGN_CENTER, HasVerticalAlignment.ALIGN_MIDDLE ); outer.setStyleName( "modeller-fact-pattern-Widget" ); //NON-NLS outer.setWidget( 0, 0, new SmallLabel( TestScenarioConstants.INSTANCE.ExpectRules() ) ); initWidget( outer ); FlexTable data = render( rfl, scenario ); outer.setWidget( 1, 0, data ); }
final ClickableLabel vh = new ClickableLabel( MetadataConstants.INSTANCE.VersionHistory1(), clickHandler ); layout.setWidget( 0, 0, vh ); layout.getCellFormatter().setStyleName( 0, 0, "metadata-Widget" );
/** * This method puts the specified panel into the cell. * * @param row is a row number. * @param column is a column number. * @param panel is a grid panel to be put in. * @param parent is a parent grid panel. * @param caption is a caption of the grid panel. */ protected void setGridPanel(int row, int column, GridPanel panel, GridPanel parent, String caption) { FlexTable layout = new FlexTable(); layout.setCellPadding(0); layout.setCellSpacing(0); layout.setStyleName("grid-panel-layout"); layout.getCellFormatter().setStyleName(0, 0, "layout-caption"); layout.getCellFormatter().setStyleName(1, 0, "layout-body"); setWidget(row, column, layout); if (caption != null) layout.setWidget(0, 0, new Label(caption)); layout.setWidget(1, 0, panel); panel.setParent(parent); this.gridPanels.add(panel); }
/** * This method decorates the cell with styles. * * @param row is a row number. * @param column is a column number. * @param style is a style name. */ protected void decorateCell(int row, int column, String style) { HTMLTable.CellFormatter formatter = getGrid().getCellFormatter(); formatter.setStyleName(row, column, "data-cell"); formatter.addStyleName(row, column, style); if (getGrid().isReadOnly(column)) formatter.addStyleName(row, column, "readonly-cell"); else formatter.addStyleName(row, column, "editable-cell"); }
public void setColumnStyleName(int column, String name) { getCellFormatter().setStyleName(row, column, name); }
private void setStyles() { getCellFormatter().setStyleName( 0, 0, "modeller-fact-TypeHeader" ); //NON-NLS getCellFormatter().setAlignment( 0, 0, HasHorizontalAlignment.ALIGN_CENTER, HasVerticalAlignment.ALIGN_MIDDLE ); setStyleName( "modeller-fact-pattern-Widget" ); //NON-NLS }
/** {@inheritDoc} */ protected int createTab(AdvancedTabPanel panel, FlexTable result, int count, int index, Border border) { HTMLTable.CellFormatter formatter = result.getCellFormatter(); result.setWidget(count, 0, (Widget) border); if (panel.getSelected() == index) formatter.setStyleName(count++, 0, "selected"); else formatter.setStyleName(count++, 0, "unselected"); return count; }
/** {@inheritDoc} */ protected int createEmpty(FlexTable result, int count, String styleName) { HTMLTable.CellFormatter formatter = result.getCellFormatter(); result.setWidget(0, count, new Image(ThemeHelper.getInstance().getFullResourceName("advanced/images/single.gif"))); formatter.setStyleName(0, count++, styleName); return count; } }
/** * Use this method just to apply CSS.<p/> * Other operations will be done automatically. */ public void display() { setStyleName("advanced-masterDetailPanel"); for (int i = 0; i < getRowCount(); i++) { for (int j = 0; j < getCellCount(i); j++) { getCellFormatter().setStyleName(i, j, "gridPanel-cell"); } } }
private void setStyles() { getCellFormatter().setStyleName(0, 0, "modeller-fact-TypeHeader"); //NON-NLS getCellFormatter().setAlignment(0, 0, HasHorizontalAlignment.ALIGN_CENTER, HasVerticalAlignment.ALIGN_MIDDLE); setStyleName("modeller-fact-pattern-Widget"); //NON-NLS }
private void handleCellStyle(Grid wrapped, Element element, int columnIndex) { String styleName = element.getAttribute(STYLE_ATTR); if (styleName.length() > 0) { wrapped.getCellFormatter().setStyleName(currentRowIndex, columnIndex, styleName); } }
/** {@inheritDoc} */ protected int createEmpty(FlexTable result, int count, String styleName) { HTMLTable.CellFormatter formatter = result.getCellFormatter(); result.setWidget(count, 0, new Image(ThemeHelper.getInstance().getFullResourceName("advanced/images/single.gif"))); formatter.setStyleName(count++, 0, styleName); return count; } }
/** {@inheritDoc} */ protected int createTab(AdvancedTabPanel panel, FlexTable result, int count, int index, Border border) { HTMLTable.CellFormatter formatter = result.getCellFormatter(); result.setWidget(0, count, (Widget) border); if (panel.getSelected() == index) formatter.setStyleName(0, count++, "selected"); else formatter.setStyleName(0, count++, "unselected"); return count; }
private int addCell(Widget widget, String width, String className) { int cell = grid.getCellCount(0); grid.setWidget(0, cell, widget); grid.getCellFormatter().setWidth(0, cell, width); if (className != null) { grid.getCellFormatter().setStyleName(0, cell, className); } return cell; } }
private int addCell(Widget widget, String width, String className) { int cell = grid.getCellCount(0); grid.setWidget(0, cell, widget); grid.getCellFormatter().setWidth(0, cell, width); if (className != null) { grid.getCellFormatter().setStyleName(0, cell, className); } return cell; } }
formatter.setStyleName(0, i, css().weekendLabel()); if (weekendStartColumn == -1) { weekendStartColumn = i; formatter.setStyleName(0, i, css().weekdayLabel());
private int addCell(Widget widget, String width, String className) { int cell = grid.getCellCount(0); grid.setWidget(0, cell, widget); grid.getCellFormatter().setWidth(0, cell, width); if (className != null) { grid.getCellFormatter().setStyleName(0, cell, className); } return cell; } }