Record Class BorderWidget
java.lang.Object
java.lang.Record
dev.pfaff.altargui.widgets.BorderWidget
- Record Components:
color
- the RGBA colorRgba of the widget
- All Implemented Interfaces:
Widget
,SingleChildWidget
public record BorderWidget(int color, float thickness, @NonNull Widget child)
extends Record
implements SingleChildWidget
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.pfaff.altargui.widgets.SingleChildWidget
SingleChildWidget.AbstractState<W extends SingleChildWidget>, SingleChildWidget.AutoLayoutState<W extends SingleChildWidget>
-
Field Summary
FieldsFields inherited from interface dev.pfaff.altargui.Widget
EMPTY_ARRAY
-
Constructor Summary
ConstructorsConstructorDescriptionBorderWidget
(int color, float thickness, @NonNull Widget child) Deprecated.BorderWidget
(Color color, float thickness, Widget child) -
Method Summary
Modifier and TypeMethodDescription@NonNull Widget
child()
Returns the value of thechild
record component.int
color()
Returns the value of thecolor
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@NotNull SingleChildWidget.AbstractState
<BorderWidget> Instantiates an instance of the widget.static BorderWidget
float
Returns the value of thethickness
record component.final String
toString()
Returns a string representation of this record class.withThickness
(float thickness) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface dev.pfaff.altargui.Widget
atAbsolutePosition, atAlignment, atCenter, atRelativePosition, expand, expandHeight, expandWidth, withAbsoluteHeight, withAbsoluteSize, withAbsoluteWidth, withAspectRatio, withAspectRatio, withAspectRatio, withBackground, withBackgroundColor, withBackgroundTexture, withBorder, withHorizontalMargin, withHorizontalMargin, withId, withKey, withMargin, withMargin, withMarginBottom, withMarginEnd, withMarginStart, withMarginTop, withMultiChildAttributes, withSymmetricMargin, withTooltip, withVerticalMargin, withVerticalMargin, wrap
-
Field Details
-
TRANSPARENT
-
-
Constructor Details
-
BorderWidget
Deprecated.Creates an instance of aBorderWidget
record class.- Parameters:
color
- the value for thecolor
record componentthickness
- the value for thethickness
record componentchild
- the value for thechild
record component
-
BorderWidget
-
-
Method Details
-
solid
- Parameters:
color
- ARGB
-
instantiate
@NotNull public @NotNull SingleChildWidget.AbstractState<BorderWidget> instantiate(WidgetInstantiationArgs args) Description copied from interface:Widget
Instantiates an instance of the widget.- Specified by:
instantiate
in interfaceSingleChildWidget
- Specified by:
instantiate
in interfaceWidget
-
withColor
-
withThickness
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
color
-
thickness
public float thickness()Returns the value of thethickness
record component.- Returns:
- the value of the
thickness
record component
-
child
Returns the value of thechild
record component.- Specified by:
child
in interfaceSingleChildWidget
- Returns:
- the value of the
child
record component
-