public class WebDockablePane extends WebContainer<WebDockablePane,WDockablePaneUI>
WebDockableFrame
s.
WebDockableFrame
s can be added to the pane, repositioned within it, minimized, previewed, made floating or closed.
Note that closing the frame doesn't remove it from the pane, but only changes it's state to DockableFrameState.closed
.
Positioning of the frames is handled by the currently installed DockablePaneModel
implementation.
Resize of the WebDockableFrame
s and their drop position while dragged is handled by the DockablePaneGlassLayer
.
This component should never be used with a non-Web UIs as it might cause an unexpected behavior.
You could still use that component even if WebLaF is not your application LaF as this component will use Web-UI in any case.JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
protected JComponent |
content
Content component.
|
static String |
CONTENT_PROPERTY |
static String |
CONTENT_SPACING_PROPERTY |
protected int |
contentSpacing
Spacing between content elements.
|
static String |
FRAME_PROPERTY |
protected List<WebDockableFrame> |
frames
List of frames added to this
WebDockablePane . |
static String |
FRAMES_PROPERTY |
static String |
GLASS_LAYER_PROPERTY |
protected JComponent |
glassLayer
Glass layer component.
|
static String |
GROUP_ELEMENTS_PROPERTY |
protected boolean |
groupElements
Whether or not dockable pane elements should be visually grouped.
|
static String |
MINIMUM_ELEMENT_SIZE_PROPERTY |
protected Dimension |
minimumElementSize
Minimum size of
WebDockableFrame or content component added onto the dockable pane. |
protected DockablePaneModel |
model
Model containing information about dockable pane elements.
|
static String |
MODEL_PROPERTY |
static String |
MODEL_STATE_PROPERTY |
static String |
OCCUPY_MINIMUM_SIZE_FOR_CHILDREN_PROPERTY |
protected boolean |
occupyMinimumSizeForChildren
Whether containers minimum size should include children minimum sizes or simply be equal to
minimumElementSize . |
static String |
RESIZE_GRIPPER_WIDTH_PROPERTY |
protected int |
resizeGripperWidth
Content elements resize gripper width.
|
static String |
SIDEBAR_BUTTON_ACTION_PROPERTY |
static String |
SIDEBAR_BUTTON_VISIBILITY_PROPERTY
Component properties.
|
static String |
SIDEBAR_SPACING_PROPERTY |
protected SidebarButtonAction |
sidebarButtonAction
Sidebar button action.
|
protected SidebarButtonVisibility |
sidebarButtonVisibility
Sidebar buttons visibility type.
|
protected int |
sidebarSpacing
Spacing between sidebars elements and other elements.
|
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
UNDEFINED
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
WebDockablePane()
Constructs new dockable pane.
|
WebDockablePane(StyleId id)
Constructs new dockable pane.
|
Modifier and Type | Method and Description |
---|---|
void |
addDockablePaneListener(DockablePaneListener listener)
Adds new
DockablePaneListener . |
WebDockableFrame |
addFrame(WebDockableFrame frame)
Adds specified
WebDockableFrame into this WebDockablePane . |
void |
applyComponentOrientation(ComponentOrientation orientation) |
protected DockablePaneModel |
createDefaultModel()
Returns default
DockablePaneModel implementation to be used. |
WebDockableFrame |
findFrame(String id)
Returns
WebDockableFrame with the specified identifier or null if it doesn't exist within WebDockablePane . |
void |
fireFrameAdded(WebDockableFrame frame,
WebDockablePane dockablePane)
Informs listeners about
WebDockableFrame being added. |
void |
fireFrameMoved(WebDockableFrame frame,
CompassDirection position)
Informs listeners about
WebDockableFrame being moved. |
void |
fireFrameRemoved(WebDockableFrame frame,
WebDockablePane dockablePane)
Informs listeners about
WebDockableFrame being removed. |
void |
fireFrameStateChanged(WebDockableFrame frame,
DockableFrameState oldState,
DockableFrameState newState)
Informs listeners about
WebDockableFrame state change. |
JComponent |
getContent()
Returns current content
JComponent . |
int |
getContentSpacing()
Returns spacing between content elements.
|
StyleId |
getDefaultStyleId()
Returns default component
StyleId . |
WebDockableFrame |
getFrame(String id)
Returns
WebDockableFrame with the specified identifier. |
List<WebDockableFrame> |
getFrames()
Returns list of dockable frames added to this
WebDockablePane . |
List<WebDockableFrame> |
getFrames(CompassDirection position)
Returns
List of WebDockableFrame s added to this WebDockablePane and positioned on the specified side. |
JComponent |
getGlassLayer()
Returns glass layer component.
|
WebDockableFrame |
getMaximizedFrame()
Returns currently maximized
WebDockableFrame or null if none maximized. |
Dimension |
getMinimumElementSize()
Returns minimum size of
WebDockableFrame or content component added onto the dockable pane. |
DockablePaneModel |
getModel()
Returns model containing information about dockable pane elements.
|
int |
getResizeGripperWidth()
Returns content elements resize gripper width.
|
SidebarButtonAction |
getSidebarButtonAction()
Returns sidebar button action.
|
SidebarButtonVisibility |
getSidebarButtonVisibility()
Returns
SidebarButton s visibility condition. |
int |
getSidebarSpacing()
Returns spacing between sidebars elements and other elements.
|
DockableContainer |
getState()
Returns dockable pane element states data.
|
WDockablePaneUI |
getUI()
Returns the look and feel (LaF) object that renders this component.
|
String |
getUIClassID() |
boolean |
isGroupElements()
Returns whether or not dockable pane elements should be visually grouped.
|
boolean |
isOccupyMinimumSizeForChildren()
Returns whether containers minimum size should include children sizes or simply be equal to
minimumElementSize . |
void |
removeDockablePaneListener(DockablePaneListener listener)
Removes specified
DockablePaneListener . |
WebDockableFrame |
removeFrame(WebDockableFrame frame)
Removes specified
WebDockableFrame from this WebDockablePane . |
JComponent |
setContent(JComponent content)
Sets content
JComponent . |
WebDockablePane |
setContentSpacing(int spacing)
Sets spacing between content elements.
|
WebDockablePane |
setGlassLayer(JComponent glassLayer)
Sets glass layer component.
|
WebDockablePane |
setGroupElements(boolean group)
Sets whether or not dockable pane elements should be visually grouped.
|
WebDockablePane |
setMinimumElementSize(Dimension size)
Sets minimum size of
WebDockableFrame or content component added onto the dockable pane. |
WebDockablePane |
setModel(DockablePaneModel model)
Sets model containing information about dockable pane elements.
|
WebDockablePane |
setOccupyMinimumSizeForChildren(boolean occupy)
Sets whether containers minimum size should include children sizes or simply be equal to
minimumElementSize . |
WebDockablePane |
setResizeGripperWidth(int resizeGripperWidth)
Sets content elements resize gripper width.
|
WebDockablePane |
setSidebarButtonAction(SidebarButtonAction action)
Sets sidebar button action.
|
WebDockablePane |
setSidebarButtonVisibility(SidebarButtonVisibility condition)
Sets
SidebarButton s visibility condition. |
WebDockablePane |
setSidebarSpacing(int spacing)
Sets spacing between sidebars elements and other elements.
|
WebDockablePane |
setState(DockableContainer state)
Sets dockable pane element states data.
|
void |
setUI(WDockablePaneUI ui)
Sets the LaF object that renders this component.
|
void |
updateUI() |
add, add, add, add, add, contains, equalizeComponentsHeight, equalizeComponentsSize, equalizeComponentsWidth, forEach, getFirstComponent, getLastComponent, remove, remove, removeAll
addDictionaryListener, addLanguageListener, addStyleListener, addToolTip, addToolTip, addToolTip, addToolTip, addToolTip, addToolTip, addToolTip, addToolTip, addToolTip, addToolTip, changeFontSize, getCustomPainter, getFontName, getFontSize, getLanguage, getMargin, getMaximumHeight, getMaximumSize, getMaximumWidth, getMinimumHeight, getMinimumSize, getMinimumWidth, getOriginalMaximumSize, getOriginalMinimumSize, getOriginalPreferredSize, getPadding, getPainterShape, getPreferredHeight, getPreferredSize, getPreferredWidth, getSkin, getStyleId, isBoldFont, isItalicFont, isLanguageSet, isPlainFont, isShapeDetectionEnabled, loadSettings, onDoubleClick, onDragStart, onDragStart, onFocusGain, onFocusLoss, onKeyPress, onKeyPress, onKeyRelease, onKeyRelease, onKeyType, onKeyType, onMenuTrigger, onMouseClick, onMouseClick, onMouseDrag, onMouseDrag, onMouseEnter, onMouseExit, onMousePress, onMousePress, registerSettings, registerSettings, removeDictionaryListener, removeDictionaryListeners, removeLanguage, removeLanguageListener, removeLanguageListeners, removeLanguageUpdater, removeStyleListener, removeToolTip, removeToolTips, removeToolTips, removeToolTips, resetCustomPainter, resetSkin, resetStyleId, saveSettings, setBoldFont, setBoldFont, setCustomPainter, setFontName, setFontSize, setFontSizeAndStyle, setFontSizeAndStyle, setFontStyle, setFontStyle, setItalicFont, setItalicFont, setLanguage, setLanguageUpdater, setMargin, setMargin, setMargin, setMaximumHeight, setMaximumSize, setMaximumWidth, setMinimumHeight, setMinimumSize, setMinimumWidth, setPadding, setPadding, setPadding, setPlainFont, setPlainFont, setPreferredHeight, setPreferredSize, setPreferredWidth, setShapeDetectionEnabled, setSkin, setSkin, setStyleId, setToolTip, setToolTip, setToolTip, setToolTip, setToolTip, setToolTip, setToolTip, setToolTip, setToolTip, setToolTip, unregisterSettings, updateLanguage, updateLanguage
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, getNextFocusableComponent, getPopupLocation, 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, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, 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
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, 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, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
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, getAccessibleContext, 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, getPeer, 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, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public static final String SIDEBAR_BUTTON_VISIBILITY_PROPERTY
public static final String SIDEBAR_BUTTON_ACTION_PROPERTY
public static final String GROUP_ELEMENTS_PROPERTY
public static final String SIDEBAR_SPACING_PROPERTY
public static final String CONTENT_SPACING_PROPERTY
public static final String RESIZE_GRIPPER_WIDTH_PROPERTY
public static final String MINIMUM_ELEMENT_SIZE_PROPERTY
public static final String OCCUPY_MINIMUM_SIZE_FOR_CHILDREN_PROPERTY
public static final String MODEL_PROPERTY
public static final String MODEL_STATE_PROPERTY
public static final String GLASS_LAYER_PROPERTY
public static final String FRAMES_PROPERTY
public static final String FRAME_PROPERTY
public static final String CONTENT_PROPERTY
@NotNull protected SidebarButtonVisibility sidebarButtonVisibility
SidebarButtonVisibility
@NotNull protected SidebarButtonAction sidebarButtonAction
protected boolean groupElements
contentSpacing
as there is no point to visually group elements otherwise.
Also note that sidebarSpacing
value will have no effect on this setting as it is used to provide correct padding.protected int sidebarSpacing
protected int contentSpacing
protected int resizeGripperWidth
contentSpacing
and will overlap elements in that case blocking their mouse events.@NotNull protected Dimension minimumElementSize
WebDockableFrame
or content component added onto the dockable pane.protected boolean occupyMinimumSizeForChildren
minimumElementSize
.protected DockablePaneModel model
protected JComponent glassLayer
protected final List<WebDockableFrame> frames
WebDockablePane
.
This list only contains frames opened frames.
Upon closing frame it gets removed from the pane and this list.protected JComponent content
@NotNull public StyleId getDefaultStyleId()
Styleable
StyleId
.
This method is asked when initial component StyleId
have to be provided.StyleId
@NotNull public SidebarButtonVisibility getSidebarButtonVisibility()
SidebarButton
s visibility condition.SidebarButton
s visibility condition@NotNull public WebDockablePane setSidebarButtonVisibility(@NotNull SidebarButtonVisibility condition)
SidebarButton
s visibility condition.condition
- SidebarButton
s visibility conditionWebDockablePane
@NotNull public SidebarButtonAction getSidebarButtonAction()
@NotNull public WebDockablePane setSidebarButtonAction(@NotNull SidebarButtonAction action)
action
- sidebar button actionWebDockablePane
public boolean isGroupElements()
true
if dockable pane elements should be visually grouped, false
otherwise@NotNull public WebDockablePane setGroupElements(boolean group)
contentSpacing
as there is no point to visually group elements otherwise.
Also note that sidebarSpacing
value will have no effect on this setting as it is used to provide correct padding.group
- whether or not dockable pane elements should be visually groupedWebDockablePane
public int getSidebarSpacing()
@NotNull public WebDockablePane setSidebarSpacing(int spacing)
spacing
- spacing between sidebars elements and other elementsWebDockablePane
public int getContentSpacing()
@NotNull public WebDockablePane setContentSpacing(int spacing)
spacing
- spacing between content elementsWebDockablePane
public int getResizeGripperWidth()
@NotNull public WebDockablePane setResizeGripperWidth(int resizeGripperWidth)
resizeGripperWidth
- content elements resize gripper widthWebDockablePane
@NotNull public Dimension getMinimumElementSize()
WebDockableFrame
or content component added onto the dockable pane.WebDockableFrame
or content component added onto the dockable pane@NotNull public WebDockablePane setMinimumElementSize(@NotNull Dimension size)
WebDockableFrame
or content component added onto the dockable pane.size
- minimum size of WebDockableFrame
or content component added onto the dockable paneWebDockablePane
public boolean isOccupyMinimumSizeForChildren()
minimumElementSize
.minimumElementSize
@NotNull public WebDockablePane setOccupyMinimumSizeForChildren(boolean occupy)
minimumElementSize
.occupy
- whether containers minimum size should include children sizes or simply be equal to minimumElementSize
WebDockablePane
@NotNull public DockablePaneModel getModel()
@NotNull public WebDockablePane setModel(@NotNull DockablePaneModel model)
model
- model containing information about dockable pane elementsWebDockablePane
@NotNull protected DockablePaneModel createDefaultModel()
DockablePaneModel
implementation to be used.DockablePaneModel
implementation to be used@NotNull public DockableContainer getState()
setState(DockableContainer)
@NotNull public WebDockablePane setState(@NotNull DockableContainer state)
state
- dockable pane element states dataWebDockablePane
getState()
@Nullable public JComponent getGlassLayer()
@NotNull public WebDockablePane setGlassLayer(@Nullable JComponent glassLayer)
glassLayer
- glass layer componentWebDockablePane
@NotNull public List<WebDockableFrame> getFrames()
WebDockablePane
.WebDockablePane
@NotNull public List<WebDockableFrame> getFrames(@NotNull CompassDirection position)
List
of WebDockableFrame
s added to this WebDockablePane
and positioned on the specified side.position
- frames position relative to content areaList
of WebDockableFrame
s added to this WebDockablePane
and positioned on the specified sideWebDockableFrame.getPosition()
@NotNull public WebDockableFrame getFrame(@NotNull String id)
WebDockableFrame
with the specified identifier.id
- WebDockableFrame
identifierWebDockableFrame
with the specified identifier@Nullable public WebDockableFrame findFrame(@NotNull String id)
WebDockableFrame
with the specified identifier or null
if it doesn't exist within WebDockablePane
.id
- WebDockableFrame
identifierWebDockableFrame
with the specified identifier or null
if it doesn't exist within WebDockablePane
@Nullable public WebDockableFrame getMaximizedFrame()
WebDockableFrame
or null
if none maximized.WebDockableFrame
or null
if none maximized@NotNull public WebDockableFrame addFrame(@NotNull WebDockableFrame frame)
WebDockableFrame
into this WebDockablePane
.
Position of WebDockableFrame
will get restored by its identifier if it's state was saved at least once before.
Note that WebDockableFrame
might be in closed state, in that case it will still not be visible.frame
- WebDockableFrame
to addWebDockableFrame
@NotNull public WebDockableFrame removeFrame(@NotNull WebDockableFrame frame)
WebDockableFrame
from this WebDockablePane
.
This will completely remove WebDockableFrame
and its data from WebDockablePaneModel
.frame
- WebDockableFrame
to removeWebDockableFrame
@Nullable public JComponent getContent()
JComponent
.JComponent
@Nullable public JComponent setContent(@Nullable JComponent content)
JComponent
.content
- content JComponent
JComponent
public void addDockablePaneListener(@NotNull DockablePaneListener listener)
DockablePaneListener
.listener
- DockablePaneListener
to addpublic void removeDockablePaneListener(@NotNull DockablePaneListener listener)
DockablePaneListener
.listener
- DockablePaneListener
to removepublic void fireFrameAdded(@NotNull WebDockableFrame frame, @NotNull WebDockablePane dockablePane)
WebDockableFrame
being added.frame
- WebDockableFrame
which was addeddockablePane
- WebDockablePane
where frame was addedpublic void fireFrameStateChanged(@NotNull WebDockableFrame frame, @NotNull DockableFrameState oldState, @NotNull DockableFrameState newState)
WebDockableFrame
state change.frame
- WebDockableFrame
oldState
- previous frame statenewState
- current frame statepublic void fireFrameMoved(@NotNull WebDockableFrame frame, @NotNull CompassDirection position)
WebDockableFrame
being moved.frame
- WebDockableFrame
position
- current frame position relative to contentpublic void fireFrameRemoved(@NotNull WebDockableFrame frame, @NotNull WebDockablePane dockablePane)
WebDockableFrame
being removed.frame
- WebDockableFrame
which was removeddockablePane
- WebDockablePane
where frame was removed frompublic void applyComponentOrientation(@NotNull ComponentOrientation orientation)
applyComponentOrientation
in class Container
public WDockablePaneUI getUI()
WDockablePaneUI
object that renders this componentpublic void setUI(WDockablePaneUI ui)
ui
- WDockablePaneUI
public void updateUI()
updateUI
in class WebComponent<WebDockablePane,WDockablePaneUI>
@NotNull public String getUIClassID()
getUIClassID
in class WebComponent<WebDockablePane,WDockablePaneUI>
Copyright © 2020. All rights reserved.