Modifier and Type | Class and Description |
---|---|
static class |
GGradient.Swatch
Inner class for a Swatch in a gradient.
|
Modifier and Type | Field and Description |
---|---|
static GGradient |
NONE
The no-swatches gradient.
|
Constructor and Description |
---|
GGradient(int start,
GGradient.Swatch[] swatches)
Creates a linear gradient object.
|
GGradient(int start,
int size,
GGradient.Swatch[] swatches)
Creates a radial gradient object.
|
GGradient(int type,
int start,
int size,
GGradient.Swatch[] swatches)
Creates a linear or radial gradient.
|
GGradient(String string)
Creates a gradient from a String.
|
GGradient(Transaction trans)
Creates a color from a transaction.
|
Modifier and Type | Method and Description |
---|---|
void |
appendGradient(Transaction trans)
Appends the color to a transaction.
|
static GGradient |
createGGradient(String string)
Creates a GGradient from a String.
|
boolean |
equals(GGradient gradient)
Checks if two gradient objects are equal.
|
boolean |
equals(Object o)
Checks if two color objects are equal.
|
String |
getCSSValue()
Gets the CSS value String.
|
int |
getSize()
Gets the size of a radial gradient (1-4096).
|
int |
getStart()
Gets the start (0-7 for linear, 0-8 for radial).
|
String |
getString()
Gets the color as a String in the form described below.
|
GGradient.Swatch |
getSwatch(int index)
Gets the swatch at specified index.
|
int |
getSwatchCount()
Gets the swatch count.
|
int |
getType()
Gets the type of the gradient, 0=linear, 1=radial.
|
protected String |
paramString()
Returns the parameter string representing the state of this event.
|
String |
toString()
Returns a string representation of this class instance and its values.
|
public static final GGradient NONE
public GGradient(int start, GGradient.Swatch[] swatches)
Start values: 0 top left 1 top 2 top right 3 left 4 right 5 bottom left 6 bottom 7 bottom right
start
- The start 0-7.swatches
- An array of swatches. This array must consist of at least two Swatch objects and maximum 32 objects.IllegalArgumentException
- For errors.public GGradient(int start, int size, GGradient.Swatch[] swatches)
Start values: 0 top left 1 top center 2 top right 3 middle left 4 middle center 5 middle right 6 bottom left 7 bottom center 8 bottom right Size indications (it's percents): 1 sub-petite 5 petite 10 extra small 25 small 50 medium 75 large 100 extra large 200 jumbo 400 colossal
start
- The start 0-7.size
- The size in percent (1-4096).swatches
- An array of swatches. This array must consist of at least two Swatch objects and maximum 32 objects.IllegalArgumentException
- For errors.public GGradient(int type, int start, int size, GGradient.Swatch[] swatches)
type
- The type: 0=linear, 1=radial.start
- Start of gradient (linear 0-7 or radial 0-8).size
- Only for radial (1-4096).swatches
- An array of swatches. This array must consist of at least two Swatch objects and maximum 32 objects.IllegalArgumentException
- For errors.public GGradient(String string) throws IllegalArgumentException, NumberFormatException
string
- The string.IllegalArgumentException
- for errors in the string specification.NumberFormatException
- for invalid number formats.public GGradient(Transaction trans)
trans
- The transaction.public static GGradient createGGradient(String string)
new GGradient(string)
was called.string
- The string as 0xnnnnnnnn or decimal. It can be null or empty string too.IllegalArgumentException
- for errors in the string specification.NumberFormatException
- for invalid number formats.public void appendGradient(Transaction trans)
public boolean equals(Object o)
public boolean equals(GGradient gradient)
gradient
- another gradient object. If null, the gradients are not equal.public int getSwatchCount()
public GGradient.Swatch getSwatch(int index)
public int getType()
public int getStart()
public int getSize()
public String getString()
protected String paramString()
public String toString()
public String getCSSValue()
iizi® is a registered trademark of Mindus SARL. © Copyright 2019 Mindus SARL. All rights reserved.