Record Class ViewModelVertexShape

java.lang.Object
java.lang.Record
dk.gtz.graphedit.viewmodel.ViewModelVertexShape
Record Components:
scaleXProperty - The X scale-factor of the shape
scaleYProperty - The Y scale-factor of the shape
widthProperty - The width of the shape
heightProperty - The height of the shape
shapeType - The shape of the vertex

public record ViewModelVertexShape(javafx.beans.property.DoubleProperty scaleXProperty, javafx.beans.property.DoubleProperty scaleYProperty, javafx.beans.property.DoubleProperty widthProperty, javafx.beans.property.DoubleProperty heightProperty, javafx.beans.property.ObjectProperty<ViewModelShapeType> shapeType) extends Record
A shape construct used to define the dimensions and scale of a specific type of shape
  • Property Summary

    Properties
    Type
    Property
    Description
    javafx.beans.property.DoubleProperty
    Returns the value of the heightProperty record component.
    javafx.beans.property.DoubleProperty
    Returns the value of the scaleXProperty record component.
    javafx.beans.property.DoubleProperty
    Returns the value of the scaleYProperty record component.
    javafx.beans.property.DoubleProperty
    Returns the value of the widthProperty record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new rectange vertex shape
    ViewModelVertexShape(double scaleX, double scaleY, double width, double height, ViewModelShapeType type)
    Constructs a new vertex shape viewmodel with specified dimensions
    Constructs a new vertex shape viewmodel with a specified shape
    ViewModelVertexShape(javafx.beans.property.DoubleProperty scaleXProperty, javafx.beans.property.DoubleProperty scaleYProperty, javafx.beans.property.DoubleProperty widthProperty, javafx.beans.property.DoubleProperty heightProperty, javafx.beans.property.ObjectProperty<ViewModelShapeType> shapeType)
    Creates an instance of a ViewModelVertexShape record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    javafx.beans.property.DoubleProperty
    Returns the value of the heightProperty record component.
    javafx.beans.property.DoubleProperty
    Returns the value of the scaleXProperty record component.
    javafx.beans.property.DoubleProperty
    Returns the value of the scaleYProperty record component.
    javafx.beans.property.ObjectProperty<ViewModelShapeType>
    Returns the value of the shapeType record component.
    final String
    Returns a string representation of this record class.
    javafx.beans.property.DoubleProperty
    Returns the value of the widthProperty record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Property Details

    • scaleX

      public javafx.beans.property.DoubleProperty scaleXProperty
      Returns the value of the scaleXProperty record component.
    • scaleY

      public javafx.beans.property.DoubleProperty scaleYProperty
      Returns the value of the scaleYProperty record component.
    • width

      public javafx.beans.property.DoubleProperty widthProperty
      Returns the value of the widthProperty record component.
    • height

      public javafx.beans.property.DoubleProperty heightProperty
      Returns the value of the heightProperty record component.
  • Constructor Details

    • ViewModelVertexShape

      public ViewModelVertexShape()
      Constructs a new rectange vertex shape
    • ViewModelVertexShape

      public ViewModelVertexShape(ViewModelShapeType shape)
      Constructs a new vertex shape viewmodel with a specified shape
      Parameters:
      shape - The shape of the vertex
    • ViewModelVertexShape

      public ViewModelVertexShape(double scaleX, double scaleY, double width, double height, ViewModelShapeType type)
      Constructs a new vertex shape viewmodel with specified dimensions
      Parameters:
      scaleX - The X scale-factor of the shape
      scaleY - Property The Y scale-factor of the shape
      width - Property The width of the shape
      height - Property The height of the shape
      type - The shape of the vertex
    • ViewModelVertexShape

      public ViewModelVertexShape(javafx.beans.property.DoubleProperty scaleXProperty, javafx.beans.property.DoubleProperty scaleYProperty, javafx.beans.property.DoubleProperty widthProperty, javafx.beans.property.DoubleProperty heightProperty, javafx.beans.property.ObjectProperty<ViewModelShapeType> shapeType)
      Creates an instance of a ViewModelVertexShape record class.
      Parameters:
      scaleXProperty - the value for the scaleXProperty record component
      scaleYProperty - the value for the scaleYProperty record component
      widthProperty - the value for the widthProperty record component
      heightProperty - the value for the heightProperty record component
      shapeType - the value for the shapeType record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • scaleXProperty

      public javafx.beans.property.DoubleProperty scaleXProperty()
      Returns the value of the scaleXProperty record component.
    • scaleYProperty

      public javafx.beans.property.DoubleProperty scaleYProperty()
      Returns the value of the scaleYProperty record component.
    • widthProperty

      public javafx.beans.property.DoubleProperty widthProperty()
      Returns the value of the widthProperty record component.
    • heightProperty

      public javafx.beans.property.DoubleProperty heightProperty()
      Returns the value of the heightProperty record component.
    • shapeType

      public javafx.beans.property.ObjectProperty<ViewModelShapeType> shapeType()
      Returns the value of the shapeType record component.
      Returns:
      the value of the shapeType record component