Class Location

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

public class Location extends Object
Describes the location of a Dockable on some station.
Author:
Benjamin Sigg
  • Constructor Details

    • 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 Details

    • 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