pedviz.view.rules
Class SelectedColorRule

java.lang.Object
  extended by pedviz.view.rules.Rule
      extended by pedviz.view.rules.SelectedColorRule

public class SelectedColorRule
extends Rule

With this Rule you can define the selected color for a node, dependent on a given trait.

Author:
Lukas Forer

Field Summary
 
Fields inherited from class pedviz.view.rules.Rule
BOTH, ONLY_2D, ONLY_3D
 
Constructor Summary
SelectedColorRule(java.lang.String userData, java.lang.Object value, java.awt.Color color)
          Constructs a SelectedColorRule with the given trait id, trait value and the given color.
 
Method Summary
 void applyRule(NodeView nodeview)
          Override this method, with it you get the NodeView and can adapt it.
 
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

SelectedColorRule

public SelectedColorRule(java.lang.String userData,
                         java.lang.Object value,
                         java.awt.Color color)
Constructs a SelectedColorRule with the given trait id, trait value and the given color.

Parameters:
userData - trait identification
value - trait value
color - color
Method Detail

applyRule

public void applyRule(NodeView nodeview)
Description copied from class: Rule
Override this method, with it you get the NodeView and can adapt it. The class NodeView provides the method getNode() for getting a reference to the Node. *

Specified by:
applyRule in class Rule