public void dispose() { // Dispose of the view if the content was successfully initialised. if (initialisedContent) { // Dispose of the actions that were successfully added to the view for (ViewAction action : addedViewActions) { try { action.dispose(); } catch (Exception e) { logger.warn("BAD ViewAction: (" + action.getClass().getSimpleName() + ") Exception on dispose: " + e.getMessage()); } } addedViewActions.clear(); // Dispose of our view component if (viewComponent != null) { try { viewComponent.dispose(); } catch (Exception e) { logger.warn("BAD ViewComponent: (" + viewComponent.getClass().getSimpleName() + ") Exception on dispose: " + e.getMessage()); } } } }
public ProtegeAction newInstance() throws InstantiationException, IllegalAccessException, ClassNotFoundException { ViewAction viewAction = (ViewAction) super.newInstance(); viewAction.putValue(AbstractAction.NAME, getName()); viewAction.putValue(AbstractAction.SHORT_DESCRIPTION, getToolTipText()); viewAction.setEditorKit(getEditorKit()); viewAction.setView(view); viewAction.setEditorKit(getEditorKit()); return viewAction; }
if (action.getValue(AbstractAction.SHORT_DESCRIPTION) == null) { action.putValue(AbstractAction.SHORT_DESCRIPTION, action.getValue(AbstractAction.NAME)); KeyStroke acceleratorKeyStroke = (KeyStroke) action.getValue(AbstractAction.ACCELERATOR_KEY); if (acceleratorKeyStroke != null) { String key = "Accelerator" + System.currentTimeMillis(); getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(acceleratorKeyStroke, key); getActionMap().put(key, action); action.putValue(AbstractAction.SHORT_DESCRIPTION, action.getValue(AbstractAction.SHORT_DESCRIPTION) + " (" + KeyEvent.getKeyModifiersText( acceleratorKeyStroke.getModifiers()) + " " + KeyEvent.getKeyText( acceleratorKeyStroke.getKeyCode()) + ")"); action.setView(this); action.setEditorKit(workspace.getEditorKit()); action.initialise(); addedViewActions.add(action);
if (action.getValue(AbstractAction.SHORT_DESCRIPTION) == null) { action.putValue(AbstractAction.SHORT_DESCRIPTION, action.getValue(AbstractAction.NAME)); KeyStroke acceleratorKeyStroke = (KeyStroke) action.getValue(AbstractAction.ACCELERATOR_KEY); if (acceleratorKeyStroke != null) { String key = "Accelerator" + System.currentTimeMillis(); getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(acceleratorKeyStroke, key); getActionMap().put(key, action); action.putValue(AbstractAction.SHORT_DESCRIPTION, action.getValue(AbstractAction.SHORT_DESCRIPTION) + " (" + KeyEvent.getKeyModifiersText( acceleratorKeyStroke.getModifiers()) + " " + KeyEvent.getKeyText( acceleratorKeyStroke.getKeyCode()) + ")"); action.setView(this); action.setEditorKit(workspace.getEditorKit()); action.initialise(); addedViewActions.add(action);
if (action.getValue(AbstractAction.SHORT_DESCRIPTION) == null) { action.putValue(AbstractAction.SHORT_DESCRIPTION, action.getValue(AbstractAction.NAME)); KeyStroke acceleratorKeyStroke = (KeyStroke) action.getValue(AbstractAction.ACCELERATOR_KEY); if (acceleratorKeyStroke != null) { String key = "Accelerator" + System.currentTimeMillis(); getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(acceleratorKeyStroke, key); getActionMap().put(key, action); action.putValue(AbstractAction.SHORT_DESCRIPTION, action.getValue(AbstractAction.SHORT_DESCRIPTION) + " (" + KeyEvent.getKeyModifiersText( acceleratorKeyStroke.getModifiers()) + " " + KeyEvent.getKeyText( acceleratorKeyStroke.getKeyCode()) + ")"); action.setView(this); action.setEditorKit(workspace.getEditorKit()); action.initialise(); addedViewActions.add(action);
public ProtegeAction newInstance() throws InstantiationException, IllegalAccessException, ClassNotFoundException { ViewAction viewAction = (ViewAction) super.newInstance(); viewAction.putValue(AbstractAction.NAME, getName()); viewAction.putValue(AbstractAction.SHORT_DESCRIPTION, getToolTipText()); viewAction.setEditorKit(getEditorKit()); viewAction.setView(view); viewAction.setEditorKit(getEditorKit()); return viewAction; }
public void dispose() { // Dispose of the view if the content was successfully initialised. if (initialisedContent) { // Dispose of the actions that were successfully added to the view for (ViewAction action : addedViewActions) { try { action.dispose(); } catch (Exception e) { logger.warn("BAD ViewAction: (" + action.getClass().getSimpleName() + ") Exception on dispose: " + e.getMessage()); } } addedViewActions.clear(); // Dispose of our view component if (viewComponent != null) { try { viewComponent.dispose(); } catch (Exception e) { logger.warn("BAD ViewComponent: (" + viewComponent.getClass().getSimpleName() + ") Exception on dispose: " + e.getMessage()); } } } }
public ProtegeAction newInstance() throws InstantiationException, IllegalAccessException, ClassNotFoundException { ViewAction viewAction = (ViewAction) super.newInstance(); viewAction.putValue(AbstractAction.NAME, getName()); viewAction.putValue(AbstractAction.SHORT_DESCRIPTION, getToolTipText()); viewAction.setEditorKit(getEditorKit()); viewAction.setView(view); viewAction.setEditorKit(getEditorKit()); return viewAction; }
public void dispose() { // Dispose of the view if the content was successfully initialised. if (initialisedContent) { // Dispose of the actions that were successfully added to the view for (ViewAction action : addedViewActions) { try { action.dispose(); } catch (Exception e) { logger.warn("BAD ViewAction: (" + action.getClass().getSimpleName() + ") Exception on dispose: " + e.getMessage()); } } addedViewActions.clear(); // Dispose of our view component if (viewComponent != null) { try { viewComponent.dispose(); } catch (Exception e) { logger.warn("BAD ViewComponent: (" + viewComponent.getClass().getSimpleName() + ") Exception on dispose: " + e.getMessage()); } } } }