Class VisualLayoutCreationTO

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

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

    • VisualLayoutCreationTO

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

    • withName

      public VisualLayoutCreationTO withName​(@Nonnull java.lang.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 java.util.Map<java.lang.String,​java.lang.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 java.lang.String key, @Nonnull java.lang.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.
    • getModelElements

      @Nonnull public java.util.List<ModelLayoutElementCreationTO> getModelElements()
      Returns the model layout elements of this visual layout.
      Returns:
      The model layout elements of this visual layout.
    • withModelElements

      public VisualLayoutCreationTO withModelElements​(@Nonnull java.util.List<ModelLayoutElementCreationTO> modelElements)
      Creates a copy of this object with the given model elements
      Parameters:
      modelElements - The new model layout elements.
      Returns:
      A copy of this object, differing in the layout elements of this visual layout.
    • withModelElement

      public VisualLayoutCreationTO withModelElement​(@Nonnull ModelLayoutElementCreationTO modelElement)
      Creates a copy of this object with the given model element.
      Parameters:
      modelElement - The new model layout elements.
      Returns:
      A copy of this object, differing in the layout elements of this visual layout.
    • getShapeElements

      @Nonnull public java.util.List<ShapeLayoutElementCreationTO> getShapeElements()
      Returns the shape layout elements of this visual layout.
      Returns:
      The shape layout elements of this visual layout.
    • withShapeElements

      public VisualLayoutCreationTO withShapeElements​(@Nonnull java.util.List<ShapeLayoutElementCreationTO> shapeElements)
      Creates a copy of this object with the given shape elements.
      Parameters:
      shapeElements - the new shape layout elements.
      Returns:
      A copy of this object, differing in the shape layout elements of this visual layout.
    • withShapeElement

      public VisualLayoutCreationTO withShapeElement​(@Nonnull ShapeLayoutElementCreationTO shapeElement)
      Creates a copy of this object with the given shape element.
      Parameters:
      shapeElement - the new shape layout element.
      Returns:
      A copy of this object, differing in the shape layout elements of this visual layout.