pedviz.view.symbols
Class SymbolGenotypes

java.lang.Object
  extended by pedviz.view.Symbol
      extended by pedviz.view.symbols.Symbol2D
          extended by pedviz.view.symbols.SymbolGenotypes
All Implemented Interfaces:
java.lang.Comparable

public class SymbolGenotypes
extends Symbol2D

Draws the symbol for genotpyes. In the data available genotypes are simply drawn, by adding a genotype symbol with a list of markers.

Author:
Luki

Constructor Summary
SymbolGenotypes(boolean showId, java.lang.String... traits)
          Creates a new GenotypeSymbol with the given collection of traits.
SymbolGenotypes(java.lang.String... traits)
          Creates a new GenotypeSymbol with the given collection of traits.
 
Method Summary
 void drawSymbol(java.awt.Graphics2D g, java.awt.geom.Point2D.Float position, float size, java.awt.Color border, java.awt.Color fill, NodeView nodeview)
          Draws the symbol.
 java.lang.Float getHeight()
           
 int getPriority()
          Returns the priority of the symbol.
 void setTraits(java.lang.String[] traits)
          Collection of traits with genotype informations.
 
Methods inherited from class pedviz.view.Symbol
compareTo, setColors
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SymbolGenotypes

public SymbolGenotypes(java.lang.String... traits)
Creates a new GenotypeSymbol with the given collection of traits.

Parameters:
traits - Collection of traits.

SymbolGenotypes

public SymbolGenotypes(boolean showId,
                       java.lang.String... traits)
Creates a new GenotypeSymbol with the given collection of traits.

Parameters:
showId - Shows the id of the person.
traits - traits Collection of traits.
Method Detail

drawSymbol

public void drawSymbol(java.awt.Graphics2D g,
                       java.awt.geom.Point2D.Float position,
                       float size,
                       java.awt.Color border,
                       java.awt.Color fill,
                       NodeView nodeview)
Description copied from class: Symbol2D
Draws the symbol.

Specified by:
drawSymbol in class Symbol2D
Parameters:
g - Graphic object
position - position of the node
size - size of the node
border - border color
fill - fill color

getPriority

public int getPriority()
Description copied from class: Symbol
Returns the priority of the symbol. Symbols like SymbolSexMale and SymbolSexFemale have a low priority (0) however the SymbolDeceased has a higher priority (5). The priorities define the sequence for drawing the symbols.

Specified by:
getPriority in class Symbol
Returns:
priority of the symbol

getHeight

public java.lang.Float getHeight()
Overrides:
getHeight in class Symbol

setTraits

public void setTraits(java.lang.String[] traits)
Collection of traits with genotype informations.

Parameters:
traits - collection of traits.