/** Stops listening on all actions */ private void stopActions () { if (copyActionPerformer != null) { copyActionPerformer.setEnabled (false); cutActionPerformer.setEnabled (false); deleteActionPerformerConfirm.setEnabled (false); deleteActionPerformerNoConfirm.setEnabled (false); pasteActionPerformer.setEnabled (false); } }
/** Creates cut action * @param em explorer manager the action should be attached to * @return action that invokes cut on the explorer */ public static Action actionCut (ExplorerManager em) { return ExplorerManager.findExplorerActionsImpl (em).cutAction (); }
/** Activates copy/cut/paste actions. */ protected void componentActivated () { if (actions != null) { actions.attach (getExplorerManager ()); } }
/** Change in one of the lookups we delegate to */ public void resultChanged(LookupEvent ev) { updateLookups(tc.getSelectedNodes()); }
public void run() { //try to select dropped node(s) try { view.manager.setSelectedNodes(diffNodes); } catch( PropertyVetoException ex ) { //ignore } } });
protected void selectionChanged(Node[] nodes, ExplorerManager man) throws PropertyVetoException { if (nodes.length > 0) { man.setExploredContext(nodes[0]); } man.setSelectedNodes(nodes); }
/** Creates delete action * @param em explorer manager the action should be attached to * @param confirm true if a confirmation box should be displayed before actual deletion * @return action that invokes delete on the explorer */ public static Action actionDelete (ExplorerManager em, boolean confirm) { ExplorerActionsImpl impl = ExplorerManager.findExplorerActionsImpl (em); return impl.deleteAction (confirm); }
/** Creates paste action * @param em explorer manager the action should be attached to * @return action that invokes paste on the explorer */ public static Action actionPaste (ExplorerManager em) { return ExplorerManager.findExplorerActionsImpl (em).pasteAction (); }
/** Creates copy action * @param em explorer manager the action should be attached to * @return action that invokes copy on the explorer */ public static Action actionCopy (ExplorerManager em) { return ExplorerManager.findExplorerActionsImpl (em).copyAction (); }
/** Set the explored context. * The node selection will be cleared as well. * @param value the new node to explore, or <code>null</code> if none should be explored. * @throws IllegalArgumentException if the node is not within the current root context in the node hierarchy */ public final void setExploredContext(Node value) { setExploredContext(value, new Node[0]); }
/** Change in one of the lookups we delegate to */ public void resultChanged(LookupEvent ev) { updateLookups (tc.getSelectedNodes ()); }
/** Sets selected nodes and handles PropertyVetoException */ final void setSelectedNodes0(Node[] nodes) { try { setSelectedNodes(nodes); } catch (PropertyVetoException e) { } }
/** Stops listening on all actions */ private void stopActions () { if (copyActionPerformer != null) { copyActionPerformer.setEnabled (false); cutActionPerformer.setEnabled (false); deleteActionPerformerConfirm.setEnabled (false); deleteActionPerformerNoConfirm.setEnabled (false); pasteActionPerformer.setEnabled (false); } }
/** Creates cut action * @param em explorer manager the action should be attached to * @return action that invokes cut on the explorer */ public static Action actionCut (ExplorerManager em) { return ExplorerManager.findExplorerActionsImpl (em).cutAction (); }
/** Creates delete action * @param em explorer manager the action should be attached to * @param confirm true if a confirmation box should be displayed before actual deletion * @return action that invokes delete on the explorer */ public static Action actionDelete (ExplorerManager em, boolean confirm) { ExplorerActionsImpl impl = ExplorerManager.findExplorerActionsImpl (em); return impl.deleteAction (confirm); }
/** Creates paste action * @param em explorer manager the action should be attached to * @return action that invokes paste on the explorer */ public static Action actionPaste (ExplorerManager em) { return ExplorerManager.findExplorerActionsImpl (em).pasteAction (); }
/** Creates copy action * @param em explorer manager the action should be attached to * @return action that invokes copy on the explorer */ public static Action actionCopy (ExplorerManager em) { return ExplorerManager.findExplorerActionsImpl (em).copyAction (); }
/** Activates copy/cut/paste actions. */ protected void componentActivated () { if (actions != null) { actions.attach (getExplorerManager ()); } }
/** Change in one of the lookups we delegate to */ public void resultChanged(LookupEvent ev) { updateLookups (tc.getSelectedNodes ()); }
/** Called when the list changed selection and the explorer manager * should be updated. * @param nodes list of nodes that should be selected * @param em explorer manager * @exception PropertyVetoException if the manager does not allow the * selection */ protected void selectionChanged(Node[] nodes, ExplorerManager em) throws PropertyVetoException { em.setSelectedNodes(nodes); }