|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.alee.extended.colorchooser.GradientData
public class GradientData
Data object for WebGradientColorChooser component.
Constructor Summary | |
---|---|
GradientData()
Constructs GradientData object with empty data list. |
|
GradientData(java.util.List<GradientColorData> gradientColorsData)
Constructs GradientData object with a specified data list. |
Method Summary | |
---|---|
void |
addGradientColorData(float location,
java.awt.Color color)
Adds GradientColorData with the specified location and color into data list and sorts the list. |
void |
addGradientColorData(GradientColorData gradientColorData)
Adds GradientColorData into data list and sorts the list. |
GradientData |
clone()
Returns cloned GradientData. |
boolean |
containtsLocation(float location)
Returns whether there is a GradientColorData for specified location or not. |
boolean |
equals(java.lang.Object obj)
Returns whether this GradientData is equal to the specified object or not. |
GradientColorData |
get(int index)
Returns GradientColorData at the specified index. |
java.awt.Color |
getColor(int index)
Returns color for GradientColorData at the specified index. |
java.awt.Color |
getColorForLocation(float location)
Returns calculated color for the specified location. |
java.awt.Color[] |
getColors()
Returns an array of colors for LinearGradientPaint. |
static GradientData |
getDefaultValue()
Returns default GradientData value. |
GradientColorData |
getFirst()
Returns first GradientColorData. |
float[] |
getFractions()
Returns an array of fractions for LinearGradientPaint. |
java.util.List<GradientColorData> |
getGradientColorsData()
Returns sorted data list. |
GradientColorData |
getLast()
Returns last GradientColorData. |
float |
getLocation(int index)
Returns location for GradientColorData at the specified index. |
void |
removeGradientColorData(GradientColorData gradientColorData)
Removes GradientColorData from data list and sorts the list. |
void |
setGradientColorsData(java.util.List<GradientColorData> gradientColorsData)
Sets data list and sorts it. |
int |
size()
Returns data list size. |
void |
sort()
Sorts data list. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GradientData()
public GradientData(java.util.List<GradientColorData> gradientColorsData)
Method Detail |
---|
public boolean containtsLocation(float location)
location
- location to search for GradientColorData
public void addGradientColorData(GradientColorData gradientColorData)
gradientColorData
- GradientColorData to addpublic void addGradientColorData(float location, java.awt.Color color)
location
- GradientColorData locationcolor
- GradientColorData colorpublic void removeGradientColorData(GradientColorData gradientColorData)
gradientColorData
- GradientColorData to removepublic java.util.List<GradientColorData> getGradientColorsData()
public void setGradientColorsData(java.util.List<GradientColorData> gradientColorsData)
gradientColorsData
- new data listpublic float[] getFractions()
public java.awt.Color[] getColors()
public int size()
public GradientColorData get(int index)
index
- GradientColorData index
public float getLocation(int index)
index
- GradientColorData index
public java.awt.Color getColor(int index)
index
- GradientColorData index
public GradientColorData getFirst()
public GradientColorData getLast()
public java.awt.Color getColorForLocation(float location)
location
- color location
public void sort()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- object to compare with
public GradientData clone()
clone
in class java.lang.Object
public static GradientData getDefaultValue()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |