Interface EditorViewModel

All Known Implementing Classes:
DefaultEditorViewModel

public interface EditorViewModel

View model for the SessionEditor. This class is responsible for creating and placing any EditorViews.

  • Method Details

    • cleanup

      void cleanup()
      Remove all view references and cleanup resources.
    • getRoot

      Container getRoot()
      Get the view root for the editor. This is the component that will be displayed in the root pane of the editor window.
      Returns:
      the root container for the editor
    • getView

      EditorView getView(String viewName)
      Get the view specified by the given name.
      Parameters:
      viewName -
      Returns:
      specified editor view or null if view was not found
    • getDynamicView

      JComponent getDynamicView(String viewName)
      Get dynamic view component with the given name. This method is used for getting references to components displayed with the showDynamicFloatingDockable(String, JComponent, int, int, int, int) method.
      Parameters:
      viewName -
      Returns:
      specified view component or null if view was not found
    • getViewIcon

      ImageIcon getViewIcon(String viewName)
      Get the icon associated with the view. This information comes from the view itself if the view is loaded, otherwise information is obtained from the EditorViewInfo annotation on the extension point.
      Returns:
      view icon
    • getViewNames

      Set<String> getViewNames()
      Get the list of view names handeled by this model
      Returns:
      list of available view names
    • getViewsByCategory

      Map<EditorViewCategory,List<String>> getViewsByCategory()
      Get the set of available views organized by category.
      Returns:
      editor views by category
    • showView

      void showView(String viewName)
      Show the specified view.
      Parameters:
      viewName -
    • getFocusedView

      EditorView getFocusedView()
      Get currently focused view
      Parameters:
      focused - view or null
    • getCloseAction

      Action getCloseAction(String viewView)
      Get the close action for a view
      Parameters:
      viewName -
      Returns:
      the close action for the view
    • isShowing

      boolean isShowing(String viewName)
      Is the specified view showing in the current layout.
      Returns:
      true if the given view is part of the current dock control, false otherwise
    • isShowingInStack

      boolean isShowingInStack(String viewName)
      Is the specified view top-most in its stack.
      Returns:
      true if the view is showing and topmost in its stack
    • showDynamicFloatingDockable

      void showDynamicFloatingDockable(String title, JComponent comp, int x, int y, int w, int h)
      Show the specified view as a new dynamic floating view. These views are not saved in layouts.
      Parameters:
      title -
      comp -
      x -
      y -
      w -
      h -
    • hideView

      void hideView(String viewName)
      Hide the specified view
      Parameters:
      viewName -
    • setupWindows

      void setupWindows(RecordEditorPerspective editorPerspective)
      Setup windows using the given perspective
      Parameters:
      editorPerspective -
    • applyPerspective

      void applyPerspective(RecordEditorPerspective editorPerspective)
      Setup views based on the given perspective
      Parameters:
      editorPerspective -
    • savePerspective

      void savePerspective(RecordEditorPerspective editorPerspective)
      Save the current view perspective as the specified editor perspective
      Parameters:
      editorPerspective -
    • removePrespective

      void removePrespective(RecordEditorPerspective editorPerspective)
      Remove prespective from dock control
      Parameters:
      editorPerspective -
    • setupViewMenu

      void setupViewMenu(MenuElement menuElement)
      Setup view menu
      Parameters:
      menuElement -
    • setupPerspectiveMenu

      void setupPerspectiveMenu(MenuElement menuElement)
      Setup perspective menu.
      Parameters:
      menuElement -
    • setupLayoutMenu

      void setupLayoutMenu(MenuElement menuElement)
      Setup layout menu.
      Parameters:
      menuElement -