Class DefaultDockingPort
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- org.flexdock.docking.defaults.DefaultDockingPort
-
- All Implemented Interfaces:
java.awt.image.ImageObserver,java.awt.MenuContainer,java.io.Serializable,java.util.EventListener,javax.accessibility.Accessible,DockingConstants,DockingPort,DockingListener,DockingMonitor
- Direct Known Subclasses:
FloatingDockingPort,Viewport
public class DefaultDockingPort extends javax.swing.JPanel implements DockingPort, DockingConstants
This is aContainerthat implements theDockingPortinterface. It provides a default implementation ofDockingPortto allow ease of development within docking-enabled applications.The
DefaultDockingPorthandles docking in one of three ways. If the port is empty, then all incomingDockablesare docked to the CENTER region. If the port is not empty, then all incomingDockablesdocked to the CENTER region are embedded within aJTabbedPane. All incomingDockablesdocked to an outer region (NORTH, SOUTH, EAST, and WEST) of a non-empty port are placed into a split layout using aJSplitPane.For centrally docked
Components, the immediate child of theDefaultDockingPortmay or may not be aJTabbedPane. IfisSingleTabAllowed()returnstruefor the currentDefaultDockingPort, then the immediate child returned bygetDockedComponent()will return aJTabbedPaneinstance even if there is only oneDockableembedded within the port. If there is a singleDockablein the port, butisSingleTabAllowed()returnsfalse, thengetDockedComponent()will return theComponentthat backs the currently dockedDockable, returned by theDockable'sgetComponent()method.isSingleTabAllowed()is a scoped property that may apply to this port, all ports across the JVM, or all ports within a user defined scope.getDockedComponent()will return aJTabbedPaneat all times if there is more than one centrally dockedDockablewithin the port, and all dockedComponentswill reside within the tabbed pane.Components that are docked in the NORTH, SOUTH, EAST, or WEST regions are placed in a
JSplitPanesplitting the layout of theDockingPortbetween child components. Each region of theJSplitPanecontains a newDefaultDockingPort, which, in turn, contains the docked components. In this situation,getDockedComponent()will return aJSplitPanereference.A key concept that drives the
DefaultDockingPort, then, is the notion that thisDockingPortimplementation may only ever have one single child component, which may or may not be a wrapper for other child components. BecauseJSplitPanecontains childDefaultDockingPorts, each of thoseDefaultDockingPortsis available for further sub-docking operations.Since a
DefaultDockingPortmay only contain one child component, there is a container hierarchy to manage tabbed interfaces, split layouts, and sub-docking. As components are removed from this hierarchy, the hierarchy itself must be reevaluated. Removing a component from a childDefaultDockingPortwithin aJSplitPanerenders the childDefaultDockingPortunnecessary, which, in turn, renders the notion of splitting the layout with aJSplitPaneunnecessary (since there are no longer two components to split the layout between). Likewise, removing a child component from aJTabbedPanesuch that there is only one child left within theJTabbedPaneremoves the need for a tabbed interface to begin with.When the
DockingManagerremoves a component from aDockingPortviaDockingManager.undock(Dockable dockable)it uses a call toundock()on the currentDockingPort.undock()automatically handles the reevaluation of the container hierarchy to keep wrapper-container usage at a minimum. SinceDockingManagermakes this callback automatic, developers normally will not need to call this method explicitly. However, when removing a component from aDefaultDockingPortusing application code, developers should keep in mind to useundock()instead ofremove(). Border management after docking and undocking operations are accomplished using aBorderManager.setBorderManager()may be used to set the border manager instance and customize border management.- Author:
- Christopher Butler
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classDefaultDockingPort.PortLayout-
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
-
Nested classes/interfaces inherited from interface org.flexdock.docking.event.DockingListener
DockingListener.Stub
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.ArrayListdockingListeners-
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 org.flexdock.docking.DockingConstants
ACTIVE_WINDOW, BOTTOM, CENTER, CENTER_REGION, CLOSE_ACTION, DEFAULT_PERSISTENCE_KEY, DOCKING_ID, EAST_REGION, HEAVYWEIGHT_DOCKABLES, HORIZONTAL, LEFT, MOUSE_PRESSED, NORTH_REGION, PERMANENT_FOCUS_OWNER, PIN_ACTION, REGION, RIGHT, SOUTH_REGION, TOP, UNINITIALIZED, UNINITIALIZED_RATIO, UNKNOWN_REGION, UNSPECIFIED_SIBLING_PREF, VERTICAL, WEST_REGION
-
Fields inherited from interface org.flexdock.docking.DockingPort
INITIAL_TAB_POSITION
-
-
Constructor Summary
Constructors Constructor Description DefaultDockingPort()Creates a newDefaultDockingPortwith a persistent ID equal to theStringvalue of this a random UUID.DefaultDockingPort(java.lang.String id)Creates a newDefaultDockingPortwith the specified persistent ID.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.Componentadd(java.awt.Component comp)Overridden to set the currently docked component.java.awt.Componentadd(java.awt.Component comp, int index)Overridden to set the currently docked component.voidadd(java.awt.Component comp, java.lang.Object constraints)Overridden to set the currently docked component.voidadd(java.awt.Component comp, java.lang.Object constraints, int index)Overridden to set the currently docked component.java.awt.Componentadd(java.lang.String name, java.awt.Component comp)Overridden to set the currently docked component.voidaddDockingListener(DockingListener listener)Adds aDockingListenerto observe docking events for thisDockingPort.voidclear()Removes allDockablesfrom thisDockingPort.protected BorderManagercreateBorderManager()Creates a standard border manager for this docking port.protected java.awt.LayoutManagercreateLayout()protected javax.swing.JTabbedPanecreateTabbedPane()If this method returnsnull, implementations may throw NullPointerExceptions.booleandock(java.awt.Component comp, java.lang.String region)Docks the specified component within the specified region.booleandock(Dockable dockable, java.lang.String region)Docks the specifiedDockablewithin the specified region.voiddockingCanceled(DockingEvent evt)No operation.voiddockingComplete(DockingEvent evt)Requests activation for the newly docked Dockable.voiddragStarted(DockingEvent evt)No operation.voiddropStarted(DockingEvent evt)No operation.LayoutNodeexportLayout()Returns aLayoutNodecontaining metadata that describes the current layout contained within thisDefaultDockingPort.BorderManagergetBorderManager()Returns the currently intalledBorderManager.protected DockablegetCenterDockable()java.awt.ComponentgetComponent(java.lang.String region)Returns theComponentcurrently docked within the specifiedregion.DockablegetDockable(java.lang.String region)Returns theDockablecurrently docked within the specifiedregion.DockablegetDockableAt(java.awt.Point location)Returns the direct childDockablelocated at the specifiedPoint.java.util.SetgetDockables()Returns allDockablesdocked within thisDockingPortand all sub-DockingPorts.protected java.util.SetgetDockableSet(int depth, int level, java.lang.Class desiredClass)java.awt.ComponentgetDockedComponent()Returns the childComponentcurrently embedded within withDockingPort.DockingListener[]getDockingListeners()Returns an array of allDockingListenersadded to thisDockingPort.DockingPortPropertySetgetDockingProperties()Returns aDockingPortPropertySetinstance associated with thisDockingPort.DockingStrategygetDockingStrategy()Returns theDockingStrategyused by thisDockingPort.protected intgetInitTabPlacement()java.lang.StringgetPersistentId()Returns aStringidentifier that is unique toDockingPortswithin a JVM instance, but persistent across JVM instances.java.lang.StringgetRegion(java.awt.Point location)Returns the docking region within thisDockingPortthat contains the specifiedPoint.RegionCheckergetRegionChecker()Returns theRegionCheckercurrently used by thisDockingPort.voidimportLayout(LayoutNode node)Clears out the existing layout within thisDockingPortand reconstructs a new layout based upon the specifiedLayoutNode.voidinstallMaximizedDockable(Dockable dockable)Asks thisDockingPortto temporarily install the specifiedDockableand maximize its component.booleanisDockingAllowed(java.awt.Component comp, java.lang.String region)Returnstrueif docking is allowed for the specifiedComponentwithin the suppliedregion,falseotherwise.booleanisParentDockingPort(java.awt.Component comp)Indicates whether or not the specified component is docked somewhere within thisDefaultDockingPort.booleanisRoot()Returns a boolean indicating whether or not thisDockingPortis nested within anotherDockingPort.booleanisSingleTabAllowed()Returnstrueif single tabs are allowed within thisDockingPort,falseotherwise.booleanisTabsAsDragSource()Returnstrueif drag-to-dock support is enabled for tabs and their associatedDockables,falseotherwise.protected booleanisValidDockableChild(java.awt.Component c, java.lang.Class desiredClass)protected booleanisValidDockingRegion(java.lang.String region)voidpaint(java.awt.Graphics g)Overridden to provide enhancements during drag operations.voidreleaseForMaximization(Dockable dockable)Asks thisDockingPortto temporarily release its childDockablefor use by anotherDockingPortto achieve maximization.voidremove(int index)Overridden to decorate superclass method, keeping track of internal docked-component reference.voidremoveAll()Overridden to decorate superclass method, keeping track of internal docked-component reference.voidremoveDockingListener(DockingListener listener)Removes the specifiedDockingListenerfrom thisDockingPort.voidreturnFromMaximization()Notifies thisDockingPortthat theDockablepreviously released for maximization via a call toDockingPort.releaseForMaximization(Dockable)is now ready to be returned to its original state inside thisDockingPort.voidsetBorderManager(BorderManager mgr)Sets the currently installedBorderManager.voidsetDragInProgress(boolean inProgress)This method is used internally by the framework to notifyDefaultDockingPortswhether a drag operation is or is not currently in progress and should not be called by application-level developers.voidsetPersistentId(java.lang.String id)Sets the persisent ID to be used for thisDockingPort.voidsetRoot(boolean root)This method is used internally by the framework to notifyDefaultDockingPortswhether they are "root"DockingPortsaccording to the rules specified byisRoot()on theDockingPortinterface.voidsetSingleTabAllowed(boolean allowed)Sets the "single tab" property for thisDockingPort, allowing or disallowing a singleDockablewithin theDockingPortto appear within a tabbed layout.voidsetTabsAsDragSource(boolean enabled)Enables or disables drag support for docking operations on the tabs used within an embedded tabbed layout.booleanundock(java.awt.Component comp)Undocks the specifiedComponentand returns a boolean indicating the success of the operation.voidundockingComplete(DockingEvent evt)No operation.voidundockingStarted(DockingEvent evt)No operation.voiduninstallMaximizedDockable()Notifies thisDockingPortthat theDockablepreviously installed for maximization via a call toDockingPort.installMaximizedDockable(Dockable)should now be returned to its originalDockingPortand that thisDockingPortshould return to its original state from before the call toDockingPort.installMaximizedDockable(Dockable).protected voidupdateTab(Dockable dockable)-
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
-
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
-
Methods inherited from class java.awt.Container
addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.flexdock.docking.DockingPort
getClientProperty, putClientProperty
-
-
-
-
Constructor Detail
-
DefaultDockingPort
public DefaultDockingPort()
Creates a newDefaultDockingPortwith a persistent ID equal to theStringvalue of this a random UUID.- See Also:
UUID
-
DefaultDockingPort
public DefaultDockingPort(java.lang.String id)
Creates a newDefaultDockingPortwith the specified persistent ID. Ifidisnull, then theStringvalue of thisObject'shash code is used. The persistent ID will be the same value returned by invokinggetPersistentId()for thisDefaultDockingPort.- Parameters:
id- the persistent ID for the newDefaultDockingPortinstance.
-
-
Method Detail
-
createLayout
protected java.awt.LayoutManager createLayout()
-
createBorderManager
protected BorderManager createBorderManager()
Creates a standard border manager for this docking port.This method is called from the constructor.
- Returns:
- the border manager for this docking port.
-
add
public java.awt.Component add(java.awt.Component comp)
Overridden to set the currently docked component. Should not be called by application code.- Overrides:
addin classjava.awt.Container- Parameters:
comp- the component to be added
-
add
public java.awt.Component add(java.awt.Component comp, int index)Overridden to set the currently docked component. Should not be called by application code.- Overrides:
addin classjava.awt.Container- Parameters:
comp- the component to be addedindex- the position at which to insert the component, or-1to append the component to the end
-
add
public void add(java.awt.Component comp, java.lang.Object constraints)Overridden to set the currently docked component. Should not be called by application code.- Overrides:
addin classjava.awt.Container- Parameters:
comp- the component to be addedconstraints- an object expressing layout contraints for this component
-
add
public void add(java.awt.Component comp, java.lang.Object constraints, int index)Overridden to set the currently docked component. Should not be called by application code.- Overrides:
addin classjava.awt.Container- Parameters:
comp- the component to be addedconstraints- an object expressing layout contraints for thisindex- the position in the container's list at which to insert the component;-1means insert at the end
-
add
public java.awt.Component add(java.lang.String name, java.awt.Component comp)Overridden to set the currently docked component. Should not be called by application code.- Overrides:
addin classjava.awt.Container- Parameters:
name- the name of theComponentto be added.comp- theComponentto add.
-
isDockingAllowed
public boolean isDockingAllowed(java.awt.Component comp, java.lang.String region)Returnstrueif docking is allowed for the specifiedComponentwithin the suppliedregion,falseotherwise. It is important to note that success of a docking operation relies on many factors and a return value oftruefrom this method does not necessarily guarantee that a call todock()will succeed. This method merely indicates that the currentDockingPortdoes not have any outstanding reason to block a docking operation with respect to the specifiedComponentandregion.If
compisnullorregionis invalid according toDockingManager.isValidDockingRegion(String region), then this method returnsfalse.If this
DockingPortis not already the parentDockingPortfor the specifiedComponent, then this method returnstrue.If this
DockingPortis already the parentDockingPortfor the specifiedComponent, then a check is performed to see if there is a tabbed layout. Tabbed layouts may contain multipleDockables, and thus the tab ordering may be rearranged, or shifted into a split layout. Ifcompis the only dockedComponentwithin thisDockingPort, then this method returnsfalsesince the layout cannot be rearranged. Otherwise, this method returnstrue.- Specified by:
isDockingAllowedin interfaceDockingPort- Parameters:
comp- theComponentwhose docking availability is to be checkedregion- the region to be checked for docking availability for the specifiedComponent.- Returns:
trueif docking is allowed for the specifiedComponentwithin the suppliedregion,falseotherwise.- See Also:
DockingPort.isDockingAllowed(Component, String),DockingManager.isValidDockingRegion(String),isParentDockingPort(Component)
-
getRegion
public java.lang.String getRegion(java.awt.Point location)
Returns the docking region within thisDockingPortthat contains the specifiedPoint. Valid return values are those regions defined inDockingConstantsand includeNORTH_REGION,SOUTH_REGION,EAST_REGION,WEST_REGION,CENTER_REGION, andUNKNOWN_REGION.If
locationisnull, thenUNKNOWN_REGIONis returned.This method gets the
RegionCheckerfor thisDockingPortby callinggetRegionChecker(). It then attempts to locate theDockableat the specifiedlocationby callinggetDockableAt(Point location).This method defers processing to
getRegion(Component c, Point p)for the currentRegionChecker. If aDockablewas found at the specifiedPoint, then the location of thePointis translated to the coordinate system of theComponentfor the embeddedDockableand thatComponentand modifiedPointare passed intogetRegion(Component c, Point p)} for the currentRegionChecker. If noDockablewas found, then the specifiedPointis left unmodified and thisDockingPortand the suppliedPointare passed togetRegion(Component c, Point p)} for the currentRegionChecker.- Specified by:
getRegionin interfaceDockingPort- Parameters:
location- the location within thisDockingPortto examine for a docking region.- Returns:
- the docking region within this
DockingPortthat contains the specifiedPoint - See Also:
getRegionChecker(),getDockableAt(Point),Dockable.getComponent(),RegionChecker.getRegion(Component, Point)
-
getRegionChecker
public RegionChecker getRegionChecker()
Returns theRegionCheckercurrently used by thisDockingPort. This method retrieves theDockingPortPropertySetinstance for thisDockingPortby callinggetDockingProperties(). It then returns by invokinggetRegionChecker()on the resolvedDockingPortPropertySet.- Returns:
- the
RegionCheckercurrently used by thisDockingPort. - See Also:
getDockingProperties(),DockingPortPropertySet.getRegionChecker()
-
getDockableAt
public Dockable getDockableAt(java.awt.Point location)
Returns the direct childDockablelocated at the specifiedPoint. Iflocationisnull, or thisDockingPortis empty, then anullreference is returned.If this
DockingPortcontains a split layout, then any nestedDockableswill be within a sub-DockingPortand not a direct child of thisDockingPort. Therefore, ifgetDockedComponent()returns aJSplitPane, then this method will return anullreference.If this
DockingPortcontains a tabbed layout, then theJTabbedPanereturned bygetDockedComponent()will be checked for aDockableat the specifiedPoint.- Parameters:
location- the location within theDockingPortto test for aDockable.- Returns:
- the direct child
Dockablelocated at the specifiedPoint. - See Also:
getDockedComponent(),DockingManager.getDockable(Component),Container.getComponentAt(int x, int y)
-
getComponent
public java.awt.Component getComponent(java.lang.String region)
Returns theComponentcurrently docked within the specifiedregion.If this
DockingPorthas either a single childDockableor a tabbed layout, then the supplied region must beCENTER_REGIONor this method will return anullreference. If there is a single childDockable, then this method will return the sameComponentas returned bygetDockedComponent(). If there is a tabbed layout, then this method will return theComponentin the currently selected tab.If this
DockingPorthas a split layout, then a check forCENTER_REGIONwill return anullreference. For outer regions (NORTH_REGION,SOUTH_REGION,EAST_REGION, orWEST_REGION), the supplied region parameter must match the orientation of the embeddedJSplitPane. Thus for a vertically oriented split pane, checks forEAST_REGIONandWEST_REGIONwill return anullreference. Likewise, for a horizontally oriented split pane, checks forNORTH_REGIONandSOUTH_REGIONwill return anullreference.Outer regions are mapped to corresponding split pane regions.
NORTH_REGIONmaps to the split pane's top component,SOUTH_REGIONmaps to the bottom,EAST_REGIONmaps to the right, andWEST_REGIONmaps to the left. The sub-DockingPortfor the split pane region that corresponds to the specifiedregionparameter will be resolved and this method will return thatComponentretrieved by calling itsgetDockedComponent()method. Note that thegetDockedComponent()call to a sub-DockingPortimplies that theJTabbedPaneorJSplitPanefor the sub-port may be returned if the sub-port contains multipleDockables.If this
DockingPortis empty, then this method returns anullreference.- Specified by:
getComponentin interfaceDockingPort- Parameters:
region- the region to be checked for a dockedComponent- Returns:
- the
Componentdocked within the specified region. - See Also:
DockingPort.getComponent(String),getDockedComponent()
-
getDockable
public Dockable getDockable(java.lang.String region)
Returns theDockablecurrently docked within the specifiedregion. This method dispatches togetComponent(String region)to retrieve theComponentdocked within the specified region and returns its associatedDockableviaDockingManager.getDockable(Component comp).There are somewhat strict semantics associated with retrieving the
Componentin a particular docking region. API documentation forgetComponent(String region)should be referenced for a listing of the rule set. Ifregionis invalid according toDockingManager.isValidDockingRegion(String region), then this method returns anullreference.- Specified by:
getDockablein interfaceDockingPort- Parameters:
region- the region to be checked for a dockedDockable- Returns:
- the
Dockabledocked within the specified region. - See Also:
DockingPort.getDockable(String),getComponent(String),getDockedComponent(),DockingManager.getDockable(Component),DockingManager.isValidDockingRegion(String)
-
createTabbedPane
protected javax.swing.JTabbedPane createTabbedPane()
If this method returnsnull, implementations may throw NullPointerExceptions. Do not expect NPE checking.- Returns:
- a valid JTabbedPane.
-
updateTab
protected void updateTab(Dockable dockable)
-
getDockingStrategy
public DockingStrategy getDockingStrategy()
Returns theDockingStrategyused by thisDockingPort. This method dispatches togetDockingStrategy(Object obj), passingthisas an argument. By default,DefaultDockingStrategyis used unless a differentDockingStrategyhas been assigned by the end user forDefaultDockingPort.- Specified by:
getDockingStrategyin interfaceDockingPort- Returns:
- the
DockingStrategyused by thisDockingPort. - See Also:
DockingPort.getDockingStrategy(),DockingManager.getDockingStrategy(Object)
-
clear
public void clear()
Removes allDockablesfrom thisDockingPort. Internally, this method dispatches toremoveAll(). This ensures that not only dockedComponentsare removed, that that all wrapper containers such asJTabbedPanes,JSplitPanes, and sub-DockingPortsare removed as well.- Specified by:
clearin interfaceDockingPort- See Also:
DockingPort.clear(),removeAll()
-
dock
public boolean dock(java.awt.Component comp, java.lang.String region)Docks the specified component within the specified region. This method attempts to resolve theDockableassociated with the specifiedComponentby invokingDockingManager.getDockable(Component comp). Processing is then dispatched todock(Dockable dockable, String region).If no
Dockableis resolved for the specifiedComponent, then this method attempts to register theComponentas aDockableautomatically by callingDockingManager.registerDockable(Component comp).If either
comporregionregion arenull, then this method returnsfalse. Otherwise, this method returns a boolean indicating the success of the docking operation based upondock(Dockable dockable, String region).- Specified by:
dockin interfaceDockingPort- Parameters:
comp- theComponentto be docked within thisDockingPortregion- the region within thisDockingPortto dock the specifiedComponent- Returns:
trueif the docking operation was successful,falseotherwise.- See Also:
DockingPort.dock(Component, String),dock(Dockable, String),DockingManager.getDockable(Component),DockingManager.registerDockable(Component)
-
dock
public boolean dock(Dockable dockable, java.lang.String region)
Docks the specifiedDockablewithin the specified region. TheComponentused for docking is returned by callinggetComponent()on the specifiedDockable. This method returnsfalseimmediately if the specifiedDockableisnullor ifisDockingAllowed(Component comp, String region)returnsfalse.If this
DockingPortis currently empty, then theDockableis docked into theCENTER_REGION, regardless of the suppliedregionparameter's value.If
isSingleTabAllowed()returnsfalseand theDockingPortis emtpy, then theDockablewill be added directly to theDockingPortand will take up all available space within theDockingPort. In this case, subsequent calls togetDockedComponent()will return the dockableComponent.If
isSingleTabAllowed()returnstrueand theDockingPortis emtpy, then aJTabbedPanewill be added directly to theDockingPortand will take up all available space within theDockingPort. The dockableComponentwill be added as a tab within the tabbed pane. In this case, subsequent calls togetDockedComponent()will return theJTabbedPane.If the
DockingPortis not empty, and the specified region isCENTER_REGION, then the dockableComponentwill be added to theJTabbedPanereturned bygetDockedComponent(). If thisDockingPortonly contained a single dockableComponentwithout a tabbed pane, then the currently dockedComponentis removed, aJTabbedPaneis created and added, and both the oldComponentand the new one are added to theJTabbedPane. In this case, subsequent calls togetDockedComponent()will return theJTabbedPane.If the
DockingPortis not empty, and the specified region isNORTH_REGION,SOUTH_REGION,EAST_REGION, orWEST_REGION, then the currently dockedComponentis removed and replaced with aJSplitPane. Two newDefaultDockingPortsare created as sub-ports and are added to each side of theJSplitPane. The previously dockedComponentis docked to the CENTER_REGION of one of the sub-ports and the newComponentis added to the other. In this case, subsequent calls togetDockedComponent()will return theJSplitPane. In this fasion, the sub-ports will now be capable of handling further sub-docking within the layout.JSplitPaneand sub-DockingPortcreation are delegated to theDockingStrategyreturned bygetDockingStrategy(). Initial splitpane divider location is also controlled by thisDockingStrategy.- Specified by:
dockin interfaceDockingPort- Parameters:
dockable- theDockableto be docked within thisDockingPortregion- the region within thisDockingPortto dock the specifiedDockable- Returns:
trueif the docking operation was successful,falseotherwise.- See Also:
DockingPort.dock(Dockable, String),isDockingAllowed(Component, String),getDockedComponent(),getDockingStrategy(),DockingStrategy.createDockingPort(DockingPort),DockingStrategy.createSplitPane(DockingPort, String),DockingStrategy.getInitialDividerLocation(DockingPort, JSplitPane),DockingStrategy.getDividerProportion(DockingPort, JSplitPane)
-
getDockedComponent
public java.awt.Component getDockedComponent()
Returns the childComponentcurrently embedded within withDockingPort. If theDockingPortis empty, then this method returns anullreference. If there is a singleDockabledocked within it with no tabbed layout, then theComponentfor thatDockableis returned per itsgetComponent()method. If there is a tabbed layout present, then aJTabbedPaneis returned. If there is a split layout present, then aJSplitPaneis returned.- Specified by:
getDockedComponentin interfaceDockingPort- See Also:
DockingPort.getDockedComponent()
-
getPersistentId
public java.lang.String getPersistentId()
Returns aStringidentifier that is unique toDockingPortswithin a JVM instance, but persistent across JVM instances. This is used for configuration mangement, allowing the JVM to recognize aDockingPortinstance within an application instance, persist the ID, and recall it in later application instances. The ID should be unique within an appliation instance so that there are no collisions with otherDockingPortinstances, but it should also be consistent from JVM to JVM so that the association between aDockingPortinstance and its ID can be remembered from session to session.The value returned by this method will come from the most recent call to
setPersistentId(String id). IfsetPersistentId(String id)was invoked with anullargument, then theStringverion of thisDockingPort'shash code is used. Therefore, this method will never return anullreference.- Specified by:
getPersistentIdin interfaceDockingPort- Returns:
- the persistent ID for this
DockingPort - See Also:
DockingPort.getPersistentId(),setPersistentId(String),DockingManager.getDockingPort(String)
-
setPersistentId
public void setPersistentId(java.lang.String id)
Sets the persisent ID to be used for thisDockingPort. Ifidisnull, then theStringvalue of thisDockingPort'shash code is used.DockingPortsare tracked by persistent ID withinDockingManager. Whenever this method is called, theDockingManager'stracking mechanism is automatically upated for thisDockingPort.- Specified by:
setPersistentIdin interfaceDockingPort- Parameters:
id- the persistent ID to be used for thisDockingPort- See Also:
getPersistentId(),DockingManager.getDockingPort(String),DockingPortTracker.updateIndex(DockingPort)
-
isSingleTabAllowed
public boolean isSingleTabAllowed()
Returnstrueif single tabs are allowed within thisDockingPort,falseotherwise.Generally the tabbed interface does not appear until two or more
Dockablesare docked to theCENTER_REGIONof theDockingPortand tabs are required to switch between them. When there is only a singleDockablewithin theDockingPort, the default behavior for the dockableComponentto take up all of the space within theDockingPort.If this method returns
true, then a singleDockablewithin thisDockingPortwill reside within a tabbed layout that contains only one tab.The value returned by this method is a scoped property. This means there may be many different "scopes" at which the single-tab property may be set. For instance, a "global" setting may override the individual setting for this
DockingPort, and thisDockingPort'sparticular setting may override the global default setting.org.flexdock.docking.props.PropertyManagershould be referenced for further information on scoped properties.- Returns:
trueif single tabs are allowed within thisDockingPort,falseotherwise.- See Also:
setSingleTabAllowed(boolean),DockingManager.isSingleTabsAllowed(),DockingManager.setSingleTabsAllowed(boolean),PropertyManager,DockingPortPropertySet.isSingleTabsAllowed(),DockingPortPropertySet.setSingleTabsAllowed(boolean)
-
setSingleTabAllowed
public void setSingleTabAllowed(boolean allowed)
Sets the "single tab" property for thisDockingPort, allowing or disallowing a singleDockablewithin theDockingPortto appear within a tabbed layout.Generally the tabbed interface does not appear until two or more
Dockablesare docked to theCENTER_REGIONof theDockingPortand tabs are required to switch between them. When there is only a singleDockablewithin theDockingPort, the default behavior for the dockableComponentto take up all of the space within theDockingPort.If the single tab property is set to
true, then a singleDockablewithin thisDockingPortwill reside within a tabbed layout that contains only one tab.The single tab property is a scoped property. This means there may be many different "scopes" at which the single-tab property may be set. For instance, a "global" setting may override the individual setting for this
DockingPort, and thisDockingPort'sparticular setting may override the global default setting. This method applied a value only to the local scope for this particularDockingPort.org.flexdock.docking.props.PropertyManagershould be referenced for further information on scoped properties.- Parameters:
allowed-trueif a single-tabbed layout should be allowed,falseotherwise- See Also:
isSingleTabAllowed(),DockingManager.setSingleTabsAllowed(boolean),DockingManager.isSingleTabsAllowed(),PropertyManager,DockingPortPropertySet.setSingleTabsAllowed(boolean),DockingPortPropertySet.isSingleTabsAllowed()
-
isParentDockingPort
public boolean isParentDockingPort(java.awt.Component comp)
Indicates whether or not the specified component is docked somewhere within thisDefaultDockingPort. This method returnstrueif the specifiedComponentis a direct child of theDefaultDockingPortor is a direct child of aJTabbedPaneorJSplitPanethat is currently theDefaultDockingPort'sdocked component. Otherwise, this method returnsfalse. Ifcompisnull, then then this method returnfalse- Specified by:
isParentDockingPortin interfaceDockingPort- Parameters:
comp- the Component to be tested.- Returns:
- a boolean indicating whether or not the specified component is
docked somewhere within this
DefaultDockingPort. - See Also:
DockingPort.isParentDockingPort(java.awt.Component),Component.getParent(),getDockedComponent()
-
isValidDockingRegion
protected boolean isValidDockingRegion(java.lang.String region)
-
getCenterDockable
protected Dockable getCenterDockable()
-
remove
public void remove(int index)
Overridden to decorate superclass method, keeping track of internal docked-component reference.- Overrides:
removein classjava.awt.Container- Parameters:
index- the index of the component to be removed.- See Also:
Container.remove(int)
-
removeAll
public void removeAll()
Overridden to decorate superclass method, keeping track of internal docked-component reference.- Overrides:
removeAllin classjava.awt.Container- See Also:
Container.removeAll()
-
setBorderManager
public void setBorderManager(BorderManager mgr)
Sets the currently installedBorderManager. This method provides a means of customizing border managment following any successful call todock(Dockable dockable, String region)orundock(Component comp), allowing cleanup of borders for nestedComponentswithin the docking layout.nullvalues are allowed.- Parameters:
mgr- theBorderManagerassigned to to manage docked component borders.- See Also:
getBorderManager(),BorderManager
-
getBorderManager
public BorderManager getBorderManager()
Returns the currently intalledBorderManager. TheBorderManageris used any time a successful call todock(Dockable dockable, String region)orundock(Component comp)has been issued to clean up borders for nestedComponentswithin the docking layout. This method will return anullreference if there is noBorderManagerinstalled.- Returns:
- the currently installed
BorderManager. - See Also:
setBorderManager(BorderManager),BorderManager
-
undock
public boolean undock(java.awt.Component comp)
Undocks the specifiedComponentand returns a boolean indicating the success of the operation.Since
DefaultDockingPortmay only contain one child component, there i s a container hierarchy to manage tabbed interfaces, split layouts, and sub-docking. As components are removed from this hierarchy, the hierarchy itself must be reevaluated. Removing a component from a child code>DefaultDockingPort} within aJSplitPanerenders the childDefaultDockingPortunnecessary, which, in turn, renders the notion of splitting the layout with aJSplitPaneunnecessary (since there are no longer two components to split the layout between). Likewise, removing a child component from aJTabbedPanesuch that there is only one child left within theJTabbedPaneremoves the need for a tabbed interface to begin with.This method automatically handles the reevaluation of the container hierarchy to keep wrapper-container usage at a minimum. Since
DockingManagermakes this callback automatic, developers normally will not need to call this method explicitly. However, when removing a component from aDefaultDockingPortusing application code, developers should keep in mind to use this method instead ofremove().- Specified by:
undockin interfaceDockingPort- Parameters:
comp- theComponentto be undocked.- Returns:
- a boolean indicating the success of the operation
- See Also:
DockingPort.undock(Component comp),DockingManager.undock(Dockable)
-
getDockables
public java.util.Set getDockables()
Returns allDockablesdocked within thisDockingPortand all sub-DockingPorts. The returnedSetwill containDockableinstances. If there are noDockablespresent, an emptySetwill be returned. This method will never return anullreference.- Specified by:
getDockablesin interfaceDockingPort- Returns:
- all
Dockablesdocked within thisDockingPortand all sub-DockingPorts. - See Also:
DockingPort.getDockables()
-
getDockableSet
protected java.util.Set getDockableSet(int depth, int level, java.lang.Class desiredClass)
-
isValidDockableChild
protected boolean isValidDockableChild(java.awt.Component c, java.lang.Class desiredClass)
-
addDockingListener
public void addDockingListener(DockingListener listener)
Adds aDockingListenerto observe docking events for thisDockingPort.nullarguments are ignored.- Specified by:
addDockingListenerin interfaceDockingMonitor- Parameters:
listener- theDockingListenerto add to thisDockingPort.- See Also:
DockingMonitor.addDockingListener(DockingListener),getDockingListeners(),removeDockingListener(DockingListener)
-
getDockingListeners
public DockingListener[] getDockingListeners()
Returns an array of allDockingListenersadded to thisDockingPort. If there are no listeners present for thisDockingPort, then a zero-length array is returned.- Specified by:
getDockingListenersin interfaceDockingMonitor- Returns:
- an array of all
DockingListenersadded to thisDockingPort. - See Also:
DockingMonitor.getDockingListeners(),addDockingListener(DockingListener),removeDockingListener(DockingListener)
-
removeDockingListener
public void removeDockingListener(DockingListener listener)
Removes the specifiedDockingListenerfrom thisDockingPort. If the specifiedDockingListenerisnull, or the listener has not previously been added to thisDockingPort, then noExceptionis thrown and no action is taken.- Specified by:
removeDockingListenerin interfaceDockingMonitor- Parameters:
listener- theDockingListenerto remove from thisDockingPort- See Also:
DockingMonitor.removeDockingListener(DockingListener),addDockingListener(DockingListener),getDockingListeners()
-
dockingCanceled
public void dockingCanceled(DockingEvent evt)
No operation. Provided as a method stub to fulfull theDockingListenerinterface contract.- Specified by:
dockingCanceledin interfaceDockingListener- Parameters:
evt- theDockingEventto respond to.- See Also:
DockingListener.dockingCanceled(DockingEvent)
-
dockingComplete
public void dockingComplete(DockingEvent evt)
Requests activation for the newly docked Dockable.- Specified by:
dockingCompletein interfaceDockingListener- Parameters:
evt- theDockingEventto respond to.- See Also:
DockingListener.dockingComplete(DockingEvent)
-
dragStarted
public void dragStarted(DockingEvent evt)
No operation. Provided as a method stub to fulfull theDockingListenerinterface contract.- Specified by:
dragStartedin interfaceDockingListener- Parameters:
evt- theDockingEventto respond to.- See Also:
DockingListener.dragStarted(DockingEvent)
-
dropStarted
public void dropStarted(DockingEvent evt)
No operation. Provided as a method stub to fulfull theDockingListenerinterface contract.- Specified by:
dropStartedin interfaceDockingListener- Parameters:
evt- theDockingEventto respond to.- See Also:
DockingListener.dropStarted(DockingEvent)
-
undockingComplete
public void undockingComplete(DockingEvent evt)
No operation. Provided as a method stub to fulfull theDockingListenerinterface contract.- Specified by:
undockingCompletein interfaceDockingListener- Parameters:
evt- theDockingEventto respond to.- See Also:
DockingListener.undockingComplete(DockingEvent)
-
undockingStarted
public void undockingStarted(DockingEvent evt)
No operation. Provided as a method stub to fulfull theDockingListenerinterface contract.- Specified by:
undockingStartedin interfaceDockingListener- Parameters:
evt- theDockingEventto respond to.- See Also:
DockingListener.undockingStarted(DockingEvent)
-
getDockingProperties
public DockingPortPropertySet getDockingProperties()
Returns aDockingPortPropertySetinstance associated with thisDockingPort. This method returns the default implementation supplied by the framework by invokinggetDockingPortPropertySet(DockingPort port)onorg.flexdock.docking.props.PropertyManagerand supplying an argument ofthis.- Specified by:
getDockingPropertiesin interfaceDockingPort- Returns:
- the
DockingPortPropertySetassociated with thisDockingPort. This method will not return anullreference. - See Also:
DockingPortPropertySet,DockingPort.getDockingProperties(),PropertyManager.getDockingPortPropertySet(DockingPort)
-
setTabsAsDragSource
public void setTabsAsDragSource(boolean enabled)
Enables or disables drag support for docking operations on the tabs used within an embedded tabbed layout. If tab-drag-source is enabled, then the tab that corresponds to aDockablewithin an embedded tabbed layout will respond to drag events as if the tab were a component included within theListreturned by callinggetDragSources()on theDockable. This allows dragging a tab to initiate drag-to-dock operations.- Parameters:
enabled-trueif drag-to-dock support should be enabled for tabs and their associatedDockables,falseotherwise.- See Also:
isTabsAsDragSource(),Dockable.getDragSources()
-
isTabsAsDragSource
public boolean isTabsAsDragSource()
Returnstrueif drag-to-dock support is enabled for tabs and their associatedDockables,falseotherwise. If tab-drag-source is enabled, then the tab that corresponds to aDockablewithin an embedded tabbed layout will respond to drag events as if the tab were a component included within theListreturned by callinggetDragSources()on theDockable. This allows dragging a tab to initiate drag-to-dock operations.- Returns:
trueif drag-to-dock support is enabled for tabs and their associatedDockables,falseotherwise.- See Also:
setTabsAsDragSource(boolean),Dockable.getDragSources()
-
getInitTabPlacement
protected int getInitTabPlacement()
-
isRoot
public boolean isRoot()
Returns a boolean indicating whether or not thisDockingPortis nested within anotherDockingPort. If there are no otherDockingPortswithin thisDockingPort'scontainer ancestor hierarchy, then this method will returntrue. Otherwise, this method will returnfalse. If the thisDockingPortis not validated and/or is not part of a container hierarchy, this method should returntrue.- Specified by:
isRootin interfaceDockingPort- Returns:
falseif thisDockingPortis nested within anotherDockingPort,trueotherwise.- See Also:
DockingPort.isRoot()
-
setRoot
public void setRoot(boolean root)
This method is used internally by the framework to notifyDefaultDockingPortswhether they are "root"DockingPortsaccording to the rules specified byisRoot()on theDockingPortinterface. This method should not be called by application-level developers. It will most likely be removed in future versions and the logic contained herein will be managed by some type of change listener.- Parameters:
root-trueif this is a "root"DockingPort,falseotherwise.- See Also:
isRoot(),DockingPort.isRoot()
-
setDragInProgress
public void setDragInProgress(boolean inProgress)
This method is used internally by the framework to notifyDefaultDockingPortswhether a drag operation is or is not currently in progress and should not be called by application-level developers. It will most likely be removed in future versions and the logic contained herein will be managed by some type of change listener.- Parameters:
inProgress-trueif a drag operation involving thisDockingPortis currently in progress,falseotherwise.
-
paint
public void paint(java.awt.Graphics g)
Overridden to provide enhancements during drag operations. SomeDragPreviewimplementations may by able to supply aBufferedImagefor thisDockingPortto use for painting operations. This may be useful for cases in which the dimensions of dockedComponentsare altered in realtime during the drag operation to provide a "ghost" image for theDragPreview. In this case, visual feedback for altered subcomponents within thisDockingPortmay be blocked in favor of a temporaryBufferedImagefor the life of the drag operation.- Overrides:
paintin classjavax.swing.JComponent- Parameters:
g- theGraphicscontext in which to paint- See Also:
JComponent.paint(java.awt.Graphics)
-
exportLayout
public LayoutNode exportLayout()
Returns aLayoutNodecontaining metadata that describes the current layout contained within thisDefaultDockingPort. TheLayoutNodereturned by this method will be aDockingPortNodethat constitutes the root of a tree structure containing variousDockingNodeimplementations; specificallySplitNode,DockableNode, andDockingPortNode. Each of these nodes isSerializable, implying theLayoutNodeitself may be written to external storage and later reloaded into thisDockingPortviaimportLayout(LayoutNode node).- Specified by:
exportLayoutin interfaceDockingPort- Returns:
- a
LayoutNoderepresenting the current layout state within thisDockingPort - See Also:
DockingPort.importLayout(LayoutNode),importLayout(LayoutNode),LayoutManager.createLayout(DockingPort),LayoutNode,DockingNode,DockingPortNode,SplitNode,DockableNode
-
importLayout
public void importLayout(LayoutNode node)
Clears out the existing layout within thisDockingPortand reconstructs a new layout based upon the specifiedLayoutNode.At present, this method can only handle
LayoutNodesthat have been generated byDefaultDockingPort'sexportLayout()method. If the specifiedLayoutNodeisnullor is otherwise not an instance ofDockingPortNode, then this method returns immediately with no action taken.Otherwise, the necessary
Dockablesare docked within thisDockingPortand all subsequently generated sub-DockingPortsin a visual configuration mandated by the tree structure modeled by the specifiedLayoutNode.- Specified by:
importLayoutin interfaceDockingPort- Parameters:
node- theLayoutNodewhose layout is to be instantiated within thisDockingPort- See Also:
DockingPort.importLayout(LayoutNode),exportLayout(),LayoutNode,DockingNode,DockingPortNode,SplitNode,DockableNode
-
installMaximizedDockable
public void installMaximizedDockable(Dockable dockable)
Description copied from interface:DockingPortAsks thisDockingPortto temporarily install the specifiedDockableand maximize its component. This method is called byDockingManagerin the course of maximizing aDockable. Client code should not call this method directly.This
DockingPortis expected to display the specified dockable's component such that it occupies all (or the majority) of its screen resources. Also, thisDockingPortis expected to internally store enough information to restore its current state after a subsequent call toDockingPort.uninstallMaximizedDockable().- Specified by:
installMaximizedDockablein interfaceDockingPort- Parameters:
dockable- theDockablethat is requested to be maximized- See Also:
DockingManager.toggleMaximized(Component),DockingManager.toggleMaximized(Dockable)
-
uninstallMaximizedDockable
public void uninstallMaximizedDockable()
Description copied from interface:DockingPortNotifies thisDockingPortthat theDockablepreviously installed for maximization via a call toDockingPort.installMaximizedDockable(Dockable)should now be returned to its originalDockingPortand that thisDockingPortshould return to its original state from before the call toDockingPort.installMaximizedDockable(Dockable). This method is called byDockingManagerin the course of restoring a maximizedDockable. Client code should not call this method directly.This
DockingPortis expected to remove the maximized dockable's component from its swing container hierarchy.- Specified by:
uninstallMaximizedDockablein interfaceDockingPort- See Also:
DockingManager.toggleMaximized(Component),DockingManager.toggleMaximized(Dockable)
-
releaseForMaximization
public void releaseForMaximization(Dockable dockable)
Description copied from interface:DockingPortAsks thisDockingPortto temporarily release its childDockablefor use by anotherDockingPortto achieve maximization. This method is called byDockingManagerin the course of maximizing aDockable. Client code should not call this method directly.This
DockingPortis expected to remove the specified dockable's component from its swing container hierarchy. Also, thisDockingPortis expected to internally store enough information to restore its current state after a subsequent call toDockingPort.returnFromMaximization().- Specified by:
releaseForMaximizationin interfaceDockingPort- Parameters:
dockable- theDockablethat is requested to be maximized- See Also:
DockingManager.toggleMaximized(Component),DockingManager.toggleMaximized(Dockable)
-
returnFromMaximization
public void returnFromMaximization()
Description copied from interface:DockingPortNotifies thisDockingPortthat theDockablepreviously released for maximization via a call toDockingPort.releaseForMaximization(Dockable)is now ready to be returned to its original state inside thisDockingPort. This method is called byDockingManagerin the course of restoring a maximizedDockable. Client code should not call this method directly.- Specified by:
returnFromMaximizationin interfaceDockingPort- See Also:
DockingManager.toggleMaximized(Component),DockingManager.toggleMaximized(Dockable)
-
-