|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object pedviz.view.rules.Rule pedviz.view.rules.ColorRule
public class ColorRule
With this Rule you can define the color for a node, dependent on a given trait. It provides also the possibility to using up to 4 colors in the same symbol, how it's usual in pedigree drawing.
Field Summary |
---|
Fields inherited from class pedviz.view.rules.Rule |
---|
BOTH, ONLY_2D, ONLY_3D |
Constructor Summary | |
---|---|
ColorRule(java.lang.String userData,
java.lang.Object value,
java.awt.Color color)
Constructs a new ColorRule with the given trait id, trait value and the given color. |
Method Summary | |
---|---|
void |
addRule(java.lang.String userData,
java.lang.Object value,
java.awt.Color color)
Adds a new trait to this rule. |
void |
applyRule(NodeView nodeview)
Override this method, with it you get the NodeView and can adapt it. |
boolean |
isEnabled(int index)
Returns true, if the rule with the given index is enabled. |
void |
setColor(int index,
java.awt.Color color)
Sets the color for the rule with the given index. |
void |
setCondition(int index,
java.lang.String trait,
java.lang.Object value)
Sets the condition for the rule width the given index. |
void |
setEnabled(int index,
boolean enabled)
Enables or disables the rule with the given index. |
Methods inherited from class pedviz.view.rules.Rule |
---|
getMode, isEnabled, setEnabled, setMode |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ColorRule(java.lang.String userData, java.lang.Object value, java.awt.Color color)
userData
- trait identificationvalue
- trait valuecolor
- colorMethod Detail |
---|
public void addRule(java.lang.String userData, java.lang.Object value, java.awt.Color color)
userData
- trait identificationvalue
- trait valuecolor
- colorpublic void applyRule(NodeView nodeview)
Rule
applyRule
in class Rule
public void setEnabled(int index, boolean enabled)
index
- Indexenabled
- public void setCondition(int index, java.lang.String trait, java.lang.Object value)
index
- Indextrait
- Traitvalue
- Valuepublic void setColor(int index, java.awt.Color color)
index
- Indexcolor
- Colorpublic boolean isEnabled(int index)
index
- Index
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |