Class View

  • All Implemented Interfaces:
    java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.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:
    ViewProperties, ViewTitleBarProperties, Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class javax.swing.JPanel

        javax.swing.JPanel.AccessibleJPanel
      • Nested classes/interfaces inherited from class javax.swing.JComponent

        javax.swing.JComponent.AccessibleJComponent
      • Nested classes/interfaces inherited from class java.awt.Container

        java.awt.Container.AccessibleAWTContainer
      • Nested classes/interfaces inherited from class java.awt.Component

        java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
    • Field Summary

      • Fields inherited from class javax.swing.JComponent

        listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
      • Fields inherited from class java.awt.Component

        accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
      • Fields inherited from interface java.awt.image.ImageObserver

        ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
    • Constructor Summary

      Constructors 
      Constructor Description
      View​(java.lang.String title, javax.swing.Icon icon, java.awt.Component component)
      Constructor.
    • Constructor Detail

      • View

        public View​(java.lang.String title,
                    javax.swing.Icon icon,
                    java.awt.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 Detail

      • getCustomTabComponents

        public java.util.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 java.util.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 java.awt.Component getComponent()
        Gets the component inside the view.
        Returns:
        the component inside the view
        Since:
        IDW 1.1.0
      • setComponent

        public void setComponent​(java.awt.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
      • 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 java.awt.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 javax.swing.Icon getIcon()
        Description copied from class: DockingWindow
        Returns the icon for this window.
        Specified by:
        getIcon in class DockingWindow
        Returns:
        the icon
      • write

        protected void write​(java.io.ObjectOutputStream out,
                             WriteContext context)
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • write

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