Class Point.Layout

java.lang.Object
org.opentcs.data.model.Point.Layout
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
Point

public static class Point.Layout
extends java.lang.Object
implements java.io.Serializable
Contains information regarding the grahical representation of a point.
See Also:
Serialized Form
  • Constructor Summary

    Constructors 
    Constructor Description
    Layout()
    Creates a new instance.
    Layout​(Couple position, Couple labelOffset, int layerId)
    Creates a new instance.
  • Method Summary

    Modifier and Type Method Description
    Couple getLabelOffset()
    Returns the offset of the label's position to the point's position (in lu).
    int getLayerId()
    Returns the ID of the layer on which the point is to be drawn.
    Couple getPosition()
    Returns the coordinates at which the point is to be drawn (in mm).
    Point.Layout withLabelOffset​(Couple labelOffset)
    Creates a copy of this object, with the given X label offset.
    Point.Layout withLayerId​(int layerId)
    Creates a copy of this object, with the given layer ID.
    Point.Layout withPosition​(Couple position)
    Creates a copy of this object, with the given position.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Layout

      public Layout()
      Creates a new instance.
    • Layout

      public Layout​(Couple position, Couple labelOffset, int layerId)
      Creates a new instance.
      Parameters:
      position - The coordinates at which the point is to be drawn (in mm).
      labelOffset - The offset of the label's position to the point's position (in lu).
      layerId - The ID of the layer on which the point is to be drawn.
  • Method Details

    • getPosition

      public Couple getPosition()
      Returns the coordinates at which the point is to be drawn (in mm).
      Returns:
      The coordinates at which the point is to be drawn (in mm).
    • withPosition

      public Point.Layout withPosition​(Couple position)
      Creates a copy of this object, with the given position.
      Parameters:
      position - The value to be set in the copy.
      Returns:
      A copy of this object, differing in the given value.
    • getLabelOffset

      public Couple getLabelOffset()
      Returns the offset of the label's position to the point's position (in lu).
      Returns:
      The offset of the label's position to the point's position (in lu).
    • withLabelOffset

      public Point.Layout withLabelOffset​(Couple labelOffset)
      Creates a copy of this object, with the given X label offset.
      Parameters:
      labelOffset - The value to be set in the copy.
      Returns:
      A copy of this object, differing in the given value.
    • getLayerId

      public int getLayerId()
      Returns the ID of the layer on which the point is to be drawn.
      Returns:
      The layer ID.
    • withLayerId

      public Point.Layout withLayerId​(int layerId)
      Creates a copy of this object, with the given layer ID.
      Parameters:
      layerId - The value to be set in the copy.
      Returns:
      A copy of this object, differing in the given value.