Exemple #1
0
  /**
   * Returns all editors of the specified resource type currently open.
   *
   * @param resourceType A type of resource.
   * @return A list of the editors of this resource type currently open.
   */
  public ArrayList<AbstractEditorPanel> getEditors(ResourceType resourceType) {

    ArrayList<AbstractEditorPanel> editors = new ArrayList<AbstractEditorPanel>();
    for (int i = 0; i < getTabCount(); i++) {
      AbstractEditorPanel editor = (AbstractEditorPanel) getComponentAt(i);
      if (editor.getResourceType() == resourceType) {
        editors.add(editor);
      }
    }
    return editors;
  }