com.javadocking.dock.docker
Interface Docker

All Known Implementing Classes:
BorderDocker

public interface Docker

An interface for an object that docks a Dockable in a Dock.

The implementations can decide by themselves which strategy they will use to find or create a dock and to position the dockable in the dock.

Author:
Heidi Rakels.

Method Summary
 boolean dock(Dockable dockable)
          Docks the dockable in a Dock.
 void loadProperties(java.lang.String prefix, java.util.Properties properties, java.util.Map dockablesMap)
           Loads the properties for this docker.
 void saveProperties(java.lang.String prefix, java.util.Properties properties)
           Saves the properties of this docker in the given properties object.
 

Method Detail

dock

boolean dock(Dockable dockable)
Docks the dockable in a Dock.

Parameters:
dockable - The dockable that has to be docked.
Returns:
True if the dockable could be docked, false otherwise.

saveProperties

void saveProperties(java.lang.String prefix,
                    java.util.Properties properties)

Saves the properties of this docker in the given properties object.

The property names for this docker should start with the given prefix.

Parameters:
prefix - The prefix for the property names.
properties - The properties object to which the properties should be added.

loadProperties

void loadProperties(java.lang.String prefix,
                    java.util.Properties properties,
                    java.util.Map dockablesMap)
                    throws java.io.IOException

Loads the properties for this docker. The properties can be found in the given properties object. The property names for this docker start with the given prefix.

This method should be called after the empty constructor to create the content of the docker. Don't call this method for a visualizer that already has a content.

Parameters:
prefix - The prefix of the names of the properties that have been intended for this docker.
properties - The properties object that contains the properties for this docker. It can contain also properties for other objects, but they will have another prefix.
dockablesMap - A mapping that contains the available dockables.
  • map key: the ID of the dockable (java.lang.String).
  • map value: the dockable (Dockable).
Throws:
java.io.IOException - If an error occures while decoding the properties.