Class CSplitLocation

java.lang.Object
bibliothek.gui.dock.common.CLocation
bibliothek.gui.dock.common.location.CSplitLocation
Direct Known Subclasses:
CContentAreaCenterLocation, CGridAreaLocation, CWorkingAreaLocation

public class CSplitLocation extends CLocation
This location is used to describe a SplitDockStation.
Author:
Benjamin Sigg
  • Constructor Details

    • CSplitLocation

      public CSplitLocation()
      Creates a new location
    • CSplitLocation

      public CSplitLocation(CLocation parent)
      Creates a new location
      Parameters:
      parent - the parent location, can be null
  • Method Details

    • aside

      @Deprecated public CLocation aside()
      Deprecated.
      see CLocation.aside() for an explanation.
      Description copied from class: CLocation
      Returns a CLocation that describes the location of an element that should be inserted next to this location.
      Specified by:
      aside in class CLocation
      Returns:
      the new location
    • getParent

      public CLocation getParent()
      Description copied from class: CLocation
      Gets the parent location of this location. Some root-locations may never have a parent.
      Specified by:
      getParent in class CLocation
      Returns:
      the parent location, can be null
    • rectangle

      public CRectangleLocation rectangle(double x, double y, double width, double height)
      Creates a location which occupies a sub-rectangle of the SplitDockStation which is described by this location. All arguments of this method must be between 0 and 1, and x+width and y+height should be smaller or equal to 1.
      Parameters:
      x - the relative x coordinate
      y - the relative y coordinate
      width - the relative width
      height - the relative height
      Returns:
      the location describing a rectangle
    • stack

      public CStackLocation stack()
      Creates a new location which represents a position in a stack that covers the whole SplitDockStation.
      Returns:
      the new location
    • stack

      public CStackLocation stack(int index)
      Creates a new location which represents a position in a stack that covers the whole SplitDockStation.
      Parameters:
      index - the index within the stack
      Returns:
      the new location
    • north

      public TreeLocationRoot north(double size)
      Creates a location that describes a space in the upper part of the SplitDockStation.
      Parameters:
      size - the size of the space, between 0 and 1
      Returns:
      the new location
    • north

      public TreeLocationRoot north(double size, long nodeId)
      Creates a location that describes a space in the upper part of the SplitDockStation.
      Parameters:
      size - the size of the space, between 0 and 1
      nodeId - the unique identifier of the new node, can be -1
      Returns:
      the new location
    • south

      public TreeLocationRoot south(double size)
      Creates a location that describes a space in the lower part of the SplitDockStation.
      Parameters:
      size - the size of the space, between 0 and 1
      Returns:
      the new location
    • south

      public TreeLocationRoot south(double size, long nodeId)
      Creates a location that describes a space in the lower part of the SplitDockStation.
      Parameters:
      size - the size of the space, between 0 and 1
      nodeId - the unique identifier of the new node, can be -1
      Returns:
      the new location
    • east

      public TreeLocationRoot east(double size)
      Creates a location that describes a space in the right part of the SplitDockStation.
      Parameters:
      size - the size of the space, between 0 and 1
      Returns:
      the new location
    • east

      public TreeLocationRoot east(double size, long nodeId)
      Creates a location that describes a space in the right part of the SplitDockStation.
      Parameters:
      size - the size of the space, between 0 and 1
      nodeId - the unique identifier of the new node, can be -1
      Returns:
      the new location
    • west

      public TreeLocationRoot west(double size)
      Creates a location that describes a space in the left part of the SplitDockStation.
      Parameters:
      size - the size of the space, between 0 and 1
      Returns:
      the new location
    • west

      public TreeLocationRoot west(double size, long nodeId)
      Creates a location that describes a space in the left part of the SplitDockStation.
      Parameters:
      size - the size of the space, between 0 and 1
      nodeId - the unique identifier of the new node, can be -1
      Returns:
      the new location
    • findMode

      public ExtendedMode findMode()
      Description copied from class: CLocation
      Gets the mode this location represents.
      Specified by:
      findMode in class CLocation
      Returns:
      the mode or null
    • findRoot

      public String findRoot()
      Description copied from class: CLocation
      Gets the name of the station this location belongs to. This can be the id of any CStation.
      Specified by:
      findRoot in class CLocation
      Returns:
      the name of the station or null if this location does not have enough information to find the root
    • findProperty

      public DockableProperty findProperty(DockableProperty successor)
      Description copied from class: CLocation
      Gets a path describing this location in terms of the DockingFrames.
      Specified by:
      findProperty in class CLocation
      Parameters:
      successor - the path of the elements above this location or null
      Returns:
      the path to this location or null, can also be successor
    • toString

      public String toString()
      Overrides:
      toString in class Object