/** * @deprecated Use {@link BeforeSelectionHandler#onBeforeSelection} instead */ @Override @Deprecated public boolean onBeforeTabSelected(SourcesTabEvents sender, int tabIndex) { BeforeSelectionEvent<Integer> event = BeforeSelectionEvent.fire(this, tabIndex); return event == null || !event.isCanceled(); }
BeforeSelectionEvent<Integer> event = BeforeSelectionEvent.fire(this, index); if ((event != null) && event.isCanceled()) {
private void showWidget(int index, final int duration, boolean fireEvents) { checkIndex(index); if (index == selectedIndex) { return; } // Fire the before selection event, giving the recipients a chance to // cancel the selection. if (fireEvents) { BeforeSelectionEvent<Integer> event = BeforeSelectionEvent.fire(this, index); if ((event != null) && event.isCanceled()) { return; } } selectedIndex = index; if (isAttached()) { animate(duration); } // Fire the selection event. if (fireEvents) { SelectionEvent.fire(this, index); } } }
/** * Programmatically selects the specified tab. Use index -1 to specify that no * tab should be selected. * * @param index the index of the tab to be selected * @param fireEvents true to fire events, false not to * @return <code>true</code> if successful, <code>false</code> if the change * is denied by the {@link BeforeSelectionHandler}. */ public boolean selectTab(int index, boolean fireEvents) { checkTabIndex(index); if (fireEvents) { BeforeSelectionEvent<?> event = BeforeSelectionEvent.fire(this, index); if (event != null && event.isCanceled()) { return false; } } // Check for -1. setSelectionStyle(selectedTab, false); if (index == -1) { selectedTab = null; return true; } selectedTab = panel.getWidget(index + 1); setSelectionStyle(selectedTab, true); if (fireEvents) { SelectionEvent.fire(this, index); } return true; }
/** * @deprecated Use {@link BeforeSelectionHandler#onBeforeSelection} instead */ @Override @Deprecated public boolean onBeforeTabSelected(SourcesTabEvents sender, int tabIndex) { BeforeSelectionEvent<Integer> event = BeforeSelectionEvent.fire(this, tabIndex); return event == null || !event.isCanceled(); }
/** * @deprecated Use {@link BeforeSelectionHandler#onBeforeSelection} instead */ @Override @Deprecated public boolean onBeforeTabSelected(SourcesTabEvents sender, int tabIndex) { BeforeSelectionEvent<Integer> event = BeforeSelectionEvent.fire(this, tabIndex); return event == null || !event.isCanceled(); }
@Override public void selectTab(int index, boolean fireEvents) { if (fireEvents) { BeforeSelectionEvent<Integer> e = BeforeSelectionEvent.fire(this, index); if (e != null && e.isCanceled()) { return; } } selected = index; SelectionEvent.fire(this, index); }
/** * Sets the specified tab selected. * * @param index is an index of the tab for selection. */ public void setSelected(int index) { if (index != selected) { if (index >= tabs.size()) return; BeforeSelectionEvent<Integer> event = BeforeSelectionEvent.fire(this, index); if (event.isCanceled()) return; selected = index; renderTabs(); SelectionEvent.fire(this, index); resize(); } }
@Override public void onShow(TabShowEvent e) { if (e.getTab() != null) { final TabPanelEntry selected = tabPanel.findEntryForTabWidget(e.getTab()); BeforeSelectionEvent .fire(UberTabPanel.this, tabInvertedIndex.get(selected).getPresenter().getDefinition()); } } });
@Override public void onShow( final ShownEvent e ) { onResize(); if ( e.getRelatedTarget() != null ) { BeforeSelectionEvent.fire( UberTabPanel.this, tabInvertedIndex.get( e.getRelatedTarget() ).getPresenter().getDefinition() ); } } } );
@Override public void onShow(TabShowEvent e) { if (e.getTab() != null) { final TabPanelEntry selected = tabPanel.findEntryForTabWidget(e.getTab()); BeforeSelectionEvent .fire(UberTabPanel.this, tabInvertedIndex.get(selected).getPresenter().getDefinition()); } } });
BeforeSelectionEvent<Integer> event = BeforeSelectionEvent.fire(this, index); if ((event != null) && event.isCanceled()) {
BeforeSelectionEvent<Integer> event = BeforeSelectionEvent.fire(this, index); if ((event != null) && event.isCanceled()) {
} else { if (!suppressEvent) { BeforeSelectionEvent<Node> evt = BeforeSelectionEvent.fire(this, node); if (evt != null && evt.isCanceled()) { return;
BeforeSelectionEvent<Node> evt = BeforeSelectionEvent.fire(this, node); if (evt != null && evt.isCanceled()) { continue;
private void showWidget(int index, final int duration, boolean fireEvents) { checkIndex(index); if (index == selectedIndex) { return; } // Fire the before selection event, giving the recipients a chance to // cancel the selection. if (fireEvents) { BeforeSelectionEvent<Integer> event = BeforeSelectionEvent.fire(this, index); if ((event != null) && event.isCanceled()) { return; } } selectedIndex = index; if (isAttached()) { animate(duration); } // Fire the selection event. if (fireEvents) { SelectionEvent.fire(this, index); } } }
private void showWidget(int index, final int duration, boolean fireEvents) { checkIndex(index); if (index == selectedIndex) { return; } // Fire the before selection event, giving the recipients a chance to // cancel the selection. if (fireEvents) { BeforeSelectionEvent<Integer> event = BeforeSelectionEvent.fire(this, index); if ((event != null) && event.isCanceled()) { return; } } selectedIndex = index; if (isAttached()) { animate(duration); } // Fire the selection event. if (fireEvents) { SelectionEvent.fire(this, index); } } }
/** * Programmatically selects the specified tab. Use index -1 to specify that no * tab should be selected. * * @param index the index of the tab to be selected * @param fireEvents true to fire events, false not to * @return <code>true</code> if successful, <code>false</code> if the change * is denied by the {@link BeforeSelectionHandler}. */ public boolean selectTab(int index, boolean fireEvents) { checkTabIndex(index); if (fireEvents) { BeforeSelectionEvent<?> event = BeforeSelectionEvent.fire(this, index); if (event != null && event.isCanceled()) { return false; } } // Check for -1. setSelectionStyle(selectedTab, false); if (index == -1) { selectedTab = null; return true; } selectedTab = panel.getWidget(index + 1); setSelectionStyle(selectedTab, true); if (fireEvents) { SelectionEvent.fire(this, index); } return true; }
/** * Programmatically selects the specified tab. Use index -1 to specify that no * tab should be selected. * * @param index the index of the tab to be selected * @param fireEvents true to fire events, false not to * @return <code>true</code> if successful, <code>false</code> if the change * is denied by the {@link BeforeSelectionHandler}. */ public boolean selectTab(int index, boolean fireEvents) { checkTabIndex(index); if (fireEvents) { BeforeSelectionEvent<?> event = BeforeSelectionEvent.fire(this, index); if (event != null && event.isCanceled()) { return false; } } // Check for -1. setSelectionStyle(selectedTab, false); if (index == -1) { selectedTab = null; return true; } selectedTab = panel.getWidget(index + 1); setSelectionStyle(selectedTab, true); if (fireEvents) { SelectionEvent.fire(this, index); } return true; }
BeforeSelectionEvent<M> event = BeforeSelectionEvent.fire(this, item);