/** Closes the support in AWT thread. */ public void run () { // loosing validity CloneableOpenSupport os = support (); if (os != null) { // mark the object as not being modified, so nobody // will ask for save env.unmarkModified (); os.close (false); } }
/** Finds current undo/redo. */ static UndoRedo getUndoRedo (){ TopComponent el = WindowManager.getDefault ().getRegistry ().getActivated (); return el == null ? UndoRedo.NONE : el.getUndoRedo (); }
/** * Selects parent container (if it is opened), but does not activate it */ public void requestVisible() { log("requestVisible()"); provider.requestVisible(); }
@Override public void clean() { TopComponent.getRegistry().removePropertyChangeListener(pcl); pcl = null; applicable = false; name = null; project = null; }
public void run () { CloneableTopComponent editor = openCloneableTopComponent(); editor.requestActive(); } });
protected TopComponent.Registry componentRegistry() { TopComponent.Registry reg = super.componentRegistry(); if (reg != null) { return reg; } else { return registry(); } }
/** * Checks if parent container is activated * @return true if parent container is activated */ public boolean isActivated() { log("isActivated()"); return provider.isActivated(); }
/** * Sets tool tip text for provided component * @param comp component for which title should be set * @param text component title */ public void setToolTipText(JComponent comp, String text) { log("setToolTipText()", comp, text); provider.setToolTipText(comp, text); }
/** * Activates parent container */ public void requestActive() { log("requestActive()"); provider.requestActive(); }
/** * Checks whether comp can be closed (e.g. if Close action should be * present in component popup menu) * @param comp component which should be closeable * @return true if component can be closed */ public boolean isCloseable(JComponent comp) { log("isCloseable()", comp); return provider.isCloseable(comp); }
/** * Sets toolbar actions for provided component * @param comp component for which actions should be set * @param toolbarActions toolbar actions for component */ public void setToolbarActions(JComponent comp, Action[] toolbarActions) { log("setToolbarActions()", comp, toolbarActions); provider.setToolbarActions(comp, toolbarActions); }
/** * Gets currently selected component in parent container * @return selected tab */ public JComponent getSelected() { log("getSelected()"); return provider.getSelected(); }
/** Finds current undo/redo. */ static UndoRedo getUndoRedo (){ TopComponent el = WindowManager.getDefault ().getRegistry ().getActivated (); return el == null ? UndoRedo.NONE : el.getUndoRedo (); }
/** Closes the support in AWT thread. */ public void run () { // loosing validity CloneableOpenSupport os = support (); if (os != null) { // mark the object as not being modified, so nobody // will ask for save env.unmarkModified (); os.close (false); } }