Package org.opentcs.access.to.model
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 Summary
Constructors Constructor Description VisualLayoutCreationTO(java.lang.String name)
Creates a new instance. -
Method Summary
Modifier and Type Method Description java.util.List<LayerGroup>
getLayerGroups()
Returns the layer groups of this visual layout.java.util.List<Layer>
getLayers()
Returns the layers of this visual layout.java.util.List<ModelLayoutElementCreationTO>
getModelElements()
Deprecated.double
getScaleX()
Returns this layout's scale on the X axis (in mm/pixel).double
getScaleY()
Returns this layout's scale on the Y axis (in mm/pixel).java.util.List<ShapeLayoutElementCreationTO>
getShapeElements()
Deprecated.java.lang.String
toString()
VisualLayoutCreationTO
withLayer(Layer layer)
Creates a copy of this object, with the given layer.VisualLayoutCreationTO
withLayerGroup(LayerGroup layerGroup)
Creates a copy of this object, with the given layer group.VisualLayoutCreationTO
withLayerGroups(java.util.List<LayerGroup> layerGroups)
Creates a copy of this object, with the given layer groups.VisualLayoutCreationTO
withLayers(java.util.List<Layer> layers)
Creates a copy of this object, with the given layers.VisualLayoutCreationTO
withModelElement(ModelLayoutElementCreationTO modelElement)
Deprecated.VisualLayoutCreationTO
withModelElements(java.util.List<ModelLayoutElementCreationTO> modelElements)
Deprecated.VisualLayoutCreationTO
withName(java.lang.String name)
Creates a copy of this object with the given name.VisualLayoutCreationTO
withProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Creates a copy of this object with the given properties.VisualLayoutCreationTO
withProperty(java.lang.String key, java.lang.String value)
Creates a copy of this object and adds the given property.VisualLayoutCreationTO
withScaleX(double scaleX)
Creates a copy of this object with the layout's scale on the X axis (in mm/pixel).VisualLayoutCreationTO
withScaleY(double scaleY)
Creates a copy of this object with the given layout's scale on the Y axis (in mm/pixel).VisualLayoutCreationTO
withShapeElement(ShapeLayoutElementCreationTO shapeElement)
Deprecated.VisualLayoutCreationTO
withShapeElements(java.util.List<ShapeLayoutElementCreationTO> shapeElements)
Deprecated.Methods inherited from class org.opentcs.access.to.CreationTO
getModifiableProperties, getName, getProperties, listWithAppendix, mapWithMapping, propertiesWith
-
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
Creates a copy of this object with the given name.- Overrides:
withName
in classCreationTO
- 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 classCreationTO
- 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 classCreationTO
- 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
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
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
@Deprecated @ScheduledApiChange(details="Will be removed.", when="6.0") @Nonnull public java.util.List<ModelLayoutElementCreationTO> getModelElements()Deprecated.Returns the model layout elements of this visual layout.- Returns:
- The model layout elements of this visual layout.
-
withModelElements
@Deprecated @ScheduledApiChange(details="Will be removed.", when="6.0") public VisualLayoutCreationTO withModelElements(@Nonnull java.util.List<ModelLayoutElementCreationTO> modelElements)Deprecated.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
@Deprecated @ScheduledApiChange(details="Will be removed.", when="6.0") public VisualLayoutCreationTO withModelElement(@Nonnull ModelLayoutElementCreationTO modelElement)Deprecated.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
@Deprecated @ScheduledApiChange(details="Will be removed.", when="6.0") @Nonnull public java.util.List<ShapeLayoutElementCreationTO> getShapeElements()Deprecated.Returns the shape layout elements of this visual layout.- Returns:
- The shape layout elements of this visual layout.
-
withShapeElements
@Deprecated @ScheduledApiChange(details="Will be removed.", when="6.0") public VisualLayoutCreationTO withShapeElements(@Nonnull java.util.List<ShapeLayoutElementCreationTO> shapeElements)Deprecated.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
@Deprecated @ScheduledApiChange(details="Will be removed.", when="6.0") public VisualLayoutCreationTO withShapeElement(@Nonnull ShapeLayoutElementCreationTO shapeElement)Deprecated.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.
-
getLayers
Returns the layers of this visual layout.- Returns:
- The layers of this visual layout.
-
withLayers
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
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
Returns the layer groups of this visual layout.- Returns:
- The layer groups of this visual layout.
-
withLayerGroups
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
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 java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-