private ToolList get_tools(String s) { ToolList line_tools = new ToolList(); String tools = remove_control_character(s); for (String tool : parse_tool_line(tools)) { line_tools.add(Tool.find_or_create(tool)); } return line_tools; }
public ToolList get_tools() { if (tools == null) { tools = new ToolList(); for (Job j : jobs.values()) { for (Tool t : j.getTools()) if (!tools.contains(t)) tools.add(t); } Collections.sort(tools); } return tools; }
/** * < Constructor > Constructor for class ToolBarView Registers the tools provided in the actions * list for display as ToolBar buttons. This constructor should not be used directly, but rather, * the factory method provided by the MiniDraw class should be used. * * <p>Only ToolControllers that are enabled, i.e. the tool is not null, are added to the ToolBar. * * @param actions Associated MiniDraw ToolControllers * @return Initialized ToolBarView */ ToolBarView(ToolList actions) { super(VERTICAL); ToolListIterator iter = actions.iterator(); while (iter.hasNext()) { Action a = (Action) iter.next(); if (a.isEnabled()) this.setLayout(new GridLayout(4, 2)); this.add(a); } // end tools left in list } // end __ ToolBarView( ToolList )