/** Construct item for given node, specifying the action and whether to create the icon and name automatically. * @param node the node to represent * @param l the acceptor to decide whether to accept this node or not * @param setName <code>false</code> if the name and icon should not be set */ public MenuItem (Node node, NodeAcceptor l, boolean setName) { super (); this.node = node; this.action = l; if (setName) { initialize (this, node); } // [pnejedly] HelpCtx is now provided through HelpCtx.Provider // HelpCtx help = node.getHelpCtx (); // if (help != null && ! help.equals (HelpCtx.DEFAULT_HELP) && help.getHelpID () != null) // HelpCtx.setHelpIDString (this, help.getHelpID ()); }
/** Constructor that permits specification of the action on the node, * and permits overriding the name and icon of the menu. * * @param node node to represent * @param action action called when node selected * @param setName <code>true</code> to automatically set the name and icon of the item */ public Menu (final Node node, NodeAcceptor action, boolean setName) { this.node = node; this.action = action; if (setName) { MenuItem.initialize (this, node); HelpCtx help = node.getHelpCtx (); if (help != null && ! help.equals (HelpCtx.DEFAULT_HELP) && help.getHelpID () != null) HelpCtx.setHelpIDString (this, help.getHelpID ()); } }
/** Constructor that permits specification of the action on the node, * and permits overriding the name and icon of the menu. * * @param node node to represent * @param action action called when node selected * @param setName <code>true</code> to automatically set the name and icon of the item */ public Menu(final Node node, NodeAcceptor action, boolean setName) { this.node = node; this.action = action; if (setName) { MenuItem.initialize(this, node); HelpCtx help = node.getHelpCtx(); if ((help != null) && !help.equals(HelpCtx.DEFAULT_HELP) && (help.getHelpID() != null)) { HelpCtx.setHelpIDString(this, help.getHelpID()); } } }
/** Construct item for given node, specifying the action and whether to create the icon and name automatically. * @param node the node to represent * @param l the acceptor to decide whether to accept this node or not * @param setName <code>false</code> if the name and icon should not be set */ public MenuItem (Node node, NodeAcceptor l, boolean setName) { super (); this.node = node; this.action = l; if (setName) { initialize (this, node); } // [pnejedly] HelpCtx is now provided through HelpCtx.Provider // HelpCtx help = node.getHelpCtx (); // if (help != null && ! help.equals (HelpCtx.DEFAULT_HELP) && help.getHelpID () != null) // HelpCtx.setHelpIDString (this, help.getHelpID ()); }
/** Construct item for given node, specifying the action and whether to create the icon and name automatically. * @param node the node to represent * @param l the acceptor to decide whether to accept this node or not * @param setName <code>false</code> if the name and icon should not be set */ public MenuItem(Node node, NodeAcceptor l, boolean setName) { super(); this.node = node; this.action = l; if (setName) { initialize(this, node); } // [pnejedly] HelpCtx is now provided through HelpCtx.Provider // HelpCtx help = node.getHelpCtx (); // if (help != null && ! help.equals (HelpCtx.DEFAULT_HELP) && help.getHelpID () != null) // HelpCtx.setHelpIDString (this, help.getHelpID ()); }
/** Constructor that permits specification of the action on the node, * and permits overriding the name and icon of the menu. * * @param node node to represent * @param action action called when node selected * @param setName <code>true</code> to automatically set the name and icon of the item */ public Menu (final Node node, NodeAcceptor action, boolean setName) { this.node = node; this.action = action; if (setName) { MenuItem.initialize (this, node); HelpCtx help = node.getHelpCtx (); if (help != null && ! help.equals (HelpCtx.DEFAULT_HELP) && help.getHelpID () != null) HelpCtx.setHelpIDString (this, help.getHelpID ()); } }