/** * Returns all editors. * * @return editors */ EditorArea[] editors() { final ArrayList<EditorArea> edits = new ArrayList<EditorArea>(); for (final Component c : tabs.getComponents()) { if (c instanceof EditorArea) edits.add((EditorArea) c); } return edits.toArray(new EditorArea[edits.size()]); }
/** * Returns a single selected node or {@code null} if zero or more than node is selected. * * @return selected node */ private IOFile[] selectedValues() { // nothing selected: select first entry if (isSelectionEmpty() && getModel().getSize() != 0) setSelectedIndex(0); final ArrayList<IOFile> list = new ArrayList<>(); for (final String val : getSelectedValuesList()) list.add(new IOFile(val)); return list.toArray(new IOFile[list.size()]); }