|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.cosylab.gui.components.ledder.DefaultBitDescriptor
public class DefaultBitDescriptor
Default implementation of BitDescriptor.
| Constructor Summary | |
|---|---|
DefaultBitDescriptor()
Creates new BitDescriptor with default colors set to GREEN
for on and GRAY for off. |
|
| Method Summary | |
|---|---|
void |
add(java.lang.String label,
java.awt.Color colorOn,
java.awt.Color colorOff)
Appends new bit descriptions to the end of the descriptions lists. |
void |
clear()
Removes all bit descriptions from the descriptor. |
protected com.cosylab.gui.components.ledder.DefaultBitDescriptor.BitDescription |
getBitDescription(int i)
|
java.awt.Color |
getColorWhenOff(int index)
Returns the color representing OFF state for bit at specified index or default OFF value if there is no description. |
java.awt.Color |
getColorWhenOn(int index)
Returns the default color representing ON state for bit at specified index or default value if color is not defined. |
java.awt.Color |
getDefaultColorWhenOff()
Returns the default color representing OFF state for bit used when no specific description is defined. |
java.awt.Color |
getDefaultColorWhenOn()
Returns the default color representing ON state for bit used when no specific description is defined. |
java.lang.String |
getDescription(int index)
Returns the default description of the bit at the specified index or default string if no description is defined. |
void |
remove(int index)
Removes bit description at the specified index from the descriptor. |
void |
setColorWhenOff(int index,
java.awt.Color color)
Sets new color indicating OFF state for the specified bit. |
void |
setColorWhenOn(int index,
java.awt.Color color)
Sets new color indicating the ON state for the specified bit index. |
void |
setDefaultColorWhenOff(java.awt.Color color)
Sets default color indicating OFF state. |
void |
setDefaultColorWhenOn(java.awt.Color color)
Sets default color indicating the ON state. |
void |
setDescription(int index,
java.lang.String description)
Sets description for the bit at the specified index. |
int |
size()
Returns the number of led descriptions. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultBitDescriptor()
GREEN
for on and GRAY for off.
| Method Detail |
|---|
public int size()
protected com.cosylab.gui.components.ledder.DefaultBitDescriptor.BitDescription getBitDescription(int i)
public void add(java.lang.String label,
java.awt.Color colorOn,
java.awt.Color colorOff)
label - StringcolorOn - ColorcolorOff - Colorpublic void remove(int index)
index - intpublic void clear()
public java.lang.String getDescription(int index)
getDescription in interface BitDescriptorindex - int
public void setDescription(int index,
java.lang.String description)
index - intdescription - Stringpublic java.awt.Color getColorWhenOn(int index)
getColorWhenOn in interface BitDescriptorindex - int
public java.awt.Color getDefaultColorWhenOn()
public void setColorWhenOn(int index,
java.awt.Color color)
index - intcolor - Colorpublic void setDefaultColorWhenOn(java.awt.Color color)
color - Colorpublic java.awt.Color getColorWhenOff(int index)
getColorWhenOff in interface BitDescriptorindex - int
public java.awt.Color getDefaultColorWhenOff()
public void setColorWhenOff(int index,
java.awt.Color color)
index - intcolor - Colorpublic void setDefaultColorWhenOff(java.awt.Color color)
color - Color
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||