public void showField( Object field, boolean fShow ) { FieldInfo info = (FieldInfo) field; if( fShow ) table.getRowFormatter().getElement( info.row ).getStyle().clearDisplay(); else table.getRowFormatter().getElement( info.row ).getStyle().setDisplay( Display.NONE ); }
public void showField( Object field, boolean fShow ) { FieldInfo info = (FieldInfo) field; if( fShow ) table.getRowFormatter().getElement( info.row ).getStyle().clearDisplay(); else table.getRowFormatter().getElement( info.row ).getStyle().setDisplay( Display.NONE ); }
private void printRow( T object, int row ) { // to reset the edition state, just in case... if( edition != null && refMng.getRef( edition.editedObject ) == refMng.getRef( object ) ) killCurrentEdit(); // each column for( int i = 0; i < columns.size(); i++ ) columns.get( i ).prints.print( object, new CellInFlexTablePrinter( table, row, i ) ); // writes the element reference on the corresponding row element // note that this does not create a hard link to the referenced object // so // no garbage is created here // to avoid cases when the colummn has printed nothing and the row // doesnt exist if( table.getRowCount() <= row ) table.setText( row, 0, "" ); table.getRowFormatter().getElement( row ).setPropertyInt( "ref", refMng.getRef( object ) ); }
@Override public void addFieldToLayout(FieldElement field) { FlowPanel fieldPanel = field.getFieldWidgetAreaLayout(); table.setWidget(row, 0, field.getFieldDetailsLayout()); table.setWidget(row, 1, fieldPanel); if(this.hasValidation){ ValidationMessagePanel validationPanel = new ValidationMessagePanel(false); table.setWidget(row, 2, validationPanel); field.setValidationPanel(validationPanel); field.setParentElement(table.getRowFormatter().getElement(row)); table.getColumnFormatter().setStyleName(0, "ks-table-title-column-width"); table.getColumnFormatter().setStyleName(1, "ks-table-field-column-width"); validationPanel.setStyleName("ks-form-module-validation-inline"); } else{ table.getColumnFormatter().setStyleName(0, "ks-table-title-column-width"); } row++; }
private void updateTableSelection() { int count = tableModel.getRowCount(); String attrName = BrowserUtils.getClassAttr(); for (int i = 0; i < count; i++) { Element tr = table.getRowFormatter().getElement(i); if (tableModel.getRow(i).isSelected()) { tr.setAttribute(attrName, "table-row-selected"); } else { tr.setAttribute(attrName, "table-row"); } if (tableModel.getRow(i).isHighlighted()) { tr.setAttribute(attrName, "table-row-hover"); } if (tableModel.isMultipleSelectable()) { updateTableCell(i, 0); } } SelectionChangeEvent.fire(this); }
private void printRow( T object, int row ) { // to reset the edition state, just in case... if( edition != null && refMng.getRef( edition.editedObject ) == refMng.getRef( object ) ) killCurrentEdit(); // each column for( int i = 0; i < columns.size(); i++ ) columns.get( i ).prints.print( object, new CellInFlexTablePrinter( table, row, i ) ); // writes the element reference on the corresponding row element // note that this does not create a hard link to the referenced object // so // no garbage is created here // to avoid cases when the colummn has printed nothing and the row // doesnt exist if( table.getRowCount() <= row ) table.setText( row, 0, "" ); table.getRowFormatter().getElement( row ).setPropertyInt( "ref", refMng.getRef( object ) ); }
private int getRefAtRow( int row ) { return table.getRowFormatter().getElement( row ).getPropertyInt( "ref" ); }
private int getRefAtRow( int row ) { return table.getRowFormatter().getElement( row ).getPropertyInt( "ref" ); }
public Element getRowElement( int row ) { return getRowFormatter().getElement( row ); }
public Element getRowElement( int row ) { return getRowFormatter().getElement( row ); }
/** * Gets the primary style of the specified row. * * @param row the row to be queried * @return the style name * @see UIObject#getStylePrimaryName() * @throws IndexOutOfBoundsException */ public String getStylePrimaryName(int row) { return UIObject.getStylePrimaryName(getElement(row)); }
/** * Determines whether or not this row is visible via the display style * attribute. * * @param row the row whose visibility is to be set * @return <code>true</code> if the row is visible */ public boolean isVisible(int row) { Element e = getElement(row); return UIObject.isVisible(e); }
private void performKeyDownAction(@Nonnull final KeyDownEvent event) { if (isRowSelected) { event.preventDefault(); if (event.isUpArrow()) { selectRow(selectedRowIndex - 1); } else if (event.isDownArrow()) { selectRow(selectedRowIndex + 1); } ScrollMarker scrollMarker = new ScrollMarker(table.getRowFormatter().getElement(selectedRowIndex)); scroller.ensureVisible(scrollMarker); } }
/** * Determines whether or not this row is visible via the display style * attribute. * * @param row the row whose visibility is to be set * @return <code>true</code> if the row is visible */ public boolean isVisible(int row) { Element e = getElement(row); return UIObject.isVisible(e); }
/** * Gets the style of the specified row. * * @param row the row to be queried * @return the style name * @see UIObject#getStyleName() * @throws IndexOutOfBoundsException */ public String getStyleName(int row) { return UIObject.getStyleName(getElement(row)); }
/** * Gets the style of the specified row. * * @param row the row to be queried * @return the style name * @see UIObject#getStyleName() * @throws IndexOutOfBoundsException */ public String getStyleName(int row) { return UIObject.getStyleName(getElement(row)); }
/** * Gets the primary style of the specified row. * * @param row the row to be queried * @return the style name * @see UIObject#getStylePrimaryName() * @throws IndexOutOfBoundsException */ public String getStylePrimaryName(int row) { return UIObject.getStylePrimaryName(getElement(row)); }
/** * Determines whether or not this row is visible via the display style * attribute. * * @param row the row whose visibility is to be set * @return <code>true</code> if the row is visible */ public boolean isVisible(int row) { Element e = getElement(row); return UIObject.isVisible(e); }
/** * Gets the primary style of the specified row. * * @param row the row to be queried * @return the style name * @see UIObject#getStylePrimaryName() * @throws IndexOutOfBoundsException */ public String getStylePrimaryName(int row) { return UIObject.getStylePrimaryName(getElement(row)); }
/** * Gets the style of the specified row. * * @param row the row to be queried * @return the style name * @see UIObject#getStyleName() * @throws IndexOutOfBoundsException */ public String getStyleName(int row) { return UIObject.getStyleName(getElement(row)); }