@Override public void onClick( ClickEvent event ) { Cell cell = table.getCellForEvent( event ); if( cell == null ) return; selected = rows.get( cell.getRowIndex() ); } } );
@Override public void onClick( ClickEvent event ) { Cell cell = table.getCellForEvent( event ); if( cell == null ) return; selected = rows.get( cell.getRowIndex() ); } } );
private void performClickAction(@Nonnull final ClickEvent event) { Cell cell = table.getCellForEvent(event); if (cell != null) { int row = cell.getRowIndex(); selectRow(row); } }
if( cell != null && edition != null && (refMng.getRef( edition.editedObject ) == getRefAtRow( cell.getRowIndex() ) && edition.editedCol == cell.getCellIndex()) ) return; fHandled = beginEdit( cell.getRowIndex(), cell.getCellIndex() ); int ref = table.getRowFormatter().getElement( cell.getRowIndex() ).getPropertyInt( "ref" ); T object = refMng.getObject( ref ); if( object == null ) return; CellInFlexTablePrinter pr = new CellInFlexTablePrinter( table, cell.getRowIndex(), cell.getCellIndex() );
HTMLTable.Cell td = table.getCellForEvent(clickEvent); int cell = td.getCellIndex(); int row = td.getRowIndex();
if( cell != null && edition != null && (refMng.getRef( edition.editedObject ) == getRefAtRow( cell.getRowIndex() ) && edition.editedCol == cell.getCellIndex()) ) return; fHandled = beginEdit( cell.getRowIndex(), cell.getCellIndex() ); int ref = table.getRowFormatter().getElement( cell.getRowIndex() ).getPropertyInt( "ref" ); T object = refMng.getObject( ref ); if( object == null ) return; CellInFlexTablePrinter pr = new CellInFlexTablePrinter( table, cell.getRowIndex(), cell.getCellIndex() );
@Override public void onClick(ClickEvent event) { int columnClicked = getCellForEvent(event).getCellIndex(); int rowIndex = getCellForEvent(event).getRowIndex();
int rowIndex = cell.getRowIndex(); tableModel.setCurrentIndex(rowIndex); Row row = tableModel.getRow(rowIndex);
/** * DaysOfMonthSelector */ public DaysOfMonthSelector() { initWidget(wrapperPanel); style = RESOURCES.daysOfMonthSelectorCSS(); style.ensureInjected(); daysOfMonth.setStyleName(style.daysOfMonthWidget()); showDaysOfMonth(); daysOfMonth.addClickHandler(event -> { Cell cellClicked = daysOfMonth.getCellForEvent(event); if (cellClicked != null) { int cellColumn = cellClicked.getCellIndex(); int cellRow = cellClicked.getRowIndex(); int actualCellIndex = (cellRow - 1) * DAYS_IN_WEEK + cellColumn; if (!clickedList.get(actualCellIndex)) { ValueChangeEvent.fire(DaysOfMonthSelector.this, addSelectedDate(getValue(), getDateFromIndex(actualCellIndex))); } else { ValueChangeEvent.fire(DaysOfMonthSelector.this, removeSelectedDate(getValue(), getDateFromIndex(actualCellIndex))); } } }); }
/** Sets the current position of the cursor or activates the selected cell. */ public void onClick(ClickEvent event) { EditableGrid grid = getPanel().getGrid(); HTMLTable.Cell cellForEvent = grid.getCellForEvent(event); if (cellForEvent != null) { int row = cellForEvent.getRowIndex(); int cell = cellForEvent.getCellIndex(); if (row == grid.getCurrentRow() && cell == grid.getCurrentColumn() && !grid.hasActiveCell() && getSelectionModifier() == 0) activateCell(); else if (!grid.hasActiveCell()) grid.setFocus(true); else if ((row != grid.getCurrentRow() || cell != grid.getCurrentColumn()) && grid.hasActiveCell() && getSelectionModifier() == 0) activateCell(); setCursor(row, cell, false); } }
/*************************************** * Sets the selection to the row of a certain cell. * * @param rCell The cell to select (NULL values will be ignored) * @param bFireEvent TRUE to fire a selection event */ private void setSelection(Cell rCell, boolean bFireEvent) { if (rCell != null) { int nRow = rCell.getRowIndex(); if (nRow >= 0 && nRow < nVisibleDataRows) { setSelection(nFirstRow + nRow, bFireEvent); } } }
/** {@inheritDoc} */ public void onClick(ClickEvent event) { EditableGrid grid = getPanel().getGrid(); HTMLTable.Cell cellForEvent = grid.getCellForEvent(event); int row = cellForEvent.getRowIndex(); int cell = cellForEvent.getCellIndex(); if (!isSubgridRow(row)) { if (row == grid.getCurrentRow() && cell == grid.getCurrentColumn() && !grid.hasActiveCell() && getSelectionModifier() == 0) dispatch(getPanel(), (char) KeyCodes.KEY_ENTER, 0); else if (!grid.hasActiveCell()) grid.setFocus(true); setCursor(row, cell, false); } }
/** * See class docs. */ @Override public void onClick(ClickEvent event) { FlexTable tabs = (FlexTable) event.getSource(); HTMLTable.Cell cell = tabs.getCellForEvent(event); String name = tabs.getCellFormatter().getStyleName(cell.getRowIndex(), cell.getCellIndex()); if (name != null && name.indexOf("unselected") != -1) panel.setSelected(Math.max(cell.getRowIndex() / 2, cell.getCellIndex() / 2)); } }
public Position(Cell cell) { this.column = cell.getCellIndex(); this.row = cell.getRowIndex(); }
public void onClick(ClickEvent event) { HTMLTable table = (HTMLTable) event.getSource(); HTMLTable.Cell cell = table.getCellForEvent(event); if (cell != null) { getListener().onCellClicked(table, cell.getRowIndex(), cell.getCellIndex()); } } }
public void onClick(ClickEvent event) { HTMLTable table = (HTMLTable) event.getSource(); HTMLTable.Cell cell = table.getCellForEvent(event); if (cell != null) { getListener().onCellClicked(table, cell.getRowIndex(), cell.getCellIndex()); } } }
public void onClick(ClickEvent event) { HTMLTable table = (HTMLTable) event.getSource(); HTMLTable.Cell cell = table.getCellForEvent(event); if (cell != null) { getListener().onCellClicked(table, cell.getRowIndex(), cell.getCellIndex()); } } }