|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.javadocking.model.DefaultDockModel
com.javadocking.model.FloatDockModel
public class FloatDockModel
This dock model adds for every owner window automatically a FloatDock
and a FloatExternalizer
.
Information on using float dock models is in How to Use Dock Models in The Sanaware Developer Guide.
If another float dock is added to the dock model, the key for the float dock of that owner has to
be used. This key can be retrieved with getFloatDockKey(Window)
.
Field Summary | |
---|---|
static java.lang.String |
FLOAT_DOCK_KEY
The suffix for the keys of the float root docks. |
Constructor Summary | |
---|---|
FloatDockModel()
Constructs a float dock model. |
|
FloatDockModel(FloatDockFactory floatDockFactory)
Constructs a float dock model with the given factory for creating the default float docks of this model. |
|
FloatDockModel(java.lang.String source)
Constructs a float dock model with the given source. |
|
FloatDockModel(java.lang.String source,
FloatDockFactory floatDockFactory)
Constructs a float dock model with the given source and the given factory for creating the default float docks of this model. |
Method Summary | |
---|---|
void |
addOwner(java.lang.String ownerId,
java.awt.Window ownerWindow)
Adds the owner window and its ID. |
void |
addRootDock(java.lang.String rootKey,
Dock dock,
java.awt.Window owner)
Checks that the appropriate key is used ( getFloatDockKey(Window) ), when the root dock is a FloatDock . |
FloatDock |
getFloatDock(java.awt.Window owner)
Gets the root dock that is the float dock of the given owner window. |
FloatDockFactory |
getFloatDockFactory()
Gets the factory of the float docks. |
java.lang.String |
getFloatDockKey(java.awt.Window owner)
Creates the key for a float dock with the given owner ID. |
void |
loadProperties(java.lang.String sourceName,
java.lang.String prefix,
java.util.Properties properties,
java.util.Map dockablesMap,
java.util.Map ownersMap,
java.util.Map docks,
java.util.Map visualizersMap)
Loads the properties for this dock model. |
void |
saveProperties(java.lang.String prefix,
java.util.Properties properties,
java.util.Map docks)
Saves the properties of this dock model in the given properties object. |
void |
setFloatDockFactory(FloatDockFactory floatDockProvider)
Sets the factory of the float docks. |
Methods inherited from class com.javadocking.model.DefaultDockModel |
---|
addVisualizer, getOwner, getOwnerCount, getOwnerID, getRootDock, getRootKeys, getSource, getVisualizer, getVisualizerKeys, isLoadOwnerRectangle, removeOwner, removeRootDock, removeVisualizer, setLoadOwnerRectangle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String FLOAT_DOCK_KEY
Constructor Detail |
---|
public FloatDockModel()
public FloatDockModel(java.lang.String source)
source
- The name of the data source for this dock model.public FloatDockModel(FloatDockFactory floatDockFactory)
floatDockFactory
- This factory creates the default float docks for this dock model.public FloatDockModel(java.lang.String source, FloatDockFactory floatDockFactory)
source
- The name of the data source for this dock model.floatDockFactory
- This factory creates the default float docks for this dock model.Method Detail |
---|
public void addOwner(java.lang.String ownerId, java.awt.Window ownerWindow)
FloatDock
created with the floatDockFactory
.
addOwner
in interface DockModel
addOwner
in class DefaultDockModel
ownerId
- The ID for the owner. All the owner window IDs have to be different.ownerWindow
- The owner window.public void addRootDock(java.lang.String rootKey, Dock dock, java.awt.Window owner)
getFloatDockKey(Window)
), when the root dock is a FloatDock
.
addRootDock
in interface DockModel
addRootDock
in class DefaultDockModel
rootKey
- The key for the root dock. These keys should be different for all root docks and visualizers.dock
- The root dock that is added.owner
- The window that owns this dock.public FloatDock getFloatDock(java.awt.Window owner)
DockModel
getFloatDock
in interface DockModel
getFloatDock
in class DefaultDockModel
owner
- The owner window of the float dock.
public java.lang.String getFloatDockKey(java.awt.Window owner)
ownerId
and FLOAT_DOCK_KEY
.
getFloatDockKey
in interface DockModel
getFloatDockKey
in class DefaultDockModel
owner
- The owner window of the float dock.
public FloatDockFactory getFloatDockFactory()
DefaultFloatDockFactory
.
public void setFloatDockFactory(FloatDockFactory floatDockProvider)
floatDockProvider
- The factory of the float docks.public void loadProperties(java.lang.String sourceName, java.lang.String prefix, java.util.Properties properties, java.util.Map dockablesMap, java.util.Map ownersMap, java.util.Map docks, java.util.Map visualizersMap) throws java.io.IOException
DockModel
Loads the properties for this dock model. The properties can be found in the given properties object and the property names for this dock model start with the given prefix.
The dockables that should be docked in this dock model are added to this dock model. They can be found in the given dockables mapping. The owner windows with their IDs can be found in the given owners mapping.
This method should be called after the empty constructor to create the content of the dock model. Don't call this method for a dock model that already has a content.
loadProperties
in interface DockModel
loadProperties
in class DefaultDockModel
sourceName
- The name of a data source; typically a file name or a URL.prefix
- The prefix for the property names.properties
- The properties object that contains the properties for this dock model. It can contain also
properties for other objects, but they will have another prefix.dockablesMap
- A map with the dockables for the model.
Dockable
).ownersMap
- A map with the owner windows.
docks
- The decoded docks should be added to this map. The keys are the keys that were used for encoding the docks.
Dock
).visualizersMap
- A map with the visualizers.
java.io.IOException
- If an error occurs while decoding the data.public void saveProperties(java.lang.String prefix, java.util.Properties properties, java.util.Map docks)
DockModel
Saves the properties of this dock model in the given properties object.
The property names for this dock model should start with the given prefix.
saveProperties
in interface DockModel
saveProperties
in class DefaultDockModel
prefix
- The prefix for the property names.properties
- The properties object to which the properties should be added.docks
- A mapping between the docks that are already saved and the keys that are used for the save.
The encoded docks should be added to this map.
Dock
).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |