|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JLayeredPane bibliothek.gui.dock.station.OverpaintablePanel bibliothek.gui.dock.security.SecureContainer bibliothek.gui.dock.SplitDockStation
public class SplitDockStation
This station shows all its children at once. The children are separated
by small gaps which can be moved by the user. It is possible to set
one child to fullscreen
, this child will
be shown above all other children. The user can double click on the title
of a child to change its fullscreen-mode.
The station tries to register a DockTitleFactory
with the
ID TITLE_ID
.
Nested Class Summary | |
---|---|
protected class |
SplitDockStation.Access
Access to this SplitDockStation . |
static class |
SplitDockStation.Orientation
Orientation how two Dockables are aligned. |
Nested classes/interfaces inherited from class javax.swing.JLayeredPane |
---|
JLayeredPane.AccessibleJLayeredPane |
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 |
Field Summary | |
---|---|
static String |
DISPLAYER_ID
This id is forwarded to Extension s which load additional DisplayerFactory s |
static PropertyKey<SplitDividerStrategy> |
DIVIDER_STRATEGY
The algorithm that allows users to resize children of a SplitDockStation by
grabbing a gap between two children and moving that gap around. |
protected DockStationListenerManager |
dockStationListeners
The list of all registered DockStationListeners . |
static PropertyKey<SplitLayoutManager> |
LAYOUT_MANAGER
Defines the behavior of a DockStation , how to react on a
drop-event, how to react on resize and other things related
to the layout. |
static PropertyKey<KeyStroke> |
MAXIMIZE_ACCELERATOR
Describes which KeyEvent will maximize/normalize the currently
selected Dockable . |
static String |
TITLE_ID
The ID under which this station tries to register a DockTitleFactory |
Fields inherited from class javax.swing.JLayeredPane |
---|
DEFAULT_LAYER, DRAG_LAYER, FRAME_CONTENT_LAYER, LAYER_PROPERTY, MODAL_LAYER, PALETTE_LAYER, POPUP_LAYER |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, 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 |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
SplitDockStation()
Constructs a new SplitDockStation . |
|
SplitDockStation(boolean createFullScreenAction)
Creates a new SplitDockStation . |
Method Summary | ||
---|---|---|
boolean |
accept(Dockable child)
Tells whether this station accepts child as a new child,
or refuses child . |
|
boolean |
accept(DockStation station)
Tells whether station is an accepted parent for this
Dockable or not. |
|
boolean |
accept(DockStation base,
Dockable neighbour)
Tells whether base could be the parent of a combination
between this Dockable and neighbor . |
|
void |
addDockable(Dockable dockable)
Adds dockable to this station. |
|
void |
addDockableListener(DockableListener listener)
Adds a listener to this Dockable. |
|
void |
addDockableStateListener(DockableStateListener listener)
Adds listener to this Dockable . |
|
void |
addDockHierarchyListener(DockHierarchyListener listener)
Adds a hierarchy-listener to this Dockable. |
|
void |
addDockStationListener(DockStationListener listener)
Adds a listener to this station. |
|
void |
addMouseInputListener(MouseInputListener listener)
Adds a MouseInputListener to the component of this Dockable . |
|
void |
addSplitDockStationListener(SplitDockListener listener)
Adds a listener to this station. |
|
Dockable |
asDockable()
Returns this if this is an instance of
Dockable . |
|
DockStation |
asDockStation()
Returns this if this is an instance of
DockStation . |
|
void |
aside(AsideRequest request)
Requests this DockStation to find a DockableProperty that is "aside" another
property. |
|
void |
bind(DockTitle title)
Called by clients which want to show a title of this Dockable . |
|
protected void |
callDockUiUpdateTheme()
Calls the method DockUI.updateTheme(DockStation, DockFactory)
with this as the first argument, and an appropriate factory
as the second argument. |
|
boolean |
canDrag(Dockable dockable)
Tells whether dockable can be removed from this station or not. |
|
boolean |
canReplace(Dockable old,
Dockable next)
Tells whether its possible to replace the child old
with next where next is not a child of this station. |
|
void |
changed(Dockable dockable,
DockTitle title,
boolean active)
Called by the DockController of this station to indicate that
the active-state of title has been changed. |
|
void |
configureDisplayerHints(DockableDisplayerHints hints)
Orders this Dockable to configure hints which will
be used by the parent component of this element. |
|
protected ListeningDockAction |
createFullScreenAction()
Creates an action which is added to all children
of this station. |
|
protected SplitPlaceholderConverter |
createPlaceholderConverter()
Creates the algorithm that is used by getPlaceholders() and setPlaceholders(PlaceholderMap) . |
|
protected DockComponentRootHandler |
createRootHandler()
Creates a new DockComponentRootHandler for monitoring all the Component s of this station. |
|
DockableSplitDockTree |
createTree()
Gets the contents of this station as a SplitDockTree . |
|
void |
createTree(SplitDockTreeFactory factory)
Writes the contents of this station into factory . |
|
protected void |
discard(DockableDisplayer displayer)
Removes displayer and creates a replacement. |
|
void |
drag(Dockable dockable)
Removes a child from this station. |
|
void |
drop(Dockable dockable)
Adds dockable to this station. |
|
boolean |
drop(Dockable dockable,
DockableProperty property)
Tries to add dockable to this station such that the location
given by property is matched. |
|
boolean |
drop(Dockable dockable,
SplitDockFullScreenProperty property)
Drops dockable on this station, may exchange the full screen element to ensure that
dockable is displayed. |
|
boolean |
drop(Dockable dockable,
SplitDockPathProperty property)
Tries to insert dockable at a location such that the path
to that location is the same as described in property . |
|
boolean |
drop(Dockable dockable,
SplitDockPlaceholderProperty property)
Drops dockable at the placeholder that is referenced by property . |
|
boolean |
drop(Dockable dockable,
SplitDockProperty property)
Tries to add Dockable such that the boundaries given
by property are full filled. |
|
protected boolean |
dropAside(SplitNode neighbor,
PutInfo.Put put,
Dockable dockable,
Leaf leaf,
double divider,
DockHierarchyLock.Token token)
Adds dockable at the side put of
neighbor . |
|
void |
dropGrid(SplitDockGrid grid)
Copies the layout of grid . |
|
protected boolean |
dropOver(Leaf leaf,
Dockable dockable,
CombinerSource source,
CombinerTarget target)
Combines the Dockable of leaf and dockable
to a new child of this station. |
|
protected boolean |
dropOver(Leaf leaf,
Dockable dockable,
DockableProperty property,
CombinerSource source,
CombinerTarget target)
Combines the Dockable of leaf and dockable
to a new child of this station. |
|
void |
dropTree(SplitDockTree<Dockable> tree)
Removes all children from this station and then adds the contents that are stored in tree . |
|
void |
dropTree(SplitDockTree<Dockable> tree,
boolean checkValidity)
Removes all children from this station and then adds the contents that are stored in tree . |
|
protected void |
fireFullScreenChanged(Dockable oldDockable,
Dockable newDockable)
Sends a message to all registered instances of SplitDockListener ,
that the Dockable in fullscreen-mode has changed. |
|
protected void |
fireTitleExchanged()
Informs all DockableListener s that all bound titles and the
null title are no longer considered good titles and
should be replaced |
|
protected void |
fireTitleExchanged(DockTitle title)
Informs all DockableListener s that title is no longer
considered to be a good title and should be exchanged. |
|
protected SplitDockStation.Access |
getAccess()
Allows subclasses access to the internal working of this SplitDockStation . |
|
int |
getBorderSideSnapSize()
Gets the size of the border around the station. |
|
StationCombinerValue |
getCombiner()
Gets a Combiner to combine Dockables on
this station. |
|
Component |
getComponent()
Gets the Component which represents this Dockable . |
|
DockComponentConfiguration |
getComponentConfiguration()
Gets the currently applied configuration. |
|
protected DockableDisplayerHints |
getConfigurableDisplayerHints()
Gets the argument that was last used for configureDisplayerHints(DockableDisplayerHints) . |
|
DockController |
getController()
Gets the controller which tells whether a restricted environment is in use. |
|
SplitLayoutManager |
getCurrentSplitLayoutManager()
Gets the SplitLayoutManager that is currently used by this station. |
|
DefaultDockActionSource |
getDirectActionOffers(Dockable dockable)
Gets a list of actions which should be available for the user and affect the child dockable . |
|
DefaultDisplayerFactoryValue |
getDisplayerFactory()
Gets a DisplayerFactory to create new DockableDisplayer
for this station. |
|
DisplayerCollection |
getDisplayers()
Gets the set of displayers that are currently
used by this station. |
|
int |
getDividerSize()
Gets the size of the divider-gap. |
|
SplitDividerStrategy |
getDividerStrategy()
Gets the SplitDividerStrategy that is used to handle the divider of this station. |
|
Dockable |
getDockable(int index)
Gets the index'th child of this station. |
|
int |
getDockableCount()
Gets the number of children. |
|
SplitDockProperty |
getDockableLocationProperty(Dockable dockable)
Creates a DockableProperty for the location of dockable . |
|
SplitDockPathProperty |
getDockablePathProperty(Dockable dockable)
Creates a DockableProperty for the location of dockable . |
|
SplitDockPathProperty |
getDockablePathProperty(Path placeholder)
Creates a DockableProperty pointing to the leaf containing placeholder . |
|
SplitDockPlaceholderProperty |
getDockablePlaceholderProperty(Dockable dockable,
Dockable target)
Creates a SplitDockPlaceholderProperty for dockable , may
insert an additional placeholder in the tree. |
|
DockableProperty |
getDockableProperty(Dockable child,
Dockable target)
Gets precise information about the location of a child of this station. |
|
DockStation |
getDockParent()
Gets the current parent, which is the latest argument of Dockable.setDockParent(DockStation) . |
|
PutInfo |
getDropInfo()
Gets the location where the currently dragged Dockable would be dropped. |
|
protected bibliothek.gui.dock.SplitDockStation.DropInfo |
getDropInfo(SplitDockProperty property,
Dockable dockable,
SplitNode root)
Searches for the best place for dockable such that its boundaries met
property . |
|
DockElement |
getElement()
Gets the element which is represented by this . |
|
String |
getFactoryID()
Gets the unique name of the DockFactory which can read
and write elements of this type. |
|
Dockable |
getFrontDockable()
Gets the favorite child of this station. |
|
Dockable |
getFullScreen()
Gets the Dockable which is in fullscreen-mode and covers all
other children of this station. |
|
DockActionSource |
getGlobalActionOffers()
Gets a list of all DockAction s which
might be triggered while this Dockable is visible. |
|
DockActionSource |
getIndirectActionOffers(Dockable dockable)
Gets a list of actions which should be available for the user and affect dockable . |
|
DockStationDropLayer[] |
getLayers()
Gets a description of all the areas of the screen where this DockStation can handle a drop event.Everytime the mouse is moved or released during a drag & drop operation, this method is called for all DockStation s. |
|
DockActionSource |
getLocalActionOffers()
Gets a list of DockAction s which should be triggerable if
this Dockable is visible. |
|
protected Tuple<Integer,SplitNode> |
getLowestNode(SplitDockPathProperty property)
Searches the lowest node whose identifier is equal to
an identifier from property . |
|
Dimension |
getMinimumLeafSize()
Gets the minimum size a Leaf can have. |
|
Dimension |
getMinimumSize()
|
|
SplitNode |
getNode(long id)
Searches the node whose id equals id . |
|
SplitNodeFactory |
getNodeFactory()
Gets the factory which is responsible for creating new SplitNode s. |
|
DefaultStationPaintValue |
getPaint()
Gets a StationPaint to paint markings on this station. |
|
PlaceholderMapping |
getPlaceholderMapping()
Allows access to the placeholders that are stored on this station. |
|
PlaceholderMap |
getPlaceholders()
Gets a snapshot of all placeholders that are currently stored in this DockStation . |
|
RootPlaceholderStrategy |
getPlaceholderStrategy()
Gets the strategy for creating and storing placeholders. |
|
Point |
getPopupLocation(Point click,
boolean popupTrigger)
Tells whether a popup menu should be opened when the user clicks at click with the mouse. |
|
Dimension |
getPreferredSize()
|
|
Root |
getRoot()
Gets the Root of the tree which stores all locations and sizes
of the children of this station. |
|
float |
getSideSnapSize()
Gets the relative size of the invisible border of all children. |
|
protected SplitSpanStrategy |
getSpanStrategy()
Gets read access to the strategy which is responsible for handling the Span s of
this station. |
|
SplitLayoutManager |
getSplitLayoutManager()
Gets the layout manager which was explicitly set. |
|
DockTheme |
getTheme()
Gets the current theme of this station. |
|
Icon |
getTitleIcon()
Gets the current icon of this Dockable . |
|
String |
getTitleText()
Gets the current title-text of this Dockable . |
|
String |
getTitleToolTip()
Gets a tooltip that is associated with this Dockable and
that should be shown on any DockTitle . |
|
boolean |
hasFullScreenAction()
Tells whether createFullScreenAction() was called and returned a value other
than null . |
|
int |
indexOfDockable(Dockable dockable)
Gets the index of a child of this station. |
|
boolean |
isAllowSideSnap()
Tells whether the station can grab Dockables which are dragged near the station. |
|
boolean |
isChildShowing(Dockable dockable)
Tells whether the child dockable is visible or not. |
|
boolean |
isContinousDisplay()
Tells whether the dockables are resized while the split is dragged, or not. |
|
boolean |
isDisabled()
Tells the result of the current DisablingStrategy . |
|
boolean |
isDockableShowing()
Tells whether this Dockable can be seen by the user. |
|
boolean |
isDockableVisible()
Deprecated. |
|
boolean |
isExpandOnDoubleclick()
Tells whether a child expands to fullscreen when double clicked or not. |
|
boolean |
isFullScreen()
Tells whether a Dockable is currently shown in fullscreen-mode
on this station. |
|
boolean |
isResizingEnabled()
Tells whether the user can drag dividiers and resize dockables in this way. |
|
boolean |
isStationShowing()
Tells whether this station is visible or not. |
|
boolean |
isStationVisible()
Deprecated. |
|
boolean |
isUsedAsTitle()
Tells whether this DockElementRepresentative is used as title.Some modules grant more rights to titles than to non-titles, i.e. |
|
boolean |
isVisible(Dockable dockable)
Deprecated. |
|
DockTitle[] |
listBoundTitles()
Gets a list of all DockTitles which are currently
bound to this Dockable . |
|
void |
move(Dockable dockable,
DockableProperty property)
Tries to move the child dockable in such a way, that
DockStation.getDockableProperty(Dockable, Dockable) would return a
DockableProperty that equals property .There is no need to give a guarantee that the move successes, and clients should always be prepared for the possibility that this DockStation
does nothing at all. |
|
protected void |
paintOverlay(Graphics g)
Paints the overlay over all components. |
|
StationDragOperation |
prepareDrag(Dockable dockable)
Informs this station that a drag and drop operation is in progress and that dockable might
be removed from this station. |
|
StationDropOperation |
prepareDrop(StationDropItem item)
Prepares this station to get the new child dockable or to move around the known child dockable . |
|
void |
removeAllDockables()
Removes all children from this station. Note: clients may need to invoke DockController.freezeLayout()
and DockController.meltLayout() to ensure noone else adds or
removes Dockable s. |
|
void |
removeDockable(Dockable dockable)
Removes dockable from this station. |
|
void |
removeDockableListener(DockableListener listener)
Removes a listener from this Dockable. |
|
void |
removeDockableStateListener(DockableStateListener listener)
Removes listener from this element. |
|
void |
removeDockHierarchyListener(DockHierarchyListener listener)
Removes a hierarchy-listener from this Dockable. Note: when using a DockHierarchyObserver ,
forward the call directly to DockHierarchyObserver.removeDockHierarchyListener(DockHierarchyListener) |
|
void |
removeDockStationListener(DockStationListener listener)
Removes a listener from this station. |
|
void |
removeMouseInputListener(MouseInputListener listener)
Removes a listener that was earlier added to this Dockable . |
|
void |
removePlaceholder(Path placeholder)
Searches the entire tree for any occurence of placeholder and
removes placeholder . |
|
void |
removePlaceholders(Set<Path> placeholders)
Searches the entire tree for all occurences of all placeholders in placeholders . |
|
void |
removeSplitDockStationListener(SplitDockListener listener)
Removes an earlier added listener. |
|
void |
replace(Dockable previous,
Dockable next)
Replaces the child old by next which is
not yet a child of this station. |
|
void |
replace(DockStation old,
Dockable next)
Replaces the child old by next which is
not yet a child of this station. |
|
void |
requestChildDisplayer(DisplayerRequest request)
Provides a DockableDisplayer for a child of this station. |
|
void |
requestChildDockTitle(DockTitleRequest request)
Provides a DockTitle for a child of this station. |
|
void |
requestDisplayer(DisplayerRequest request)
Invoked to get DockableDisplayer for this Dockable . |
|
void |
requestDockTitle(DockTitleRequest request)
Invoked to get a graphical representation of a title for this Dockable . |
|
void |
resetTitleIcon()
Resets the icon of this SplitDockStation , the default icon is shown again. |
|
protected Root |
root()
Gets the root of this station, creates a root if necessary. |
|
void |
setAllowSideSnap(boolean allowSideSnap)
Sets whether Dockables which are dragged near
the station are captured and added to this station. |
|
void |
setBorderSideSnapSize(int borderSideSnapSize)
There is an invisible border around the station. |
|
void |
setComponentConfiguration(DockComponentConfiguration configuration)
Sets a configuration which is to be applied to all Component s (and maybe their children) of this DockComponentRoot . |
|
void |
setContinousDisplay(boolean continousDisplay)
Sets whether the dockables should be resized while the split is dragged, or not. |
|
void |
setController(DockController controller)
Sets the controller which tells whether a restricted environment is in use. |
|
protected void |
setDisabled(boolean disabled)
Called by the current DisablingStrategy when this station changes its state. |
|
void |
setDividerSize(int dividerSize)
Sets the size of the divider-gap between the children of this station. |
|
void |
setDividerStrategy(SplitDividerStrategy strategy)
Sets the SplitDividerStrategy that should be used to handle the divider of this station. |
|
void |
setDockParent(DockStation station)
Sets the parent property. |
|
protected void |
setDropInfo(PutInfo putInfo)
Sets the current information telling where and how an item is to be dropped. |
|
void |
setExpandOnDoubleclick(boolean expandOnDoubleclick)
Sets whether a double click on a child or its title can expand the child to fullscreen or not. |
|
void |
setFrontDockable(Dockable dockable)
Sets the most important child. |
|
void |
setFullScreen(Dockable dockable)
Sets one of the children of this station as the one child which covers all other children. |
|
void |
setFullScreenAction(ListeningDockAction fullScreenAction)
Sets an action which allows to expand children. |
|
void |
setMinimumLeafSize(Dimension minimumLeafSize)
Sets the minimum size a Leaf can have. |
|
void |
setNextFullScreen()
Switches the child which is in fullscreen-mode. |
|
void |
setNodeFactory(SplitNodeFactory factory)
Sets the factory which is responsible for creating new SplitNode s. |
|
void |
setPlaceholders(PlaceholderMap placeholders)
Sets an earlier snapshot of the placeholders of this station. |
|
void |
setPlaceholderStrategy(PlaceholderStrategy strategy)
Sets the strategy for selecting placeholders when removing Dockable s from this
station. |
|
protected void |
setPut(PutInfo putInfo)
Forward call to SplitSpanStrategy.setPut(PutInfo) . |
|
void |
setResizingEnabled(boolean resizingEnabled)
Enables the user to resize the children of this station. |
|
void |
setSideSnapSize(float sideSnapSize)
Every child has an invisible border whose size is determined by sideSnapSize . |
|
void |
setSplitLayoutManager(SplitLayoutManager manager)
Sets a special SplitLayoutManager which this station has to use. |
|
void |
setTitleIcon(Icon titleIcon)
Sets an icon that is shown in the titles of this Dockable . |
|
void |
setTitleText(String titleText)
Sets the text of the title of this dockable. |
|
void |
setTitleToolTip(String text)
Sets the tooltip that should be shown on any title that is bound
to this dockable. |
|
boolean |
shouldFocus()
Tells whether a click onto this component should transfer the focus either to this component or to the Dockable . |
|
boolean |
shouldTransfersFocus()
Tells whether a click onto this component should transfer the focus to the Dockable or not. |
|
String |
toString()
|
|
void |
unbind(DockTitle title)
Clients should call this method if a DockTitle is no longer
needed. |
|
protected void |
unsetDropInfo()
Resets the information telling where and how an item is to be dropped. |
|
protected void |
unsetPut()
Forward call to SplitSpanStrategy.unsetPut() . |
|
void |
updateBounds()
Updates all locations and sizes of the Components
which are in the structure of this tree. |
|
protected void |
updateConfigurableDisplayerHints()
Updates the current hints
of this station. |
|
void |
updateTheme()
Updates the DockTheme of this station. |
|
protected void |
updateVisibility()
Calls Component.setVisible(boolean) on all current children and updates the visibility. |
|
|
visit(SplitTreeFactory<N> factory)
Visits the internal structure of this station. |
Methods inherited from class bibliothek.gui.dock.security.SecureContainer |
---|
createGlassPane, install, isUseGlassPane, setUseGlassPane, uninstall |
Methods inherited from class bibliothek.gui.dock.station.OverpaintablePanel |
---|
doLayout, getBasePane, getContentPane, getMaximumSize, isSolid, setBasePane, setContentPane, setSolid |
Methods inherited from class javax.swing.JLayeredPane |
---|
addImpl, getAccessibleContext, getComponentCountInLayer, getComponentsInLayer, getComponentToLayer, getIndexOf, getLayer, getLayer, getLayeredPaneAbove, getObjectForLayer, getPosition, highestLayer, insertIndexForLayer, isOptimizedDrawingEnabled, lowestLayer, moveToBack, moveToFront, paint, paramString, putLayer, remove, removeAll, setLayer, setLayer, setPosition |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String TITLE_ID
DockTitleFactory
public static final String DISPLAYER_ID
Extension
s which load additional DisplayerFactory
s
public static final PropertyKey<KeyStroke> MAXIMIZE_ACCELERATOR
KeyEvent
will maximize/normalize the currently
selected Dockable
.
public static final PropertyKey<SplitLayoutManager> LAYOUT_MANAGER
DockStation
, how to react on a
drop-event, how to react on resize and other things related
to the layout.
public static final PropertyKey<SplitDividerStrategy> DIVIDER_STRATEGY
SplitDockStation
by
grabbing a gap between two children and moving that gap around.
protected DockStationListenerManager dockStationListeners
DockStationListeners
.
This list can be used to send events to all listeners.
Constructor Detail |
---|
public SplitDockStation()
SplitDockStation
.
public SplitDockStation(boolean createFullScreenAction)
SplitDockStation
.
createFullScreenAction
- whether createFullScreenAction()
should be called or notMethod Detail |
---|
protected DockComponentRootHandler createRootHandler()
DockComponentRootHandler
for monitoring all the Component
s of this station.
protected final Root root()
getRoot()
can. This method
just returns the value of root
, makes it a read only variable.
getRoot()
public String toString()
toString
in class Component
public Dimension getMinimumSize()
getMinimumSize
in class OverpaintablePanel
public Dimension getPreferredSize()
getPreferredSize
in class OverpaintablePanel
public DockTheme getTheme()
DockStation
null
,
but that means that the station is not fully initialized, and might not
work correct.
getTheme
in interface DockStation
null
.public void updateTheme()
DockStation
DockTheme
of this station. The new theme
has to be read from the controller
of
this station. If the controller is null
, this method
should return immediately.DockUI.updateTheme(DockStation, DockFactory)
to implement this method.
updateTheme
in interface DockStation
protected void callDockUiUpdateTheme() throws IOException
DockUI.updateTheme(DockStation, DockFactory)
with this
as the first argument, and an appropriate factory
as the second argument.
IOException
- if the DockUI throws an exceptionprotected ListeningDockAction createFullScreenAction()
action
which is added to all children
of this station. The action allows the user to expand a child to
fullscreen. The action is also added to subchildren, but the effect
does only affect direct children of this station.
null
if this feature should be
disabled, or the action is set later
public void setFullScreenAction(ListeningDockAction fullScreenAction)
action
which allows to expand children. This
method can only be invoked if there is not already set an action. It is
a condition that createFullScreenAction()
returns null
fullScreenAction
- the new action
IllegalStateException
- if there is already an action presentpublic void setExpandOnDoubleclick(boolean expandOnDoubleclick)
expandOnDoubleclick
- true
if the double click should
have an effect, false
if double clicks should be ignored.public boolean isExpandOnDoubleclick()
true
if a double click has an effect, false
otherwisesetExpandOnDoubleclick(boolean)
public void setResizingEnabled(boolean resizingEnabled)
true
. Note that resizing is a core
functionality of this station, disabling it should be considered
carefully.
resizingEnabled
- whether resizing is enabled or notpublic boolean isResizingEnabled()
true
if resizing is allowedprotected void setDisabled(boolean disabled)
DisablingStrategy
when this station changes its state.
disabled
- whether the station is enabled or notpublic boolean isDisabled()
DisablingStrategy
.
public void setDockParent(DockStation station)
Dockable
station
.DockHierarchyEvent
.DockHierarchyObserver
, invoke
DockHierarchyObserver.update()
after the
property has changed, it will automatically fire a DockHierarchyEvent
if necessary.
setDockParent
in interface Dockable
station
- the parent, may be null
if this Dockable
is not visible at all.public DockStation getDockParent()
Dockable
Dockable.setDockParent(DockStation)
.
getDockParent
in interface Dockable
null
public void setController(DockController controller)
SecureContainer
setController
in interface Dockable
setController
in interface DockStation
setController
in class SecureContainer
controller
- the controller to inform about MouseEvent
s or null
public DockController getController()
SecureContainer
getController
in interface DockElement
getController
in interface Dockable
getController
in interface DockStation
getController
in class SecureContainer
null
DockStation.setController(DockController)
public DockComponentConfiguration getComponentConfiguration()
DockComponentRoot
getComponentConfiguration
in interface DockComponentRoot
null
public void setComponentConfiguration(DockComponentConfiguration configuration)
DockComponentRoot
Component
s (and maybe their children) of this DockComponentRoot
.
setComponentConfiguration
in interface DockComponentRoot
configuration
- the new configuration or null
.public void addDockableListener(DockableListener listener)
Dockable
addDockableListener
in interface Dockable
listener
- the new listenerpublic void removeDockableListener(DockableListener listener)
Dockable
removeDockableListener
in interface Dockable
listener
- the listener to removepublic void addDockHierarchyListener(DockHierarchyListener listener)
Dockable
DockHierarchyObserver
to implement this feature in an easy way. Subclasses then only have
to call DockHierarchyObserver.update()
whenever the parent
of this Dockable
changes.DockHierarchyObserver
,
forward the call directly to DockHierarchyObserver.addDockHierarchyListener(DockHierarchyListener)
addDockHierarchyListener
in interface Dockable
listener
- the new listenerpublic void removeDockHierarchyListener(DockHierarchyListener listener)
Dockable
DockHierarchyObserver
,
forward the call directly to DockHierarchyObserver.removeDockHierarchyListener(DockHierarchyListener)
removeDockHierarchyListener
in interface Dockable
listener
- the listener to removeDockable.addDockableListener(DockableListener)
public void addMouseInputListener(MouseInputListener listener)
Dockable
MouseInputListener
to the component
of this Dockable
.
A Dockable
has to decide by itself which Components
should be observer, but generally all free areas should be covered.
It's also possible just to ignore the listener, but that's not the
preferred behavior.
addMouseInputListener
in interface DockElementRepresentative
addMouseInputListener
in interface Dockable
listener
- the mouse listenerpublic void removeMouseInputListener(MouseInputListener listener)
Dockable
Dockable
.
removeMouseInputListener
in interface DockElementRepresentative
removeMouseInputListener
in interface Dockable
listener
- The listener to removepublic boolean accept(DockStation station)
Dockable
station
is an accepted parent for this
Dockable
or not. The user is not able to drag a Dockable
to a station
which is not accepted.
accept
in interface Dockable
station
- a possible parent
station
could be a parent or notpublic boolean accept(DockStation base, Dockable neighbour)
Dockable
base
could be the parent of a combination
between this Dockable
and neighbor
. The user is not able
to make a combination between this Dockable
and neighbor
if this method does not accept the operation.
accept
in interface Dockable
base
- the future parent of the combinationneighbour
- a Dockable
whose parent will be the same parent as
the parent of this Dockable
true
if the combination is allowed, false
otherwisepublic Component getComponent()
Dockable
Component
which represents this Dockable
. Note that
the component should be a focus cycle root
getComponent
in interface DockElementRepresentative
getComponent
in interface Dockable
public DockElement getElement()
DockElementRepresentative
this
.
The result of this method must not change.
getElement
in interface DockElementRepresentative
null
public boolean isUsedAsTitle()
DockElementRepresentative
DockElementRepresentative
is used as title.DockRelocator
can allow drag & drop only for titles.Dockable
should have only one element that is a title,
so if in doubt return false
.
isUsedAsTitle
in interface DockElementRepresentative
true
if this representative should be seen as titlepublic boolean shouldFocus()
DockElementRepresentative
Dockable
.
shouldFocus
in interface DockElementRepresentative
true
if clicking this component should influence focuspublic boolean shouldTransfersFocus()
DockElementRepresentative
Dockable
or not. If this
object is a Dockable
, then a result of true
might change the currently focused item
of itself. This property is ignored if DockElementRepresentative.shouldFocus()
returns false
.
shouldTransfersFocus
in interface DockElementRepresentative
public Point getPopupLocation(Point click, boolean popupTrigger)
DockElementRepresentative
click
with the mouse. If yes, then the top left edge
of the popup should be returned, otherwise null
should be
returned.
getPopupLocation
in interface DockElementRepresentative
click
- the location where the user clicked with the mousepopupTrigger
- whether the invocation is the systems popup trigger
or not. Many implementations of this method will return click
in case of true
, and null
in case of false
null
if no
popup-menu should be openedpublic String getTitleText()
Dockable
Dockable
.
getTitleText
in interface Dockable
public void setTitleText(String titleText)
titleText
- the text displayed in the titlepublic String getTitleToolTip()
Dockable
Dockable
and
that should be shown on any DockTitle
.
getTitleToolTip
in interface Dockable
null
public void setTitleToolTip(String text)
bound
to this dockable.
text
- the tooltip, can be null
public Icon getTitleIcon()
Dockable
Dockable
.
getTitleIcon
in interface Dockable
null
public void setTitleIcon(Icon titleIcon)
titles
of this Dockable
.
titleIcon
- the icon or null
public void resetTitleIcon()
SplitDockStation
, the default icon is shown again.
public void setSplitLayoutManager(SplitLayoutManager manager)
SplitLayoutManager
which this station has to use.
manager
- the manager or null
to return to the
manager that is specified in the DockProperties
by the key
LAYOUT_MANAGER
.public SplitLayoutManager getSplitLayoutManager()
null
setSplitLayoutManager(SplitLayoutManager)
,
getCurrentSplitLayoutManager()
public SplitLayoutManager getCurrentSplitLayoutManager()
SplitLayoutManager
that is currently used by this station.
setSplitLayoutManager(SplitLayoutManager)
public RootPlaceholderStrategy getPlaceholderStrategy()
setPlaceholderStrategy(PlaceholderStrategy)
null
public void setPlaceholderStrategy(PlaceholderStrategy strategy)
Dockable
s from this
station.
strategy
- the new strategy or null
to install the default strategypublic void setSideSnapSize(float sideSnapSize)
sideSnapSize
.
If another Dockable
is dragged into that border, it is added as neighbor.
Otherwise it is merged with the present child.
sideSnapSize
- the relative size of the border, should be between
0 and 0.5f
IllegalArgumentException
- if the size is less than 0public float getSideSnapSize()
setSideSnapSize(float)
public void setBorderSideSnapSize(int borderSideSnapSize)
Dockable
is
dragged inside this border, its considered to be on the station, but
will be dropped aside the station (like the whole station is a neighbor
of the Dockable).
borderSideSnapSize
- the size of the border in pixel
IllegalArgumentException
- if the size is smaller than 0public int getBorderSideSnapSize()
setBorderSideSnapSize(int)
public void setDividerSize(int dividerSize)
dividerSize
- the size of the gap in pixel
IllegalArgumentException
- if the size is less than 0.public int getDividerSize()
setDividerSize(int)
public SplitDividerStrategy getDividerStrategy()
SplitDividerStrategy
that is used to handle the divider of this station.
public void setDividerStrategy(SplitDividerStrategy strategy)
SplitDividerStrategy
that should be used to handle the divider of this station.
strategy
- the new strategy or null
to revert to the default valueprotected SplitSpanStrategy getSpanStrategy()
Span
s of
this station.
Span
s, not null
@FrameworkOnly public void setNodeFactory(SplitNodeFactory factory)
SplitNode
s. Clients usually have no
need to change this property.
factory
- the new factory, must not be null
@FrameworkOnly public SplitNodeFactory getNodeFactory()
SplitNode
s. Clients usually have no
need to access this property.
null
public void setContinousDisplay(boolean continousDisplay)
continousDisplay
- true
if the dockables should
be resizedpublic boolean isContinousDisplay()
true
if the dockables are resizedsetContinousDisplay(boolean)
public void setMinimumLeafSize(Dimension minimumLeafSize)
Leaf
can have. The default is 20/20.
minimumLeafSize
- the new minimum size in pixels, not null
public Dimension getMinimumLeafSize()
Leaf
can have.
public void setAllowSideSnap(boolean allowSideSnap)
Dockables
which are dragged near
the station are captured and added to this station.
allowSideSnap
- true
if the station can
snap Dockables which are near.setBorderSideSnapSize(int)
public boolean isAllowSideSnap()
true
if grabbing is allowedsetAllowSideSnap(boolean)
public void requestDockTitle(DockTitleRequest request)
Dockable
Dockable
. This method is
called either when a title first is required, or when this Dockable
invoked the DockableListener.titleExchanged(Dockable, DockTitle)
method of its
current observers. Dockable
might decide to answer the request by calling
DockTitleRequest.answer(DockTitle)
, any title, including null
are
valid answers. If this Dockable
does not answer the request the associated
DockTitleFactory
(as described by DockTitleVersion.getFactory()
) is
asked to answer the request.target
must be this Dockable
.
requestDockTitle
in interface Dockable
request
- which title is required. If this Dockable does not have
a special rule for the given request it just ignores the callpublic void requestDisplayer(DisplayerRequest request)
Dockable
DockableDisplayer
for this Dockable
. This method may be called when
this Dockable
is dropped onto a new DockStation
, a theme was exchanged, or an existing
DockableDisplayer
was discarded.
requestDisplayer
in interface Dockable
request
- callback used to set a new DockableDisplayer
public void changed(Dockable dockable, DockTitle title, boolean active)
DockStation
DockController
of this station to indicate that
the active-state of title
has been changed. This station
should call the method title.changed
with an appropriate event. The station may add some additional information
to this call.
changed
in interface DockStation
dockable
- the child whose title is changedtitle
- the changed title, may not be boundactive
- the new state of the titlepublic void requestChildDockTitle(DockTitleRequest request)
DockStation
DockTitle
for a child of this station. This method
must call DockTitleRequest.answer(DockTitle)
to set the result.DockStation
s won't have the need to implement this method,
leaving it empty will advice the framework to use another source for
new DockTitle
s.
requestChildDockTitle
in interface DockStation
request
- the request to answer, not null
public void requestChildDisplayer(DisplayerRequest request)
DockStation
DockableDisplayer
for a child of this station. This method
must call DisplayerRequest.answer(DockableDisplayer)
to set the result.
requestChildDisplayer
in interface DockStation
request
- the request to answer, not null
public void bind(DockTitle title)
Dockable
Dockable
. The
method DockTitle.bind()
will be called automatically by the
controller.title
was bound. However, the method DockTitle.bind()
must not
be invoked by this method.title
must be returned by Dockable.listBoundTitles()
unless Dockable.unbind(DockTitle)
is called.
bind
in interface Dockable
title
- the title which will be show some things of this Dockable
Dockable.unbind(DockTitle)
public void unbind(DockTitle title)
Dockable
DockTitle
is no longer
needed. The controller will call DockTitle.unbind()
at an appropriate
time.title
is no longer bound. However, this method must not call
DockTitle.unbind()
.title
must no longer be returned when calling Dockable.listBoundTitles()
unbind
in interface Dockable
title
- the title which will be no longer connected to this Dockable
Dockable.bind(DockTitle)
public DockTitle[] listBoundTitles()
Dockable
DockTitles
which are currently
bound to this Dockable
. That are titles for which Dockable.bind(DockTitle)
was called, but not yet Dockable.unbind(DockTitle)
.
listBoundTitles
in interface Dockable
public DockActionSource getLocalActionOffers()
Dockable
DockAction
s which should be triggerable if
this Dockable
is visible. The list contains only actions which are
directly bound to this Dockable
(the actions which are not changed when
the parent-station of this Dockable
is exchanged).
The list can be modified by this Dockable
at every time, clients have
to react on these changes by adding a DockActionSourceListener
to the result.
getLocalActionOffers
in interface Dockable
null
if no actions
are availablepublic DockActionSource getGlobalActionOffers()
Dockable
DockAction
s which
might be triggered while this Dockable
is visible. The list must contain
all actions which are related in any way to this Dockable
. Subclasses
might use a HierarchyDockActionSource
or the method
DockController.listOffers(Dockable)
to implement this functionality
getGlobalActionOffers
in interface Dockable
null
public void configureDisplayerHints(DockableDisplayerHints hints)
Dockable
Dockable
to configure hints
which will
be used by the parent component of this element. This Dockable
can store a reference to hints
and use it to change the
hints whenever it is appropriate. This method will be called with null
if the link should be broken.
configureDisplayerHints
in interface Dockable
hints
- the hints to configure or null
if the last
hints
should no longer be configured by this elementprotected DockableDisplayerHints getConfigurableDisplayerHints()
configureDisplayerHints(DockableDisplayerHints)
.
null
protected void updateConfigurableDisplayerHints()
current hints
of this station.
public DockStation asDockStation()
DockElement
this
if this
is an instance of
DockStation
. Otherwise null
is returned.
asDockStation
in interface DockElement
this
or null
. Must not return null
if DockElement.asDockable()
already returns null
public DefaultDockActionSource getDirectActionOffers(Dockable dockable)
DockStation
dockable
.
getDirectActionOffers
in interface DockStation
dockable
- a child of this station
dockable
, can be null
public DockActionSource getIndirectActionOffers(Dockable dockable)
DockStation
dockable
. The argument dockable
can be a child of this station, or a child of any station which is
below this station.
getIndirectActionOffers
in interface DockStation
dockable
- a child of this station or a child of another station
which is below this station
dockable
or null
public void addDockStationListener(DockStationListener listener)
DockStation
addDockStationListener
in interface DockStation
listener
- the listener to addpublic void removeDockStationListener(DockStationListener listener)
DockStation
removeDockStationListener
in interface DockStation
listener
- the listener to removepublic void addDockableStateListener(DockableStateListener listener)
Dockable
listener
to this Dockable
. The listener will be informed about
various events concerning the position and visibility of this dockable.
addDockableStateListener
in interface Dockable
listener
- the new listener, not null
public void removeDockableStateListener(DockableStateListener listener)
Dockable
listener
from this element.
removeDockableStateListener
in interface Dockable
listener
- the listener to removepublic void addSplitDockStationListener(SplitDockListener listener)
SplitDockStation
are changed.
listener
- the new listenerpublic void removeSplitDockStationListener(SplitDockListener listener)
listener
- The listener to removepublic boolean isChildShowing(Dockable dockable)
DockStation
dockable
is visible or not. Visible
means that the component
of dockable
can be seen by the user. The result must be false
if
this station is not visible.
isChildShowing
in interface DockStation
dockable
- the child whose visibility-state is questioned
dockable
is visible or notDockStation.isStationVisible()
@Deprecated @Todo(compatibility=BREAK_MAJOR, priority=ENHANCEMENT, target=VERSION_1_1_3, description="remove this method") public boolean isVisible(Dockable dockable)
DockStation
dockable
is visible or not. Visible
means that the component
of dockable
can be seen by the user. The result must be false
if
this station is not visible.
isVisible
in interface DockStation
dockable
- the child whose visibility-state is questioned
dockable
is visible or notDockStation.isStationVisible()
public boolean isStationShowing()
DockStation
JFrame
is not visible if the frame is minimized.
isStationShowing
in interface DockStation
@Deprecated @Todo(compatibility=BREAK_MAJOR, priority=ENHANCEMENT, target=VERSION_1_1_3, description="remove this method") public boolean isStationVisible()
DockStation
JFrame
is not visible if the frame is minimized.
isStationVisible
in interface DockStation
public boolean isDockableShowing()
Dockable
Dockable
can be seen by the user. A Dockable
at least needs
to be registered as root-station on a DockController
, or be a child of a root-station
to be visible.Component
s which are displayable
are
are visible to the user.
isDockableShowing
in interface Dockable
true
if the user can actually see this dockable, false
otherwise@Deprecated @Todo(compatibility=BREAK_MAJOR, priority=ENHANCEMENT, target=VERSION_1_1_3, description="remove this method") public boolean isDockableVisible()
Dockable
Dockable
can be seen by the user. A Dockable
at least needs
to be registered as root-station on a DockController
, or be a child of a root-station
to be visible.Component
s which are displayable
are
are visible to the user.
isDockableVisible
in interface Dockable
true
if the user can actually see this dockable, false
otherwisepublic int getDockableCount()
DockStation
getDockableCount
in interface DockStation
public Dockable getDockable(int index)
DockStation
getDockable
in interface DockStation
index
- a value between 0 (incl.) and DockStation.getDockableCount()
(excl.).
public DockableProperty getDockableProperty(Dockable child, Dockable target)
DockStation
DockStation.drop(Dockable, DockableProperty)
.
getDockableProperty
in interface DockStation
child
- a child of this station, this childs location is askedtarget
- an optional hint telling for which dockable the location information
will be used, can be null
. This hint can be used to find a placeholder
that should be part of the result.
DockUtilities.getPropertyChain(DockStation, Dockable)
public void aside(AsideRequest request)
DockStation
DockStation
to find a DockableProperty
that is "aside" another
property. What exactly the meaning of "aside" is, is left to the implementation. Usually
"aside" means on the same "stack" but with the next higher index.request
object contains information about the location whose neighbor is
searched, about a placeholder that should be used for the new location, and offers methods
to forward the call to the next DockStation
or Combiner
if there is a
successor
.answer
methods of request
with every
kind of information it finds.request
, then it just has to return without calling
any of the answer
methods.
aside
in interface DockStation
request
- information about a location and methods to create the neighbor locationCombiner.aside(AsideRequest)
public SplitDockPathProperty getDockablePathProperty(Dockable dockable)
DockableProperty
for the location of dockable
.
The location is encoded as the path through the tree to get to dockable
.
dockable
- the element whose location is searched
public SplitDockPathProperty getDockablePathProperty(Path placeholder)
DockableProperty
pointing to the leaf containing placeholder
.
placeholder
- the placeholder to search, not null
placeholder
or null
if placeholder
was not foundpublic SplitDockProperty getDockableLocationProperty(Dockable dockable)
DockableProperty
for the location of dockable
.
The location is encoded directly as the coordinates x,y,width and height
of the dockable
.
dockable
- the element whose location is searched
public SplitDockPlaceholderProperty getDockablePlaceholderProperty(Dockable dockable, Dockable target)
SplitDockPlaceholderProperty
for dockable
, may
insert an additional placeholder in the tree.
dockable
- the element whose location is searchedtarget
- hint required to find the placeholder
null
if the strategy
did not assign a placeholder to dockable
public Dockable getFrontDockable()
DockStation
null
indicates that there are no children
at all, or that there is no favorite child (all children are equal important).DockController.setFocusedDockable(Dockable, boolean)
which will then call DockStation.setFrontDockable(Dockable)
. Note that the
DockController itself listens to the DockTitles, and maybe the station
doesn't need a logic to decide which child is important.
getFrontDockable
in interface DockStation
null
public void setFrontDockable(Dockable dockable)
DockStation
DockStation.getFrontDockable()
how stations can change
this property.
setFrontDockable
in interface DockStation
dockable
- the new favorite child, can be null
DockStation.getFrontDockable()
public boolean isFullScreen()
Dockable
is currently shown in fullscreen-mode
on this station. A true
result implies that
getFullScreen()
returns not null
.
true
if a child is fullscreen.public Dockable getFullScreen()
Dockable
which is in fullscreen-mode and covers all
other children of this station.
null
setFullScreen(Dockable)
,
isFullScreen()
public boolean hasFullScreenAction()
createFullScreenAction()
was called and returned a value other
than null
.
true
if this station shows a fullscreen-actionpublic void setFullScreen(Dockable dockable)
dockable
- a child of this station or null
if
all children should be visible.isFullScreen()
protected void updateVisibility()
Component.setVisible(boolean)
on all current children and updates the visibility.
depending on whether there is a fullscreen-dockable
or not.
public void setNextFullScreen()
public boolean accept(Dockable child)
DockStation
child
as a new child,
or refuses child
. The user will not be able to drop
a Dockable
onto this station if this method returns
false
.
accept
in interface DockStation
child
- a Dockable
which may become a child
true
if child
is acceptedpublic PlaceholderMapping getPlaceholderMapping()
DockStation
PlaceholderMapping
to add or remove
placeholders from the station.
getPlaceholderMapping
in interface DockStation
public PlaceholderMap getPlaceholders()
DockStation
DockStation
.
A DockStation
is free in the format it chooses to fill the map. The map is to be
created with the assumptions that DockStation.getDockableCount()
is 0
, meaning
any existing Dockable
gets replaced by its placeholder. The current
PlaceholderStrategy
should be used to convert Dockable
s to placeholders.DockStation.getPlaceholderMapping()
.
getPlaceholders
in interface DockStation
null
if this station does not support
placeholderspublic void setPlaceholders(PlaceholderMap placeholders)
DockStation
DockStation.getDockableCount()
is 0
).placeholders
.
setPlaceholders
in interface DockStation
placeholders
- some set of placeholdersprotected SplitPlaceholderConverter createPlaceholderConverter()
getPlaceholders()
and setPlaceholders(PlaceholderMap)
.
PlaceholderMap
s, not null
public DockStationDropLayer[] getLayers()
DockStation
DockStation
can handle a drop event.DockStation
s. The returned DockStationDropLayer
s are then filtered and ordered, the resulting
order defines the order in which the method DockStation.prepareDrop(StationDropItem)
is called.
getLayers
in interface DockStation
null
, must not contain null
,
must not contain the same entry twice. The array or the DockStationDropLayer
s may be modified,
hence this method should always create new objects.public StationDropOperation prepareDrop(StationDropItem item)
DockStation
dockable
or to move around the known child dockable
.
The station can refuse dockable
, in this case this method just returns null
.
There are some constraints:
DockStation.accept(Dockable)
and Dockable.accept(DockStation)
or Dockable.accept(DockStation, Dockable)
to ensure that the desired
drop-location is valid.DockAcceptance
of its controller
(see DockController.getAcceptance()
) to ensure that the drop/location is valid.
prepareDrop
in interface DockStation
item
- information about the dockable that is going to be dropped
Dockable
can be dropped or null
if
no drop operation is possiblepublic StationDragOperation prepareDrag(Dockable dockable)
DockStation
dockable
might
be removed from this station.
prepareDrag
in interface DockStation
dockable
- the child that might be removed in the near future
null
public PutInfo getDropInfo()
Dockable
would be dropped.
null
protected void setDropInfo(PutInfo putInfo)
putInfo
- the current drop informationprotected void setPut(PutInfo putInfo)
SplitSpanStrategy.setPut(PutInfo)
.
putInfo
- the new information about where an item is about to be droppedprotected void unsetDropInfo()
protected void unsetPut()
SplitSpanStrategy.unsetPut()
.
public void drop(Dockable dockable)
DockStation
dockable
to this station. The station can decide
by its own where to put dockable
.
drop
in interface DockStation
dockable
- a new childpublic boolean drop(Dockable dockable, DockableProperty property)
DockStation
dockable
to this station such that the location
given by property
is matched. If property
has a successor
and points to
another station, just call the drop
-method of this
child-station. Note that property
can be of any type and
contain invalid information.
drop
in interface DockStation
dockable
- the new childproperty
- the location of the child, may be invalid data
true
if property
could be read
and dockable
was dropped, false
otherwise.public boolean drop(Dockable dockable, SplitDockProperty property)
Dockable
such that the boundaries given
by property
are full filled.
dockable
- a new child of this stationproperty
- the preferred location of the child
true
if the child could be added, false
if no location could be foundprotected bibliothek.gui.dock.SplitDockStation.DropInfo getDropInfo(SplitDockProperty property, Dockable dockable, SplitNode root)
dockable
such that its boundaries met
property
.
property
- the location of dockable
dockable
- the element to place, can be null
root
- a node that must be part of the path for dockable
dockable
public boolean drop(Dockable dockable, SplitDockPathProperty property)
dockable
at a location such that the path
to that location is the same as described in property
.
dockable
- the element to insertproperty
- the preferred path to the element
true
if the element was successfully insertedprotected Tuple<Integer,SplitNode> getLowestNode(SplitDockPathProperty property)
identifier
is equal to
an identifier from property
. In the best case scenario this method directly
returns the Leaf
to which property
points.
property
- a path in which a SplitNode
is searched
property
, can be the root()
. And
the index of the node for calling SplitDockPathProperty.getNode(int)
.spublic boolean drop(Dockable dockable, SplitDockPlaceholderProperty property)
dockable
at the placeholder that is referenced by property
. This
action removes the placeholder from the tree.
dockable
- the element to addproperty
- the location of dockable
true
if the the operation was a success, false
if notpublic boolean drop(Dockable dockable, SplitDockFullScreenProperty property)
dockable
on this station, may exchange the full screen element to ensure that
dockable
is displayed.
dockable
- the element to dropproperty
- the location of dockable
true
if the operation was a success, false
if notprotected boolean dropOver(Leaf leaf, Dockable dockable, CombinerSource source, CombinerTarget target)
Dockable
of leaf
and dockable
to a new child of this station. No checks whether the two elements accepts
each other nor if the station accepts the new child dockable
are performed.
leaf
- the leaf which will be combined with dockable
dockable
- a Dockable
which is dropped over leaf
source
- information about the combination, may be null
target
- information about the combination, may be null
true
if the operation was successful, false
otherwiseprotected boolean dropOver(Leaf leaf, Dockable dockable, DockableProperty property, CombinerSource source, CombinerTarget target)
Dockable
of leaf
and dockable
to a new child of this station. No checks whether the two elements accepts
each other nor if the station accepts the new child dockable
are performed.
leaf
- the leaf which will be combined with dockable
dockable
- a Dockable
which is dropped over leaf
property
- a hint at which position dockable
should be
in the combination.source
- information about the combination, may be null
target
- information about the combination, may be null
true
if the operation was successful, false
otherwiseprotected boolean dropAside(SplitNode neighbor, PutInfo.Put put, Dockable dockable, Leaf leaf, double divider, DockHierarchyLock.Token token)
dockable
at the side put
of
neighbor
. The divider is set to the value of divider
,
and if fire
is activated, some events are fired. There are
no checks whether dockable
accepts this station or anything
else.
neighbor
- The node which will be the neighbor of dockable
put
- The side on which dockable
should be added in
respect to neighbor
.dockable
- the new child of this stationleaf
- the leaf which contains dockable
, can be null
divider
- the divider-location, a value between 0 and 1token
- if null
, then a token will be acquired by this method
and this method will fire events, otherwise this methods is executed silently
true
if the operation was a success, false
otherwisepublic void move(Dockable dockable, DockableProperty property)
DockStation
dockable
in such a way, that
DockStation.getDockableProperty(Dockable, Dockable)
would return a
DockableProperty
that equals property
.DockStation
does nothing at all.
move
in interface DockStation
dockable
- a child of this stationproperty
- the preferred position of dockable
public void dropGrid(SplitDockGrid grid)
grid
. Any changes to grid
afterwards will not affect this station, nor will changes on this station
affect grid
.
grid
- the layout to drop, not null
dropTree(SplitDockTree)
public void dropTree(SplitDockTree<Dockable> tree)
tree
. Calling this method is equivalent
to dropTree( tree, true );
tree
- the new set of children
SplitDropTreeException
- If the tree is not acceptable.public void dropTree(SplitDockTree<Dockable> tree, boolean checkValidity)
tree
.
tree
- the new set of childrencheckValidity
- whether to ensure that the new elements are
accepted or not.
SplitDropTreeException
- if checkValidity
is
set to true
and the tree is not acceptablepublic DockableSplitDockTree createTree()
SplitDockTree
.
public void createTree(SplitDockTreeFactory factory)
factory
.
factory
- the factory to write intopublic <N> N visit(SplitTreeFactory<N> factory)
N
- the type of result this method producesfactory
- a factory that will collect information
factory
public boolean canDrag(Dockable dockable)
DockStation
dockable
can be removed from this station or not.
This method assumes that dockable
is a child of
this station, if not, then the behavior of this method is unspecified.
canDrag
in interface DockStation
dockable
- a child of this station
true
if dockable
can be draggedpublic void drag(Dockable dockable)
DockStation
DockStation.canDrag(Dockable)
returned false
.DockController.freezeLayout()
and DockController.meltLayout()
to ensure noone else adds or
removes Dockable
s.
drag
in interface DockStation
dockable
- the child to removeprotected void fireFullScreenChanged(Dockable oldDockable, Dockable newDockable)
SplitDockListener
,
that the Dockable
in fullscreen-mode has changed.
oldDockable
- the old fullscreen-Dockable, can be null
newDockable
- the new fullscreen-Dockable, can be null
protected void fireTitleExchanged(DockTitle title)
DockableListener
s that title
is no longer
considered to be a good title and should be exchanged.
title
- a title, can be null
protected void fireTitleExchanged()
DockableListener
s that all bound titles and the
null
title are no longer considered good titles and
should be replaced
public Dockable asDockable()
DockElement
this
if this
is an instance of
Dockable
. Otherwise null
is returned.
asDockable
in interface DockElement
asDockable
in interface PlaceholderListItem<Dockable>
this
or null
. Must not return null
if DockElement.asDockable()
already returns null
.public DefaultStationPaintValue getPaint()
StationPaint
to paint markings on this station.
public DefaultDisplayerFactoryValue getDisplayerFactory()
DisplayerFactory
to create new DockableDisplayer
for this station.
public DisplayerCollection getDisplayers()
displayers
that are currently
used by this station.
public StationCombinerValue getCombiner()
Combiner
to combine Dockables
on
this station.
protected void paintOverlay(Graphics g)
OverpaintablePanel
paintOverlay
in class OverpaintablePanel
g
- the graphics to usepublic void addDockable(Dockable dockable)
dockable
to this station.
dockable
- A Dockable
which must not be a child
of this station.public boolean canReplace(Dockable old, Dockable next)
DockStation
old
with next
where next is not a child of this station.
canReplace
in interface DockStation
old
- a child of this stationnext
- the replacement of next
.
true
if the replacement is possiblepublic void replace(DockStation old, Dockable next)
DockStation
old
by next
which is
not yet a child of this station. This method should not be
called if canReplace
returned
false
. This method can assume that next
was
a child of old
but no longer is.
replace
in interface DockStation
old
- a dockable station that is a child of this stationnext
- the replacement of old
public void replace(Dockable previous, Dockable next)
DockStation
old
by next
which is
not yet a child of this station. This method should not be
called if canReplace
returned
false
.
replace
in interface DockStation
previous
- a childnext
- the replacement of old
protected void discard(DockableDisplayer displayer)
displayer
and creates a replacement.
displayer
- the displayer to replacespublic int indexOfDockable(Dockable dockable)
dockable
- the child which is searched
public void removeAllDockables()
DockController.freezeLayout()
and DockController.meltLayout()
to ensure noone else adds or
removes Dockable
s.
public void removeDockable(Dockable dockable)
dockable
from this station. If
dockable
is not a child of this station, nothing happens.DockController.freezeLayout()
and DockController.meltLayout()
to ensure noone else adds or
removes Dockable
s.
dockable
- the child to removepublic void removePlaceholder(Path placeholder)
placeholder
and
removes placeholder
. Also shrinks the tree if some nodes or leafs
are no longer required due to the removed placeholder
placeholder
- the placeholder to removepublic void removePlaceholders(Set<Path> placeholders)
placeholders
.
All placeholders are removed and the tree shrinks where possible.
placeholders
- the placeholders to removepublic Root getRoot()
Root
of the tree which stores all locations and sizes
of the children of this station. Clients can modify the contents of this
station directly by accessing this tree.Dockable
s, that has to be explicitly done through
Leaf.setDockable(Dockable, bibliothek.gui.dock.DockHierarchyLock.Token)
.Node
should have two children, and each Leaf
should have
a Dockable
.
root()
public SplitNode getNode(long id)
id
equals id
.
id
- the id to search
id
public String getFactoryID()
DockElement
DockFactory
which can read
and write elements of this type.
getFactoryID
in interface DockElement
public void updateBounds()
Components
which are in the structure of this tree.
protected SplitDockStation.Access getAccess()
SplitDockStation
. Subclasses
should be very careful when invoking methods of SplitDockStation.Access
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |