Record Class FixedDocument.Rectangle
java.lang.Object
java.lang.Record
io.leandev.appfuse.pdf.FixedDocument.Rectangle
- All Implemented Interfaces:
FixedDocument.Element
- Enclosing class:
FixedDocument
public static record FixedDocument.Rectangle(String id, FixedDocument.Layer layer, FixedDocument.Frame frame, double strokePt, int strokeRgb, Integer fillRgb)
extends Record
implements FixedDocument.Element
fillRgb 為 null 表示不填色;線寬必須大於 0。
- Since:
- 4.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionRectangle(String id, FixedDocument.Layer layer, FixedDocument.Frame frame, double strokePt, int strokeRgb, Integer fillRgb) Creates an instance of aRectanglerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.fillRgb()Returns the value of thefillRgbrecord component.frame()Returns the value of theframerecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.layer()Returns the value of thelayerrecord component.doublestrokePt()Returns the value of thestrokePtrecord component.intReturns the value of thestrokeRgbrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Rectangle
public Rectangle(String id, FixedDocument.Layer layer, FixedDocument.Frame frame, double strokePt, int strokeRgb, Integer fillRgb) Creates an instance of aRectanglerecord class.- Parameters:
id- the value for theidrecord componentlayer- the value for thelayerrecord componentframe- the value for theframerecord componentstrokePt- the value for thestrokePtrecord componentstrokeRgb- the value for thestrokeRgbrecord componentfillRgb- the value for thefillRgbrecord component
-
-
Method Details
-
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 thecomparemethod from their corresponding wrapper classes. -
id
Returns the value of theidrecord component.- Specified by:
idin interfaceFixedDocument.Element- Returns:
- the value of the
idrecord component
-
layer
Returns the value of thelayerrecord component.- Specified by:
layerin interfaceFixedDocument.Element- Returns:
- the value of the
layerrecord component
-
frame
Returns the value of theframerecord component.- Returns:
- the value of the
framerecord component
-
strokePt
public double strokePt()Returns the value of thestrokePtrecord component.- Returns:
- the value of the
strokePtrecord component
-
strokeRgb
public int strokeRgb()Returns the value of thestrokeRgbrecord component.- Returns:
- the value of the
strokeRgbrecord component
-
fillRgb
Returns the value of thefillRgbrecord component.- Returns:
- the value of the
fillRgbrecord component
-