Package dk.gtz.graphedit.viewmodel
Record Class ViewModelVertexShape
java.lang.Object
java.lang.Record
dk.gtz.graphedit.viewmodel.ViewModelVertexShape
- Record Components:
scaleXProperty
- The X scale-factor of the shapescaleYProperty
- The Y scale-factor of the shapewidthProperty
- The width of the shapeheightProperty
- The height of the shapeshapeType
- 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
PropertiesTypePropertyDescriptionjavafx.beans.property.DoubleProperty
Returns the value of theheightProperty
record component.javafx.beans.property.DoubleProperty
Returns the value of thescaleXProperty
record component.javafx.beans.property.DoubleProperty
Returns the value of thescaleYProperty
record component.javafx.beans.property.DoubleProperty
Returns the value of thewidthProperty
record component. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new rectange vertex shapeViewModelVertexShape
(double scaleX, double scaleY, double width, double height, ViewModelShapeType type) Constructs a new vertex shape viewmodel with specified dimensionsConstructs a new vertex shape viewmodel with a specified shapeViewModelVertexShape
(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 aViewModelVertexShape
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.javafx.beans.property.DoubleProperty
Returns the value of theheightProperty
record component.javafx.beans.property.DoubleProperty
Returns the value of thescaleXProperty
record component.javafx.beans.property.DoubleProperty
Returns the value of thescaleYProperty
record component.javafx.beans.property.ObjectProperty<ViewModelShapeType>
Returns the value of theshapeType
record component.final String
toString()
Returns a string representation of this record class.javafx.beans.property.DoubleProperty
Returns the value of thewidthProperty
record component.
-
Property Details
-
scaleX
public javafx.beans.property.DoubleProperty scaleXPropertyReturns the value of thescaleXProperty
record component. -
scaleY
public javafx.beans.property.DoubleProperty scaleYPropertyReturns the value of thescaleYProperty
record component. -
width
public javafx.beans.property.DoubleProperty widthPropertyReturns the value of thewidthProperty
record component. -
height
public javafx.beans.property.DoubleProperty heightPropertyReturns the value of theheightProperty
record component.
-
-
Constructor Details
-
ViewModelVertexShape
public ViewModelVertexShape()Constructs a new rectange vertex shape -
ViewModelVertexShape
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 shapescaleY
- Property The Y scale-factor of the shapewidth
- Property The width of the shapeheight
- Property The height of the shapetype
- 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 aViewModelVertexShape
record class.- Parameters:
scaleXProperty
- the value for thescaleXProperty
record componentscaleYProperty
- the value for thescaleYProperty
record componentwidthProperty
- the value for thewidthProperty
record componentheightProperty
- the value for theheightProperty
record componentshapeType
- the value for theshapeType
record component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object)
. -
scaleXProperty
public javafx.beans.property.DoubleProperty scaleXProperty()Returns the value of thescaleXProperty
record component. -
scaleYProperty
public javafx.beans.property.DoubleProperty scaleYProperty()Returns the value of thescaleYProperty
record component. -
widthProperty
public javafx.beans.property.DoubleProperty widthProperty()Returns the value of thewidthProperty
record component. -
heightProperty
public javafx.beans.property.DoubleProperty heightProperty()Returns the value of theheightProperty
record component. -
shapeType
Returns the value of theshapeType
record component.- Returns:
- the value of the
shapeType
record component
-