bibliothek.gui.dock.facile.mode
Class Location

java.lang.Object
  extended by bibliothek.gui.dock.facile.mode.Location

public class Location
extends Object

Describes the location of a Dockable on some station.

Author:
Benjamin Sigg

Constructor Summary
Location(Path mode, String root, DockableProperty location)
          Creates a new location.
Location(Path mode, String root, DockableProperty location, boolean applicationDefined)
          Creates a new location.
 
Method Summary
 DockableProperty getLocation()
          Gets the location on the parent station.
 Path getMode()
          Gets the mode which is responsible for this location.
 String getRoot()
          Gets the unique identifier of the parent station.
 boolean isApplicationDefined()
          Tells whether this location was defined by the client application.
 void resetApplicationDefined()
          Sets the property isApplicationDefined() to false.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Location

public Location(Path mode,
                String root,
                DockableProperty location)
Creates a new location.

Parameters:
mode - the mode which is responsible for handling this location
root - the identifier of the parent station, must not be null
location - the location on the station, may be null

Location

public Location(Path mode,
                String root,
                DockableProperty location,
                boolean applicationDefined)
Creates a new location.

Parameters:
mode - the mode which is responsible for handling this location
root - the identifier of the parent station, must not be null
location - the location on the station, may be null
applicationDefined - whether this location was defined by the client application
Method Detail

getMode

public Path getMode()
Gets the mode which is responsible for this location.

Returns:
the mode

getRoot

public String getRoot()
Gets the unique identifier of the parent station.

Returns:
the identifier, not null

getLocation

public DockableProperty getLocation()
Gets the location on the parent station.

Returns:
the location, may be null

isApplicationDefined

public boolean isApplicationDefined()
Tells whether this location was defined by the client application. A location is defined by the client application if for example the method CDockable.setLocation(bibliothek.gui.dock.common.CLocation) is used to set the location of a CDockable. If possible application defined locations should not be automatically rewritten.
The state "application defined" is lost as soon as the owning Dockable has been put at this location.

Returns:
whether this location has been defined by a client application

resetApplicationDefined

public void resetApplicationDefined()
Sets the property isApplicationDefined() to false.


toString

public String toString()
Overrides:
toString in class Object