Ejemplo n.º 1
0
 /**
  * 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()]);
 }
Ejemplo n.º 2
0
 /**
  * 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()]);
 }