|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.javadocking.dock.factory.LeafDockFactory
public class LeafDockFactory
This dock factory checks the docking modes of the given dockable and creates a dock in which the dockable is allowed to be docked.
When the property useLastDockingMode
is true, the last docking mode
of the dockable is used to create an appropriate dock.
When the property useLastDockingMode
is false, it tries to create a
dock of the given types in the given order:
GridDock
for DockingMode.TOOL_GRID
.LineDock
for DockingMode.HORIZONTAL_TOOLBAR
.LineDock
for DockingMode.VERTICAL_TOOLBAR
.GridDock
for DockingMode.MINIMIZE_GRID
.LineDock
for DockingMode.HORIZONTAL_MINIMIZE
.LineDock
for DockingMode.VERTICAL_MINIMIZE
.TabDock
for DockingMode.TAB
.SingleDock
for DockingMode.SINGLE
.LineDock
for DockingMode.HORIZONTAL_LINE
.LineDock
for DockingMode.VERTICAL_LINE
.GridDock
for DockingMode.GRID
.
Constructor Summary | |
---|---|
LeafDockFactory()
Constructs a dock factory that creates LeafDock s. |
|
LeafDockFactory(boolean useLastDockingMode)
Constructs a dock factory that creates LeafDock s. |
Method Summary | |
---|---|
Dock |
createDock(Dockable dockable,
int dockingMode)
Creates a dock for the given dockable. |
java.awt.Dimension |
getDockPreferredSize(Dockable dockable,
int dockingMode)
Gets the preferred size for the dock that will be created by this factory. |
boolean |
getUseLastDockingMode()
Returns whether the last docking mode of the dockable will be used to create a new dock. |
void |
loadProperties(java.lang.String prefix,
java.util.Properties properties)
Sets the properties for this dock factory. |
void |
saveProperties(java.lang.String prefix,
java.util.Properties properties)
Saves the properties of this dock factory in the given properties object. |
void |
setUseLastDockingMode(boolean useLastDockingMode)
Sets whether the last docking mode of the dockable will be used to create a new dock. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LeafDockFactory()
LeafDock
s.
public LeafDockFactory(boolean useLastDockingMode)
LeafDock
s.
useLastDockingMode
- When true, this factory tries to create a dock with the same docking mode
as the last docking mode of the given dockable (Dockable.getLastDockingMode()
).Method Detail |
---|
public Dock createDock(Dockable dockable, int dockingMode)
DockFactory
createDock
in interface DockFactory
dockable
- The dockable for which the dock is created.dockingMode
- The docking mode that is used for docking the dockable.
This integer should be a constant defined by DockingMode
.
public java.awt.Dimension getDockPreferredSize(Dockable dockable, int dockingMode)
DockFactory
getDockPreferredSize
in interface DockFactory
dockable
- The dockable for which the dock is created.dockingMode
- The docking mode that is used for docking the dockable.
This integer should be a constant defined by DockingMode
.
public void saveProperties(java.lang.String prefix, java.util.Properties properties)
DockFactory
saveProperties
in interface DockFactory
prefix
- The prefix for the property names.properties
- The properties object to which the properties should be added.public void loadProperties(java.lang.String prefix, java.util.Properties properties)
DockFactory
loadProperties
in interface DockFactory
prefix
- The prefix of the names of the properties that have been intended for this dock factory.properties
- The properties object that contains the properties for this dock factory. It can contain also
properties for other objects, but they will have another prefix.public boolean getUseLastDockingMode()
Dockable.getLastDockingMode()
).public void setUseLastDockingMode(boolean useLastDockingMode)
useLastDockingMode
- When true, this factory tries to create a dock with the same docking mode
as the last docking mode of the given dockable (Dockable.getLastDockingMode()
).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |