Package org.flexdock.view
Class Viewport
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.flexdock.docking.defaults.DefaultDockingPort
org.flexdock.view.Viewport
- All Implemented Interfaces:
ImageObserver
,MenuContainer
,Serializable
,EventListener
,Accessible
,DockingConstants
,DockingPort
,DockingListener
,DockingMonitor
- Author:
- Christopher Butler
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.flexdock.docking.defaults.DefaultDockingPort
DefaultDockingPort.PortLayout
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Nested classes/interfaces inherited from interface org.flexdock.docking.event.DockingListener
DockingListener.Stub
-
Field Summary
FieldsFields inherited from class org.flexdock.docking.defaults.DefaultDockingPort
dockingListeners
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
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected JTabbedPane
If this method returnsnull
, implementations may throw NullPointerExceptions.boolean
getViewset
(int depth) boolean
isDockingAllowed
(Component comp, String region) Returnstrue
if docking is allowed for the specifiedComponent
within the suppliedregion
,false
otherwise.protected String
void
setRegionBlocked
(String region, boolean isBlocked) Methods inherited from class org.flexdock.docking.defaults.DefaultDockingPort
add, add, add, add, add, addDockingListener, clear, createBorderManager, createLayout, dock, dock, dockingCanceled, dockingComplete, dragStarted, dropStarted, exportLayout, getBorderManager, getCenterDockable, getComponent, getDockable, getDockableAt, getDockables, getDockableSet, getDockedComponent, getDockingListeners, getDockingProperties, getDockingStrategy, getInitTabPlacement, getPersistentId, getRegion, getRegionChecker, importLayout, installMaximizedDockable, isParentDockingPort, isRoot, isSingleTabAllowed, isTabsAsDragSource, isValidDockableChild, isValidDockingRegion, paint, releaseForMaximization, remove, removeAll, removeDockingListener, returnFromMaximization, setBorderManager, setDragInProgress, setPersistentId, setRoot, setSingleTabAllowed, setTabsAsDragSource, undock, undockingComplete, undockingStarted, uninstallMaximizedDockable, updateTab
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, 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
-
Field Details
-
blockedRegions
-
-
Constructor Details
-
Viewport
public Viewport() -
Viewport
-
-
Method Details
-
setRegionBlocked
-
isDockingAllowed
Description copied from class:DefaultDockingPort
Returnstrue
if docking is allowed for the specifiedComponent
within the suppliedregion
,false
otherwise. It is important to note that success of a docking operation relies on many factors and a return value oftrue
from this method does not necessarily guarantee that a call todock()
will succeed. This method merely indicates that the currentDockingPort
does not have any outstanding reason to block a docking operation with respect to the specifiedComponent
andregion
.If
comp
isnull
orregion
is invalid according toDockingManager.isValidDockingRegion(String region)
, then this method returnsfalse
.If this
DockingPort
is not already the parentDockingPort
for the specifiedComponent
, then this method returnstrue
.If this
DockingPort
is already the parentDockingPort
for 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. Ifcomp
is the only dockedComponent
within thisDockingPort
, then this method returnsfalse
since the layout cannot be rearranged. Otherwise, this method returnstrue
.- Specified by:
isDockingAllowed
in interfaceDockingPort
- Overrides:
isDockingAllowed
in classDefaultDockingPort
- Parameters:
comp
- theComponent
whose docking availability is to be checkedregion
- the region to be checked for docking availability for the specifiedComponent
.- Returns:
true
if docking is allowed for the specifiedComponent
within the suppliedregion
,false
otherwise.- See Also:
-
dock
-
createTabbedPane
Description copied from class:DefaultDockingPort
If this method returnsnull
, implementations may throw NullPointerExceptions. Do not expect NPE checking.- Overrides:
createTabbedPane
in classDefaultDockingPort
- Returns:
- a valid JTabbedPane.
-
getViewset
-
getViewset
-
paramString
- Overrides:
paramString
in classJPanel
-