public void onBeforeSelection(BeforeSelectionEvent<Integer> bse) { buttonClicked = true; TabBar tb = (TabBar) bse.getSource(); cSelIdx = tb.getSelectedTab(); int selIdx = bse.getItem(); TabHolder th = findTab(selIdx, tb); if (!th.button.isUseDropdown()) { th.button.activate(); bse.cancel(); } else { dropdown.clearHeaderBar(); } }
public static <T> CellBeforeSelectionEvent<T> fire( HandlerManager manager, Context context, T item) { if (manager.isEventHandled(BeforeSelectionEvent.getType())) { CellBeforeSelectionEvent<T> event = new CellBeforeSelectionEvent<T>(context, item); event.setItem(item); if (manager != null) { manager.fireEvent(event); } return event; } return null; }