pedviz.view.rules
Class AbstractionRule

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

public class AbstractionRule
extends Rule

With this Rule it's possible to draw nodes in an abstract way dependent on a given trait.

Author:
lukas forer

Field Summary
static int NONE
          Draws all children as a single node.
static int NUMBER
          Draws all children as a single node and shows their total number.
static int NUMBER_2
          Draws all children as a single node and shows the number of females and males.
 
Fields inherited from class pedviz.view.rules.Rule
BOTH, ONLY_2D, ONLY_3D
 
Constructor Summary
AbstractionRule()
           
AbstractionRule(int mode)
           
AbstractionRule(int mode, java.lang.Object male, java.lang.Object female)
          Creates a new AbstractionRule.
 
Method Summary
 void applyRule(NodeView nodeview)
          Override this method, with it you get the NodeView and can adapt it.
 java.lang.Object getFemale()
           
 java.lang.Object getMale()
           
 int getSymbolMode()
          Returns the mode.
 void setFemale(java.lang.Object female)
           
 void setMale(java.lang.Object male)
           
 void setSymbolMode(int symbolmode)
          Sets the mode.
 
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
 

Field Detail

NONE

public static final int NONE
Draws all children as a single node. (default)

See Also:
Constant Field Values

NUMBER

public static final int NUMBER
Draws all children as a single node and shows their total number.

See Also:
Constant Field Values

NUMBER_2

public static final int NUMBER_2
Draws all children as a single node and shows the number of females and males.

See Also:
Constant Field Values
Constructor Detail

AbstractionRule

public AbstractionRule(int mode,
                       java.lang.Object male,
                       java.lang.Object female)
Creates a new AbstractionRule. The mode defines the appearance for abstract nodes.

Parameters:
mode - Mode
  • NONE: Draws all children as a single node. (default)
  • NUMBER: Draws all children as a single node and shows their total number.
  • NUMBER_2: Draws all children as a single node and shows the number of females and males.

AbstractionRule

public AbstractionRule(int mode)

AbstractionRule

public AbstractionRule()
Method Detail

setSymbolMode

public void setSymbolMode(int symbolmode)
Sets the mode.

Parameters:
mode - the mode.

getSymbolMode

public int getSymbolMode()
Returns the mode.

Returns:
the mode.

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

getFemale

public java.lang.Object getFemale()

setFemale

public void setFemale(java.lang.Object female)

getMale

public java.lang.Object getMale()

setMale

public void setMale(java.lang.Object male)