List of usage examples for com.google.gwt.user.client.ui HTMLTable getCellFormatter
public CellFormatter getCellFormatter()
From source file:cc.alcina.framework.gwt.client.util.WidgetUtils.java
License:Apache License
public static void setColumnVisibility(HTMLTable table, int column, boolean visible) { int rows = table.getRowCount(); for (int row = 0; row < rows; row++) { UIObject.setVisible(table.getCellFormatter().getElement(row, column), visible); }//from www . j a va2s .c o m }
From source file:com.google.zxing.web.generator.client.Generator.java
License:Apache License
private static void setGridStyle(HTMLTable grid) { grid.getColumnFormatter().addStyleName(0, "firstColumn"); grid.getColumnFormatter().addStyleName(1, "secondColumn"); HTMLTable.CellFormatter cellFormatter = grid.getCellFormatter(); for (int i = 0; i < grid.getRowCount(); ++i) { cellFormatter.addStyleName(i, 0, "firstColumn"); cellFormatter.addStyleName(i, 1, "secondColumn"); }//from w w w . java 2 s .c om }
From source file:org.openelis.modules.worksheetCompletion1.client.WorksheetCheckBoxCell.java
License:Open Source License
private void render(String value, HTMLTable table, int row, int col) { if (value != null) { table.setWidget(row, col, getCheckDiv(value)); if (align.equalsIgnoreCase("left")) table.getCellFormatter().setHorizontalAlignment(row, col, HasHorizontalAlignment.ALIGN_LEFT); else if (align.equalsIgnoreCase("right")) table.getCellFormatter().setHorizontalAlignment(row, col, HasHorizontalAlignment.ALIGN_RIGHT); else// w w w . jav a 2 s .c o m table.getCellFormatter().setHorizontalAlignment(row, col, HasHorizontalAlignment.ALIGN_CENTER); } else { table.setWidget(row, col, new AbsolutePanel()); } }
From source file:org.openelis.ui.widget.celltable.CheckBoxCell.java
License:Open Source License
private void render(String value, HTMLTable table, int row, int col) { String style;/*from www. j ava 2 s. co m*/ AbsolutePanel div; if (value == null) style = css.Unknown(); else if ("Y".equals(value)) style = css.Checked(); else style = css.Unchecked(); div = new AbsolutePanel(); div.setStyleName(style); table.setWidget(row, col, div); table.getCellFormatter().setHorizontalAlignment(row, col, HasAlignment.ALIGN_CENTER); }
From source file:org.openelis.ui.widget.celltable.CheckCell.java
License:Open Source License
private void render(Boolean value, HTMLTable table, int row, int col) { String style;/*from w w w. j ava2 s . c o m*/ AbsolutePanel div; if (value == null) style = css.Unknown(); else if (value == true) style = css.Checked(); else style = css.Unchecked(); div = new AbsolutePanel(); div.setStyleName(style); table.setWidget(row, col, div); table.getCellFormatter().setHorizontalAlignment(row, col, HasAlignment.ALIGN_CENTER); }
From source file:org.openelis.ui.widget.celltable.ImageCell.java
License:Open Source License
/** * Gets Formatted value from editor and sets it as the cells display *//*from w w w . j av a2s. c o m*/ public void render(HTMLTable table, int row, int col, Object value) { table.getCellFormatter().addStyleName(row, col, (String) value); }
From source file:org.openelis.ui.widget.table.CheckBoxCell.java
License:Open Source License
private void render(String value, HTMLTable table, int row, int col) { table.setWidget(row, col, getCheckDiv(value)); if (align.equalsIgnoreCase("left")) table.getCellFormatter().setHorizontalAlignment(row, col, HasHorizontalAlignment.ALIGN_LEFT); else if (align.equalsIgnoreCase("right")) table.getCellFormatter().setHorizontalAlignment(row, col, HasHorizontalAlignment.ALIGN_RIGHT); else/* w ww. j a v a 2 s. co m*/ table.getCellFormatter().setHorizontalAlignment(row, col, HasHorizontalAlignment.ALIGN_CENTER); }
From source file:org.openelis.ui.widget.table.ImageCell.java
License:Open Source License
/** * Gets Formatted value from editor and sets it as the cells display */// www .j a v a 2s . c om public void render(HTMLTable table, int row, int col, Object value) { table.getCellFormatter().setStyleName(row, col, (String) value); }
From source file:org.sigmah.client.ui.view.project.logframe.grid.HTMLTableUtils.java
License:Open Source License
/** * Applies the CSS column-header styles to a cell. * //from w ww .ja v a 2 s . c o m * @param table * The GWT table. * @param row * The row index. * @param column * The column index. */ public static void applyColumnHeaderStyles(HTMLTable table, int row, int column) { table.getCellFormatter().addStyleName(row, column, "x-grid3-header"); table.getCellFormatter().addStyleName(row, column, "x-grid3-hd"); table.getCellFormatter().addStyleName(row, column, "x-grid3-hd-row"); table.getCellFormatter().addStyleName(row, column, "x-grid3-td-favorite"); table.getCellFormatter().addStyleName(row, column, "x-grid3-cell"); final Widget w = table.getWidget(row, column); if (w != null) { w.addStyleName("x-grid3-hd-inner"); w.addStyleName("x-grid3-hd-favorite "); w.addStyleName("x-component"); } }
From source file:org.sigmah.client.ui.view.project.logframe.grid.HTMLTableUtils.java
License:Open Source License
/** * Applies the CSS row-header styles to a cell. * /*from w w w. j av a 2s. c om*/ * @param table * The GWT table. * @param row * The row index. * @param column * The column index. */ public static void applyRowHeaderStyles(HTMLTable table, int row, int column) { applyColumnHeaderStyles(table, row, column); table.getCellFormatter().addStyleName(row, column, "html-grid-header-row"); }