/** * 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 void onClick(ClickEvent clickEvent) { FlexTable table = (FlexTable) clickEvent.getSource(); 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() ); CellClickMng<T> clickMng = columns.get( cell.getCellIndex() ).clicks; if( clickMng != null ) return; CellInFlexTablePrinter pr = new CellInFlexTablePrinter( table, cell.getRowIndex(), cell.getCellIndex() );
if( cell != null && edition != null && (refMng.getRef( edition.editedObject ) == getRefAtRow( cell.getRowIndex() ) && edition.editedCol == cell.getCellIndex()) ) return; fHandled = beginEdit( cell.getRowIndex(), cell.getCellIndex() ); CellClickMng<T> clickMng = columns.get( cell.getCellIndex() ).clicks; if( clickMng != 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();
return; int cellIndex = cell.getCellIndex(); int rowIndex = cell.getRowIndex(); tableModel.setCurrentIndex(rowIndex);
/*************************************** * @see ClickHandler#onClick(ClickEvent) */ @Override public void onClick(ClickEvent rEvent) { if (aTagInput.isEnabled()) { if (bSelected) { if (getCellForEvent(rEvent).getCellIndex() == 1) { deleteSelectedTags(); } } else { if (!rEvent.isControlKeyDown()) { setTagsSelected(false); } setSelected(true); } } // prevent click handling in parent rEvent.stopPropagation(); }
/** * 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))); } } }); }
/*************************************** * @see ClickHandler#onClick(ClickEvent) */ @Override public void onClick(ClickEvent rEvent) { if (bWasResizeClick) { // button release at the end of a column resize causes click event bWasResizeClick = false; } else if (rTable.canHandleInput()) { Cell rCell = aHeaderTable.getCellForEvent(rEvent); if (rCell != null) { changeSorting(rCell.getCellIndex()); } } }
/** 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); } }
/** {@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); } }
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()); } } }
@UiHandler("header") void onTableHeaderClicked(ClickEvent event) { Cell cell = header.getCellForEvent(event); if (cell != null) { onTableHeaderClicked(cell.getCellIndex(), false); } }
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()); } } }