Class VisualLayoutCreationTO

java.lang.Object
org.opentcs.access.to.CreationTO
org.opentcs.access.to.model.VisualLayoutCreationTO
All Implemented Interfaces:
Serializable

public class VisualLayoutCreationTO extends CreationTO implements Serializable
A transfer object describing a visual layout in the plant model.
See Also:
  • Constructor Details

    • VisualLayoutCreationTO

      public VisualLayoutCreationTO(@Nonnull String name)
      Creates a new instance.
      Parameters:
      name - The name of this visual layout.
  • Method Details

    • withName

      public VisualLayoutCreationTO withName(@Nonnull String name)
      Creates a copy of this object with the given name.
      Overrides:
      withName in class CreationTO
      Parameters:
      name - the new name of the instance.
      Returns:
      A copy of this object, differing in the given value.
    • withProperties

      public VisualLayoutCreationTO withProperties(@Nonnull Map<String,String> properties)
      Creates a copy of this object with the given properties.
      Overrides:
      withProperties in class CreationTO
      Parameters:
      properties - The new properties.
      Returns:
      A copy of this object, differing in the given value.
    • withProperty

      public VisualLayoutCreationTO withProperty(@Nonnull String key, @Nonnull String value)
      Creates a copy of this object and adds the given property. If value == null, then the key-value pair is removed from the properties.
      Overrides:
      withProperty in class CreationTO
      Parameters:
      key - the key.
      value - the value
      Returns:
      A copy of this object that either includes the given entry in it's current properties, if value != null or excludes the entry otherwise.
    • getScaleX

      public double getScaleX()
      Returns this layout's scale on the X axis (in mm/pixel).
      Returns:
      This layout's scale on the X axis.
    • withScaleX

      public VisualLayoutCreationTO withScaleX(double scaleX)
      Creates a copy of this object with the layout's scale on the X axis (in mm/pixel).
      Parameters:
      scaleX - The new scale.
      Returns:
      A copy of this object, differing in the given value.
    • getScaleY

      public double getScaleY()
      Returns this layout's scale on the Y axis (in mm/pixel).
      Returns:
      This layout's scale on the Y axis.
    • withScaleY

      public VisualLayoutCreationTO withScaleY(double scaleY)
      Creates a copy of this object with the given layout's scale on the Y axis (in mm/pixel).
      Parameters:
      scaleY - The new scale.
      Returns:
      A copy of this object, differing in the given value.
    • getLayers

      @Nonnull public List<Layer> getLayers()
      Returns the layers of this visual layout.
      Returns:
      The layers of this visual layout.
    • withLayers

      public VisualLayoutCreationTO withLayers(@Nonnull List<Layer> layers)
      Creates a copy of this object, with the given layers.
      Parameters:
      layers - The value to be set in the copy.
      Returns:
      A copy of this object, differing in the given value.
    • withLayer

      public VisualLayoutCreationTO withLayer(@Nonnull Layer layer)
      Creates a copy of this object, with the given layer.
      Parameters:
      layer - The value to be set in the copy.
      Returns:
      A copy of this object, differing in the given value.
    • getLayerGroups

      @Nonnull public List<LayerGroup> getLayerGroups()
      Returns the layer groups of this visual layout.
      Returns:
      The layer groups of this visual layout.
    • withLayerGroups

      public VisualLayoutCreationTO withLayerGroups(@Nonnull List<LayerGroup> layerGroups)
      Creates a copy of this object, with the given layer groups.
      Parameters:
      layerGroups - The value to be set in the copy.
      Returns:
      A copy of this object, differing in the given value.
    • withLayerGroup

      public VisualLayoutCreationTO withLayerGroup(@Nonnull LayerGroup layerGroup)
      Creates a copy of this object, with the given layer group.
      Parameters:
      layerGroup - The value to be set in the copy.
      Returns:
      A copy of this object, differing in the given value.
    • toString

      public String toString()
      Overrides:
      toString in class Object