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.DoublePropertyReturns the value of theheightPropertyrecord component.javafx.beans.property.DoublePropertyReturns the value of thescaleXPropertyrecord component.javafx.beans.property.DoublePropertyReturns the value of thescaleYPropertyrecord component.javafx.beans.property.DoublePropertyReturns the value of thewidthPropertyrecord 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 aViewModelVertexShaperecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.javafx.beans.property.DoublePropertyReturns the value of theheightPropertyrecord component.javafx.beans.property.DoublePropertyReturns the value of thescaleXPropertyrecord component.javafx.beans.property.DoublePropertyReturns the value of thescaleYPropertyrecord component.javafx.beans.property.ObjectProperty<ViewModelShapeType>Returns the value of theshapeTyperecord component.final StringtoString()Returns a string representation of this record class.javafx.beans.property.DoublePropertyReturns the value of thewidthPropertyrecord component.
-
Property Details
-
scaleX
public javafx.beans.property.DoubleProperty scaleXPropertyReturns the value of thescaleXPropertyrecord component. -
scaleY
public javafx.beans.property.DoubleProperty scaleYPropertyReturns the value of thescaleYPropertyrecord component. -
width
public javafx.beans.property.DoubleProperty widthPropertyReturns the value of thewidthPropertyrecord component. -
height
public javafx.beans.property.DoubleProperty heightPropertyReturns the value of theheightPropertyrecord 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 aViewModelVertexShaperecord class.- Parameters:
scaleXProperty- the value for thescaleXPropertyrecord componentscaleYProperty- the value for thescaleYPropertyrecord componentwidthProperty- the value for thewidthPropertyrecord componentheightProperty- the value for theheightPropertyrecord componentshapeType- the value for theshapeTyperecord 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 thescaleXPropertyrecord component. -
scaleYProperty
public javafx.beans.property.DoubleProperty scaleYProperty()Returns the value of thescaleYPropertyrecord component. -
widthProperty
public javafx.beans.property.DoubleProperty widthProperty()Returns the value of thewidthPropertyrecord component. -
heightProperty
public javafx.beans.property.DoubleProperty heightProperty()Returns the value of theheightPropertyrecord component. -
shapeType
Returns the value of theshapeTyperecord component.- Returns:
- the value of the
shapeTyperecord component
-