Class View

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class View extends DockingWindow

A view is a docking window containing a component.

A view can also contain a title bar that can be shown on either side of the view component. The title bar is made visible by setting the visible property in the ViewTitleBarProperties in the ViewProperties for this view. The title bar automatically inherits the view's title and icon but it's possible to specify a specific title and icon for the title bar in the ViewTitleBarProperties in the ViewProperties for this view.

See Also:
  • Constructor Details

    • View

      public View(String title, Icon icon, Component component)
      Constructor.
      Parameters:
      title - the title of the view
      icon - the icon for the view
      component - the component to place inside the view
  • Method Details

    • getCustomTabComponents

      public List getCustomTabComponents()

      Returns a list containing the custom window tab components. Changes to the list will be propagated to the tab.

      The custom tab components will be shown after the window title when the window tab is highlighted. The components are shown in the same order as they appear in the list. The custom tab components container layout is rotated with the tab direction.

      Returns:
      a list containing the custom tab components, list elements are of type JComponent
      Since:
      IDW 1.3.0
    • getCustomTitleBarComponents

      public List getCustomTitleBarComponents()

      Returns a list containing the custom view title bar components. Changes to the list will be propagated to the title bar.

      The custom title bar components will be shown after the view title in the title bar but before the close, minimize and restore buttons. The components are shown in the same order as they appear in the list. The custom title bar components container layout is rotated with the title bar direction.

      Note: The components are only shon if the title bar is visible, see ViewTitleBarProperties.

      Returns:
      a list containing the custom title bar components, list elements are of type JComponent
      Since:
      IDW 1.4.0
    • getComponent

      public Component getComponent()
      Gets the component inside the view.
      Returns:
      the component inside the view
      Since:
      IDW 1.1.0
    • setComponent

      public void setComponent(Component component)
      Sets the component inside the view.
      Overrides:
      setComponent in class BasePanel
      Parameters:
      component - the component to place inside the view
      Since:
      IDW 1.1.0
    • getViewProperties

      public ViewProperties getViewProperties()
      Returns the property values for this view.
      Returns:
      the property values for this view
    • update

      protected void update()
      Specified by:
      update in class DockingWindow
    • getChildWindow

      public DockingWindow getChildWindow(int index)
      Description copied from class: DockingWindow
      Returns the child window with index index.
      Specified by:
      getChildWindow in class DockingWindow
      Parameters:
      index - the child window index
      Returns:
      the child window
    • getChildWindowCount

      public int getChildWindowCount()
      Description copied from class: DockingWindow
      Returns the number of child windows.
      Specified by:
      getChildWindowCount in class DockingWindow
      Returns:
      the number of child windows
    • isFocusCycleRoot

      public boolean isFocusCycleRoot()
      Overrides:
      isFocusCycleRoot in class Container
    • restoreFocus

      public void restoreFocus()
      Restores focus to the last focused child component or, if no child component has had focus, the first focusable component inside the view.
      Overrides:
      restoreFocus in class DockingWindow
      Since:
      IDW 1.1.0
    • getIcon

      public Icon getIcon()
      Description copied from class: DockingWindow
      Returns the icon for this window.
      Specified by:
      getIcon in class DockingWindow
      Returns:
      the icon
    • doReplace

      protected void doReplace(DockingWindow oldWindow, DockingWindow newWindow)
      Specified by:
      doReplace in class DockingWindow
    • doRemoveWindow

      protected void doRemoveWindow(DockingWindow window)
      Specified by:
      doRemoveWindow in class DockingWindow
    • write

      protected void write(ObjectOutputStream out, WriteContext context) throws IOException
      Throws:
      IOException
    • doAcceptDrop

      protected DropAction doAcceptDrop(Point p, DockingWindow window)
      Overrides:
      doAcceptDrop in class DockingWindow
    • acceptInteriorDrop

      protected DropAction acceptInteriorDrop(Point p, DockingWindow window)
      Overrides:
      acceptInteriorDrop in class DockingWindow
    • toString

      public String toString()
      Overrides:
      toString in class DockingWindow
    • setFocused

      protected void setFocused(boolean focused)
      Overrides:
      setFocused in class DockingWindow
    • rootChanged

      protected void rootChanged(RootWindow oldRoot, RootWindow newRoot)
      Overrides:
      rootChanged in class DockingWindow
    • getPropertyObject

      protected PropertyMap getPropertyObject()
      Specified by:
      getPropertyObject in class DockingWindow
    • createPropertyObject

      protected PropertyMap createPropertyObject()
      Specified by:
      createPropertyObject in class DockingWindow
    • needsTitleWindow

      protected boolean needsTitleWindow()
      Overrides:
      needsTitleWindow in class DockingWindow
    • updateButtonVisibility

      protected void updateButtonVisibility()
      Overrides:
      updateButtonVisibility in class DockingWindow
    • write

      protected void write(ObjectOutputStream out, WriteContext context, ViewWriter viewWriter) throws IOException
      Overrides:
      write in class DockingWindow
      Throws:
      IOException