Package bibliothek.gui.dock.facile.mode
Class Location
java.lang.Object
bibliothek.gui.dock.facile.mode.Location
Describes the location of a
Dockable on some station.- Author:
- Benjamin Sigg
-
Constructor Summary
ConstructorsConstructorDescriptionLocation(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
Modifier and TypeMethodDescriptionGets the location on the parent station.getMode()Gets the mode which is responsible for this location.getRoot()Gets the unique identifier of the parent station.booleanTells whether this location was defined by the client application.voidSets the propertyisApplicationDefined()tofalse.toString()
-
Constructor Details
-
Location
Creates a new location.- Parameters:
mode- the mode which is responsible for handling this locationroot- the identifier of the parent station, must not benulllocation- the location on the station, may benull
-
Location
Creates a new location.- Parameters:
mode- the mode which is responsible for handling this locationroot- the identifier of the parent station, must not benulllocation- the location on the station, may benullapplicationDefined- whether this location was defined by the client application
-
-
Method Details
-
getMode
Gets the mode which is responsible for this location.- Returns:
- the mode
-
getRoot
Gets the unique identifier of the parent station.- Returns:
- the identifier, not
null
-
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 methodCDockable.setLocation(bibliothek.gui.dock.common.CLocation)is used to set the location of aCDockable. If possible application defined locations should not be automatically rewritten.
The state "application defined" is lost as soon as the owningDockablehas been put at this location.- Returns:
- whether this location has been defined by a client application
-
resetApplicationDefined
public void resetApplicationDefined()Sets the propertyisApplicationDefined()tofalse. -
toString
-