@Override public void requestFocus() { tb.requestFocus(); }
public void actionPerformed(ActionEvent e) { JTabbedPane pane = (JTabbedPane) e.getSource(); pane.requestFocus(); }
/** * Handles most menu action event for this application. * * @param evt the generated action event to be handled. */ public void actionPerformed(ActionEvent evt) { ProjectCompendium.APP.setWaitCursor(); Object source = evt.getSource(); if (source.equals(miStencilManagement)) { UIStencilDialog dlg = new UIStencilDialog(ProjectCompendium.APP, ProjectCompendium.APP.oStencilManager); UIUtilities.centerComponent(dlg, ProjectCompendium.APP); dlg.setVisible(true); } else if (source.equals(miLinkGroupManagement)) { UILinkManagementDialog dlg = new UILinkManagementDialog( ProjectCompendium.APP, ProjectCompendium.APP.oLinkGroupManager); UIUtilities.centerComponent(dlg, ProjectCompendium.APP); dlg.setVisible(true); } else if (source.equals(miLinkGroupDefault)) { ProjectCompendium.APP.oLinkGroupManager.createDefaultLinkGroup(); } else if (source.equals(miLinkGroupManagement)) { ProjectCompendium.APP.oLinkGroupManager.createDefaultLinkGroup(); ProjectCompendium.APP.oLinkGroupManager.refreshTree(); } else if (source.equals(miUsers)) ProjectCompendium.APP.onUsers(); else if (source.equals(miLinkedFilesFileBrowser)) ProjectCompendium.APP.onLinkedFilesBrowser(); else if (source.equals(miMeetingRecording)) { ProjectCompendium.APP.displayError( LanguageProperties.getString( LanguageProperties.MENUS_BUNDLE, "UIMenuTools.memeticMessage1")); // $NON-NLS-1$ } else if (source.equals(miMeetingUpload)) { } else if (source.equals(miCodes)) ProjectCompendium.APP.onCodes(); else if (source.equals(miShowCodes)) ProjectCompendium.APP.onShowCodes(); else if (source.equals(miHideCodes)) ProjectCompendium.APP.onHideCodes(); else if (source.equals(miShowScribblePad)) { ProjectCompendium.APP.onShowScribblePad(); miShowScribblePad.setEnabled(false); miHideScribblePad.setEnabled(true); miSaveScribblePad.setEnabled(true); miClearScribblePad.setEnabled(true); } else if (source.equals(miHideScribblePad)) { ProjectCompendium.APP.onHideScribblePad(); miShowScribblePad.setEnabled(true); miHideScribblePad.setEnabled(false); miSaveScribblePad.setEnabled(false); miClearScribblePad.setEnabled(false); } else if (source.equals(miSaveScribblePad)) ProjectCompendium.APP.onSaveScribblePad(); else if (source.equals(miClearScribblePad)) ProjectCompendium.APP.onClearScribblePad(); else if (source.equals(miProjectOptions)) { UIProjectOptionsDialog dialog = new UIProjectOptionsDialog(ProjectCompendium.APP, ProjectCompendium.APP.getModel()); dialog.setVisible(true); } else if (source.equals(miOptions)) { UIOptionsDialog dialog = new UIOptionsDialog(ProjectCompendium.APP); dialog.setVisible(true); } else if (source.equals(miFocusFrames)) { JDesktopPane pane = ProjectCompendium.APP.getDesktop(); JInternalFrame frame = pane.getSelectedFrame(); if (frame instanceof UIMapViewFrame) { UIMapViewFrame mapframe = (UIMapViewFrame) frame; mapframe.getViewPane().requestFocus(); } else if (frame instanceof UIListViewFrame) { UIListViewFrame listframe = (UIListViewFrame) frame; listframe.getUIList().getList().requestFocus(); } } else if (source.equals(miFocusTabs)) { JTabbedPane oTabbedPane = ProjectCompendium.APP.oTabbedPane; if (oTabbedPane.getTabCount() > 0) { oTabbedPane.requestFocus(); } } ProjectCompendium.APP.setDefaultCursor(); }