pedviz.view.symbols
Class SymbolText

java.lang.Object
  extended by pedviz.view.Symbol
      extended by pedviz.view.symbols.Symbol2D
          extended by pedviz.view.symbols.SymbolText
All Implemented Interfaces:
java.lang.Comparable
Direct Known Subclasses:
SymbolPregnancy

public class SymbolText
extends Symbol2D

This symbol allow you to display a number or a character in the symbol.

Author:
lukas forer

Constructor Summary
SymbolText(java.lang.String text)
          Creates a new symbol that contains the given text.
 
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.
 int getPriority()
          Returns the priority of the symbol.
 double getSize()
          Returns the height of the text.
 void setSize(double size)
          Sets the height of the text.
 
Methods inherited from class pedviz.view.Symbol
compareTo, getHeight, setColors
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SymbolText

public SymbolText(java.lang.String text)
Creates a new symbol that contains the given text.

Parameters:
text - Text
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

getSize

public double getSize()
Returns the height of the text.

Returns:
the height of the text.

setSize

public void setSize(double size)
Sets the height of the text.

Parameters:
size - the height of the text.