Class Viewport

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, EventListener, Accessible, DockingConstants, DockingPort, DockingListener, DockingMonitor

public class Viewport extends DefaultDockingPort implements DockingConstants
Author:
Christopher Butler
See Also:
  • Field Details

    • blockedRegions

      protected HashSet blockedRegions
  • Constructor Details

    • Viewport

      public Viewport()
    • Viewport

      public Viewport(String portId)
  • Method Details

    • setRegionBlocked

      public void setRegionBlocked(String region, boolean isBlocked)
    • isDockingAllowed

      public boolean isDockingAllowed(Component comp, String region)
      Description copied from class: DefaultDockingPort
      Returns true if docking is allowed for the specified Component within the supplied region, false otherwise. It is important to note that success of a docking operation relies on many factors and a return value of true from this method does not necessarily guarantee that a call to dock() will succeed. This method merely indicates that the current DockingPort does not have any outstanding reason to block a docking operation with respect to the specified Component and region.

      If comp is null or region is invalid according to DockingManager.isValidDockingRegion(String region), then this method returns false.

      If this DockingPort is not already the parent DockingPort for the specified Component, then this method returns true.

      If this DockingPort is already the parent DockingPort for the specified Component, then a check is performed to see if there is a tabbed layout. Tabbed layouts may contain multiple Dockables, and thus the tab ordering may be rearranged, or shifted into a split layout. If comp is the only docked Component within this DockingPort, then this method returns false since the layout cannot be rearranged. Otherwise, this method returns true.

      Specified by:
      isDockingAllowed in interface DockingPort
      Overrides:
      isDockingAllowed in class DefaultDockingPort
      Parameters:
      comp - the Component whose docking availability is to be checked
      region - the region to be checked for docking availability for the specified Component.
      Returns:
      true if docking is allowed for the specified Component within the supplied region, false otherwise.
      See Also:
    • dock

      public boolean dock(Dockable dockable)
    • createTabbedPane

      protected JTabbedPane createTabbedPane()
      Description copied from class: DefaultDockingPort
      If this method returns null, implementations may throw NullPointerExceptions. Do not expect NPE checking.
      Overrides:
      createTabbedPane in class DefaultDockingPort
      Returns:
      a valid JTabbedPane.
    • getViewset

      public Set getViewset()
    • getViewset

      public Set getViewset(int depth)
    • paramString

      protected String paramString()
      Overrides:
      paramString in class JPanel