Package org.forester.phylogeny.data
Class NodeVisualData
- java.lang.Object
-
- org.forester.phylogeny.data.NodeVisualData
-
- All Implemented Interfaces:
PhylogenyData
public final class NodeVisualData extends java.lang.Object implements PhylogenyData
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NodeVisualData.FontType
static class
NodeVisualData.NodeFill
static class
NodeVisualData.NodeShape
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
APTX_VISUALIZATION_REF
static int
DEFAULT_SIZE
static java.lang.String
FONT_COLOR_REF
static java.lang.String
FONT_COLOR_TYPE
static java.lang.String
FONT_REF
static java.lang.String
FONT_SIZE_REF
static java.lang.String
FONT_SIZE_TYPE
static java.lang.String
FONT_STYLE_BOLD
static java.lang.String
FONT_STYLE_BOLD_ITALIC
static java.lang.String
FONT_STYLE_ITALIC
static java.lang.String
FONT_STYLE_PLAIN
static java.lang.String
FONT_STYLE_REF
static java.lang.String
FONT_STYLE_TYPE
static java.lang.String
FONT_TYPE
static java.lang.String
NODE_COLOR_REF
static java.lang.String
NODE_COLOR_TYPE
static java.lang.String
NODE_FILL_GRADIENT
static java.lang.String
NODE_FILL_NONE
static java.lang.String
NODE_FILL_SOLID
static java.lang.String
NODE_FILL_TYPE_REF
static java.lang.String
NODE_FILL_TYPE_TYPE
static java.lang.String
NODE_SHAPE_CIRCLE
static java.lang.String
NODE_SHAPE_RECTANGLE
static java.lang.String
NODE_SHAPE_REF
static java.lang.String
NODE_SHAPE_TYPE
static java.lang.String
NODE_SIZE_REF
static java.lang.String
NODE_SIZE_TYPE
static java.lang.String
NODE_TRANSPARENCY_REF
static java.lang.String
NODE_TRANSPARENCY_TYPE
-
Constructor Summary
Constructors Constructor Description NodeVisualData()
NodeVisualData(java.lang.String font_name, NodeVisualData.FontType font_style, byte font_size, java.awt.Color font_color, NodeVisualData.NodeShape shape, NodeVisualData.NodeFill fill_type, java.awt.Color node_color, float size, float transparency)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringBuffer
asSimpleText()
java.lang.StringBuffer
asText()
PhylogenyData
copy()
Creates a new PhylogenyData object with identical values as this PhylogenyData.NodeVisualData.NodeFill
getFillType()
java.awt.Font
getFont()
java.awt.Color
getFontColor()
java.lang.String
getFontName()
byte
getFontSize()
NodeVisualData.FontType
getFontStyle()
int
getFontStyleInt()
java.awt.Color
getNodeColor()
NodeVisualData.NodeShape
getShape()
float
getSize()
float
getTransparency()
boolean
isEmpty()
boolean
isEqual(PhylogenyData data)
Compares this PhylogenyData to PhylogenyData data.void
parseProperty(Property prop)
void
setFillType(java.lang.String fill)
void
setFillType(NodeVisualData.NodeFill fill_type)
void
setFontColor(java.awt.Color font_color)
void
setFontName(java.lang.String font_name)
void
setFontSize(int font_size)
void
setFontStyle(int font_style)
void
setFontStyle(java.lang.String font_style)
void
setFontStyle(NodeVisualData.FontType font_style)
void
setNodeColor(java.awt.Color node_color)
void
setShape(java.lang.String shape)
void
setShape(NodeVisualData.NodeShape shape)
void
setSize(float size)
void
setTransparency(float transparency)
java.lang.StringBuffer
toNHX()
void
toPhyloXML(java.io.Writer writer, int level, java.lang.String indentation)
Writes a phyloXML representation of this phylogeny data.java.lang.String
toString()
-
-
-
Field Detail
-
APTX_VISUALIZATION_REF
public static final java.lang.String APTX_VISUALIZATION_REF
- See Also:
- Constant Field Values
-
DEFAULT_SIZE
public static final int DEFAULT_SIZE
- See Also:
- Constant Field Values
-
FONT_COLOR_REF
public static final java.lang.String FONT_COLOR_REF
- See Also:
- Constant Field Values
-
FONT_COLOR_TYPE
public static final java.lang.String FONT_COLOR_TYPE
- See Also:
- Constant Field Values
-
FONT_REF
public static final java.lang.String FONT_REF
- See Also:
- Constant Field Values
-
FONT_SIZE_REF
public static final java.lang.String FONT_SIZE_REF
- See Also:
- Constant Field Values
-
FONT_SIZE_TYPE
public static final java.lang.String FONT_SIZE_TYPE
- See Also:
- Constant Field Values
-
FONT_STYLE_BOLD
public static final java.lang.String FONT_STYLE_BOLD
- See Also:
- Constant Field Values
-
FONT_STYLE_BOLD_ITALIC
public static final java.lang.String FONT_STYLE_BOLD_ITALIC
- See Also:
- Constant Field Values
-
FONT_STYLE_ITALIC
public static final java.lang.String FONT_STYLE_ITALIC
- See Also:
- Constant Field Values
-
FONT_STYLE_PLAIN
public static final java.lang.String FONT_STYLE_PLAIN
- See Also:
- Constant Field Values
-
FONT_STYLE_REF
public static final java.lang.String FONT_STYLE_REF
- See Also:
- Constant Field Values
-
FONT_STYLE_TYPE
public static final java.lang.String FONT_STYLE_TYPE
- See Also:
- Constant Field Values
-
FONT_TYPE
public static final java.lang.String FONT_TYPE
- See Also:
- Constant Field Values
-
NODE_COLOR_REF
public static final java.lang.String NODE_COLOR_REF
- See Also:
- Constant Field Values
-
NODE_COLOR_TYPE
public static final java.lang.String NODE_COLOR_TYPE
- See Also:
- Constant Field Values
-
NODE_FILL_GRADIENT
public static final java.lang.String NODE_FILL_GRADIENT
- See Also:
- Constant Field Values
-
NODE_FILL_NONE
public static final java.lang.String NODE_FILL_NONE
- See Also:
- Constant Field Values
-
NODE_FILL_SOLID
public static final java.lang.String NODE_FILL_SOLID
- See Also:
- Constant Field Values
-
NODE_FILL_TYPE_REF
public static final java.lang.String NODE_FILL_TYPE_REF
- See Also:
- Constant Field Values
-
NODE_FILL_TYPE_TYPE
public static final java.lang.String NODE_FILL_TYPE_TYPE
- See Also:
- Constant Field Values
-
NODE_SHAPE_CIRCLE
public static final java.lang.String NODE_SHAPE_CIRCLE
- See Also:
- Constant Field Values
-
NODE_SHAPE_RECTANGLE
public static final java.lang.String NODE_SHAPE_RECTANGLE
- See Also:
- Constant Field Values
-
NODE_SHAPE_REF
public static final java.lang.String NODE_SHAPE_REF
- See Also:
- Constant Field Values
-
NODE_SHAPE_TYPE
public static final java.lang.String NODE_SHAPE_TYPE
- See Also:
- Constant Field Values
-
NODE_SIZE_REF
public static final java.lang.String NODE_SIZE_REF
- See Also:
- Constant Field Values
-
NODE_SIZE_TYPE
public static final java.lang.String NODE_SIZE_TYPE
- See Also:
- Constant Field Values
-
NODE_TRANSPARENCY_REF
public static final java.lang.String NODE_TRANSPARENCY_REF
- See Also:
- Constant Field Values
-
NODE_TRANSPARENCY_TYPE
public static final java.lang.String NODE_TRANSPARENCY_TYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
NodeVisualData
public NodeVisualData()
-
NodeVisualData
public NodeVisualData(java.lang.String font_name, NodeVisualData.FontType font_style, byte font_size, java.awt.Color font_color, NodeVisualData.NodeShape shape, NodeVisualData.NodeFill fill_type, java.awt.Color node_color, float size, float transparency)
-
-
Method Detail
-
asSimpleText
public final java.lang.StringBuffer asSimpleText()
- Specified by:
asSimpleText
in interfacePhylogenyData
-
asText
public final java.lang.StringBuffer asText()
- Specified by:
asText
in interfacePhylogenyData
-
copy
public final PhylogenyData copy()
Description copied from interface:PhylogenyData
Creates a new PhylogenyData object with identical values as this PhylogenyData. This ~should~ return a deep copy, but not there yet.- Specified by:
copy
in interfacePhylogenyData
- Returns:
- a ~deep~ copy of this PhylogenyData
-
getFillType
public final NodeVisualData.NodeFill getFillType()
-
getFont
public final java.awt.Font getFont()
-
getFontColor
public final java.awt.Color getFontColor()
-
getFontName
public final java.lang.String getFontName()
-
getFontSize
public final byte getFontSize()
-
getFontStyle
public final NodeVisualData.FontType getFontStyle()
-
getFontStyleInt
public final int getFontStyleInt()
-
getNodeColor
public final java.awt.Color getNodeColor()
-
getShape
public final NodeVisualData.NodeShape getShape()
-
getSize
public final float getSize()
-
getTransparency
public final float getTransparency()
-
isEmpty
public final boolean isEmpty()
-
isEqual
public final boolean isEqual(PhylogenyData data)
Description copied from interface:PhylogenyData
Compares this PhylogenyData to PhylogenyData data. In general, this should return true if and only if all fiels are exactly identical.- Specified by:
isEqual
in interfacePhylogenyData
- Returns:
- in general, true if and only if all fiels are exactly identical, false otherwise
-
parseProperty
public void parseProperty(Property prop)
-
setFillType
public final void setFillType(NodeVisualData.NodeFill fill_type)
-
setFillType
public final void setFillType(java.lang.String fill)
-
setFontColor
public final void setFontColor(java.awt.Color font_color)
-
setFontName
public final void setFontName(java.lang.String font_name)
-
setFontSize
public final void setFontSize(int font_size)
-
setFontStyle
public final void setFontStyle(NodeVisualData.FontType font_style)
-
setFontStyle
public final void setFontStyle(int font_style)
-
setFontStyle
public final void setFontStyle(java.lang.String font_style)
-
setNodeColor
public final void setNodeColor(java.awt.Color node_color)
-
setShape
public final void setShape(NodeVisualData.NodeShape shape)
-
setShape
public final void setShape(java.lang.String shape)
-
setSize
public final void setSize(float size)
-
setTransparency
public final void setTransparency(float transparency)
-
toNHX
public final java.lang.StringBuffer toNHX()
- Specified by:
toNHX
in interfacePhylogenyData
-
toPhyloXML
public final void toPhyloXML(java.io.Writer writer, int level, java.lang.String indentation) throws java.io.IOException
Description copied from interface:PhylogenyData
Writes a phyloXML representation of this phylogeny data.- Specified by:
toPhyloXML
in interfacePhylogenyData
- Throws:
java.io.IOException
-
toString
public final java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-