|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jwo.landserf.structure.ColourRule
Colour rule class for storing a single colour rule. The colour rule consists of two indices and associated ARGB colour values. Colours are interpolated for any values that fall between the lower and upper indices.
Field Summary | |
static int |
CONTINUOUS
Rule represents part of a continuous colour table. |
static int |
DISCRETE
Rule represents part of a discrete colour table. |
Constructor Summary | |
ColourRule(float i,
int c)
Creates a categorical colour rule. |
|
ColourRule(float i1,
int c1,
float i2,
int c2)
Creates a continuous colour rule. |
|
ColourRule(float i,
int r,
int g,
int b)
Creates a categorical colour rule. |
|
ColourRule(float i1,
int r1,
int g1,
int b1,
float i2,
int r2,
int g2,
int b2)
Creates a continuous colour rule. |
|
ColourRule(float i,
int r,
int g,
int b,
int a)
Creates a categorical colour rule. |
|
ColourRule(float i1,
int r1,
int g1,
int b1,
int a1,
float i2,
int r2,
int g2,
int b2,
int a2)
Creates a continuous colour rule. |
Method Summary | |
int |
getColour(float index)
Interpolates the colour associated with the given index. |
int |
getlColour()
Finds the colour associated with the lower index. |
float |
getlIndex()
Finds the lower index associated with colour rule. |
int |
getType()
Reports the type of colour rule. |
int |
getuColour()
Finds the colour associated with the upper index. |
float |
getuIndex()
Finds the upper index associated with colour rule. |
void |
setlColour(int lColour)
Sets the colour associated with the lower index of the rule. |
void |
setlIndex(float lIndex)
Sets the index associated with the lower colour. |
void |
setType(int type)
Sets the rule type (either DISCRETE or CONTINUOUS). |
void |
setuColour(int uColour)
Sets the colour associated with the upper index of the rule. |
void |
setuIndex(float uIndex)
Sets the index associated with the upper colour. |
String |
toString()
Reports the current colour rule. |
static String |
toString(int intColour)
Converts a given colour value from integer to R,G,B,A string for display and storage. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int CONTINUOUS
public static final int DISCRETE
Constructor Detail |
public ColourRule(float i, int r, int g, int b)
i
- Index value associated with rule.r
- Red component of colour associated with index.g
- Green component of colour associated with index.b
- Blue component of colour associated with index.public ColourRule(float i, int r, int g, int b, int a)
i
- Index value associated with rule.r
- Red component of colour associated with index.g
- Green component of colour associated with index.b
- Blue component of colour associated with index.a
- Alpha (transparancy) component associated with index.public ColourRule(float i, int c)
i
- index value associated with rule.c
- Combined ARGB colour assicated with index.public ColourRule(float i1, int r1, int g1, int b1, float i2, int r2, int g2, int b2)
i1
- Lower index value associated with rule.r1
- Red component of colour associated with lower index.g1
- Green component of colour associated with lower index.b1
- Blue component of colour associated with lower index.i2
- Upper index value associated with rule.r2
- Red component of colour associated with upper index.g2
- Green component of colour associated with upper index.b2
- Blue component of colour associated with upper index.public ColourRule(float i1, int r1, int g1, int b1, int a1, float i2, int r2, int g2, int b2, int a2)
i1
- Lower index value associated with rule.r1
- Red component of colour associated with lower index.g1
- Green component of colour associated with lower index.b1
- Blue component of colour associated with lower index.a1
- Alpha (transparancy) component associated with lower index.i2
- Upper index value associated with rule.r2
- Red component of colour associated with upper index.g2
- Green component of colour associated with upper index.b2
- Blue component of colour associated with upper index.a2
- Alpha (transparancy) component associated with upper index.public ColourRule(float i1, int c1, float i2, int c2)
i1
- Lower index value associated with rule.c1
- Combined RGBA colour assicated with lower index.i2
- Upper index value associated with rule.c2
- Combined RGBA colour assicated with upper index.Method Detail |
public int getColour(float index)
index
- Index to associate colour with.
public float getlIndex()
public void setlIndex(float lIndex)
lIndex
- New lower index for colour rule.public float getuIndex()
public void setuIndex(float uIndex)
uIndex
- New upper index for colour rule.public int getType()
public void setType(int type)
type
- Type of colour rule. Either DISCRETE or CONTINUOUS.public int getlColour()
public void setlColour(int lColour)
lColour
- New colour for lower index (combined ARGB).public void setuColour(int uColour)
uColour
- New colour for upper index (combined ARGB).public int getuColour()
public String toString()
public static String toString(int intColour)
intColour
- Colour represented as integer.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |