Class CExternalizedLocation

Direct Known Subclasses:
CMaximalExternalizedLocation

public class CExternalizedLocation extends AbstractStackholdingLocation
A location representing an externalized element.
Author:
Benjamin Sigg
  • Field Details

  • Constructor Details

    • CExternalizedLocation

      public CExternalizedLocation(int x, int y, int width, int height)
      Creates a new location.
      Parameters:
      x - the x-coordinate in pixel
      y - the y-coordinate in pixel
      width - the width in pixel
      height - the height in pixel
    • CExternalizedLocation

      public CExternalizedLocation(CLocation parent, int x, int y, int width, int height)
      Creates a new location.
      Parameters:
      parent - the parent location, can be null
      x - the x-coordinate in pixel
      y - the y-coordinate in pixel
      width - the width in pixel
      height - the height in pixel
  • Method Details

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

      public CMaximalExternalizedLocation maximize()
      Returns a location describing an element with the coordinates of this location but that was maximized.
      Returns:
      the maximized version of this location
    • 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
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getParent

      public CLocation getParent()
      Gets the parent location, if there is any.
      Specified by:
      getParent in class CLocation
      Returns:
      the parent location, can be null
    • getX

      public int getX()
      Gets the left end of the element.
      Returns:
      the x coordinate
    • getY

      public int getY()
      Gets the top end of the element.
      Returns:
      the y coordinate
    • getWidth

      public int getWidth()
      Gets the width of the element.
      Returns:
      the width
    • getHeight

      public int getHeight()
      Gets the height of the element.
      Returns:
      the height