List of usage examples for com.google.gwt.user.client.ui HTMLTable getRowCount
public abstract int getRowCount();
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); }// w ww .jav a 2 s. c om }
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"); }/* w w w . j a va 2 s. c o m*/ }
From source file:org.jax.gwtutil.client.WidgetUtilities.java
License:Open Source License
/** * Get the row index of the widget//from w w w . j a v a 2 s . c om * @param widget * the widget * @param table * the table * @return * the row index or -1 if the widget isn't in the table */ public static int getRowIndexOf(Widget widget, HTMLTable table) { int rowCount = table.getRowCount(); for (int row = 0; row < rowCount; row++) { int cellCount = table.getCellCount(row); for (int column = 0; column < cellCount; column++) { if (table.getWidget(row, column) == widget) { return row; } } } return -1; }
From source file:org.otalo.ao.client.MessageDetail.java
License:Apache License
/** * Add a text box with label to the table, one field per row. * The field is if you want to submit this as part of a form, * and also corresponds to the field in the db model for Users * /*from w ww. jav a 2s .c o m*/ * @param table * @param label * @param inputID */ private TextBox addCallerDetailsField(HTMLTable table, String label, String field) { TextBox box = new TextBox(); box.setName(field); callerDetailsMap.put(field, box); Label lab = new Label(label); int row = table.getRowCount(); table.setWidget(row, 0, lab); table.setWidget(row, 1, box); return box; }
From source file:org.sigmah.client.ui.view.project.logframe.grid.HTMLTableUtils.java
License:Open Source License
/** * Applies the CSS header styles to a GWT table. * // ww w.java 2 s . c om * @param table * The GWT table. * @param applyToRows * If the first column contains also headers (double entry array). */ public static void applyHeaderStyles(HTMLTable table, boolean applyToRows) { // Rows. if (applyToRows) { for (int row = 0; row < table.getRowCount(); row++) { applyRowStyles(table, row); applyRowHeaderStyles(table, row, 0); // for (int column = 0; column < table.getCellCount(row); column++) { // // } } } // Columns. for (int column = 0; column < table.getCellCount(0); column++) { applyColumnHeaderStyles(table, 0, column); } }