private ResultsToolbar() { bar = new JToolBar(); bar.setFloatable(false); bar.addSeparator(); Component newQuery = CallableSystemAction.get(NewQueryAction.class).getToolbarPresenter(); Component editQuery = CallableSystemAction.get(EditQueryAction.class).getToolbarPresenter(); Component prevQuery = CallableSystemAction.get(PrevQueryAction.class).getToolbarPresenter(); Component refresh = CallableSystemAction.get(RefreshAction.class).getToolbarPresenter(); bar.add(newQuery); bar.add(editQuery); bar.add(prevQuery); bar.addSeparator(); bar.add(refresh); }
@Override public Action[] getActions(final boolean b) { if (UserManagement.REFRESH_DISPATCHER.tasksInProgress() || UserManagement.ACTION_DISPATCHER.tasksInProgress()) { return new Action[] {CallableSystemAction.get(RefreshIndicatorAction.class)}; } else { Action removeGrpMbrShip = null; if (!((getParentNode() instanceof AllUsersNode) || (getParentNode() instanceof NoGroupUsersNode))) { removeGrpMbrShip = CallableSystemAction.get(RemoveGroupMembershipAction.class); } final Action refreshAction; if (DomainserverOptionsPanelController.isAutoRefresh()) { refreshAction = null; } else { refreshAction = CallableSystemAction.get(RefreshAction.class); } return new Action[] { CallableSystemAction.get(ChangeGroupBelongingWizardAction.class), removeGrpMbrShip, null, CallableSystemAction.get(CopyUserWizardAction.class), CallableSystemAction.get(DeleteUserAction.class), null, refreshAction }; } }
private void initComponents() { setLayout(new BorderLayout()); bar = new JToolBar(); bar.setFloatable(false); bar.addSeparator(); Component newQuery = CallableSystemAction.get(NewQueryAction.class).getToolbarPresenter(); Component editQuery = CallableSystemAction.get(EditQueryAction.class).getToolbarPresenter(); Component prevQuery = CallableSystemAction.get(PrevQueryAction.class).getToolbarPresenter(); Component refresh = CallableSystemAction.get(RefreshAction.class).getToolbarPresenter(); bar.add(newQuery); bar.add(editQuery); bar.add(prevQuery); bar.addSeparator(); bar.add(refresh); // add(ResultsToolbar.getDefault().getToolbar(), BorderLayout.NORTH); add(bar, BorderLayout.NORTH); lookup = new AbstractLookup(ic); associateLookup(new ProxyLookup(ExplorerUtils.createLookup(manager, getActionMap()), lookup)); }
// case change helper private static void doCaseChange(Case toChangeTo) { logger.log(Level.INFO, "Changing Case to: " + toChangeTo); if (toChangeTo != null) { // new case is open // clear the temp folder when the case is created / opened Case.clearTempFolder(); checkSubFolders(toChangeTo); // enable these menus CallableSystemAction.get(AddImageAction.class).setEnabled(true); CallableSystemAction.get(CaseCloseAction.class).setEnabled(true); CallableSystemAction.get(CasePropertiesAction.class).setEnabled(true); CallableSystemAction.get(CaseDeleteAction.class).setEnabled(true); // Delete Case menu if (toChangeTo.getRootObjectsCount() > 0) { // open all top components CoreComponentControl.openCoreWindows(); } else { // close all top components CoreComponentControl.closeCoreWindows(); } } else { // case is closed // close all top components first CoreComponentControl.closeCoreWindows(); // disable these menus CallableSystemAction.get(AddImageAction.class).setEnabled(false); // Add Image menu CallableSystemAction.get(CaseCloseAction.class).setEnabled(false); // Case Close menu CallableSystemAction.get(CasePropertiesAction.class) .setEnabled(false); // Case Properties menu CallableSystemAction.get(CaseDeleteAction.class).setEnabled(false); // Delete Case menu // clear pending notifications MessageNotifyUtil.Notify.clear(); Frame f = WindowManager.getDefault().getMainWindow(); f.setTitle(Case.getAppName()); // set the window name to just application name // try to force gc to happen System.gc(); System.gc(); } // log memory usage after case changed logger.log(Level.INFO, PlatformUtil.getAllMemUsageInfo()); }