Package com.iizix.prop
Class GGradient.Swatch
java.lang.Object
com.iizix.prop.GGradient.Swatch
- Enclosing class:
GGradient
Inner class for a Swatch in a gradient.
Field Summary
Constructor Summary
ConstructorDescriptionSwatch
(int color, int stop) Constructs a swatch.Swatch
(ReadTransaction trans) Constructs a swatch from a Transaction.Method Summary
Modifier and TypeMethodDescriptionvoid
append
(SendTransaction trans) Appends a swatch to a transaction.boolean
Checks if two swatch objects are equal.Gets the color as a String in the form described below.protected String
Returns the parameter string representing the state of this event.toString()
Returns a string representation of this class instance and its values.
Field Details
color
public final int colorThe RGB color 0-0xFFFFFF.stop
public final int stopThe stop position (0-100) as percent value in the gradient direction.
Constructor Details
Swatch
public Swatch(int color, int stop) Constructs a swatch.- Parameters:
color
- The RGB color 0-0xFFFFFF.stop
- The stop position (0-100) as percent value in the gradient direction.- Throws:
IllegalArgumentException
- for range errors.
Swatch
Constructs a swatch from a Transaction.
Method Details
append
Appends a swatch to a transaction.equals
Checks if two swatch objects are equal.getString
Gets the color as a String in the form described below.- Returns:
- the String as described above.
paramString
Returns the parameter string representing the state of this event. This string is useful for debugging. Subclasses adds extra information to the string by preceding it with a comma followed by the extra information.- Returns:
- the parameter string of this event.
toString
Returns a string representation of this class instance and its values.