All Packages Class Hierarchy This Package Previous Next Index
Class mesquite.lib.TreeDisplay
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----mesquite.lib.MousePanel
|
+----mesquite.lib.MesquitePanel
|
+----mesquite.lib.TreeDisplay
- public class TreeDisplay
- extends mesquite.lib.MesquitePanel
The panel in which a tree is drawn. This is used within the main tree window, and can be used by other
modules.
If multiple trees need to be drawn, multiple TreeDisplays should be created. A TreeDisplay is created
and supervised by a tree draw coordinator module. A reference to a TreeDisplay is needed
for shading and decorating the tree.
Within the graphics Panel which is the TreeDisplay, a special object of class TreeDrawing is
actually the one responsible for drawing the tree itself. The TreeDrawing is created by the
chosen tree drawing module (e.g. diagonal draw tree). Modules can contribute to the drawing of the
TreeDisplay, whether shading or node pictures or a simple tree legend, by creating an object
of class TreeDisplayExtra and adding it to the vector of extras. The TreeDisplay calls all of
the extras after the tree is drawn, in case those extras need to contribute to the TreeDisplay drawing.
This needs to be fixed up (e.g., fields made private with set and get methods).
-
branchColor
- The color of the branches
-
branchColorDimmed
- The color of a dimmed branch
-
CIRCULAR
- Tree is drawn in circular arrangement of nodes
-
DOWN
- Orientation of the tree with tips down
-
fixedDepthScale
- If tree drawn with fixed depth, this is the depth.
-
fixedScalingOn
- Records whether fixed depth scale is in use.
-
FREEFORM
- Orientation of the tree unspecified
-
holdingTree
- A tree which is to be drawn, but which is being held until drawing of the current tree is finished.
-
LEFT
- Orientation of the tree with tips to left
-
needsUpdating
- This is part of system to record whether the tree needs redrawing, used so as to prevent multiple updates
-
ownerModule
-
-
RIGHT
- Orientation of the tree with tips to right
-
scaling
- Scaling of the tree drawing
-
showBranchLengths
- If true, then branches are drawn proportional to their lengths
-
suppress
- Records whether tree drawing is to be suppressed
-
suppressNames
- Records whether or not the taxon names are to be drawn
-
tipsMargin
- The margin from the tips to the edge of the drawing field
-
totalCreated
-
-
tree
- The tree being drawn
-
UP
- Orientation of the tree with tips up
-
TreeDisplay(MesquiteModule, MesquiteWindow)
-
-
addComponentPlease(Component)
-
-
addExtra(TreeDisplayExtra)
-
-
addPanelPlease(Panel)
-
-
destroyExtras()
-
-
dispose()
-
-
drawAllBackgroundExtras(Tree, int, Graphics)
-
-
drawAllExtras(Tree, int, Graphics)
-
-
fillTaxon(Graphics, int)
-
-
findExtra(TreeDisplayExtra)
-
-
getAllowReorientation()
-
-
getBranchColor(int)
-
-
getDrawingInProcess()
-
-
getDrawTaxonNames()
-
-
getEdgeWidth()
-
-
getExtras()
-
-
getField()
-
-
getFieldHeight()
-
-
getFieldWidth()
-
-
getInvalid()
-
-
getOrientation()
-
-
getTaxa()
-
-
getTaxonNameBuffer()
-
-
getTaxonSpacing()
-
-
getTextVersion()
-
-
getTipsMargin()
-
-
getTree()
-
-
getTreeDrawing()
-
-
moveExtraToFront(TreeDisplayExtra)
-
-
paint(Graphics)
-
-
pleaseUpdate()
-
-
pleaseUpdateAll()
-
-
printAllExtras(Tree, int, Graphics)
-
-
removeComponentPlease(Component)
-
-
removeExtra(TreeDisplayExtra)
-
-
removePanelPlease(Panel)
-
-
repaint()
-
-
setAllowReorientation(boolean)
-
-
setDrawingInProcess(boolean)
-
-
setDrawTaxonNames(DrawTaxonNames)
-
-
setEdgeWidth(int)
-
-
setFieldHeight(int)
-
-
setFieldSize(int, int)
-
-
setFieldWidth(int)
-
-
setFrame(boolean)
-
-
setInvalid(boolean)
-
-
setNotice(String)
-
-
setOrientation(int)
-
-
setSize()
-
-
setTaxa(Taxa)
-
-
setTaxonNameBuffer(int)
-
-
setTaxonSpacing(int)
-
-
setTipsMargin(int)
-
-
setTree(Tree)
-
-
setTreeAllExtras(Tree, CommandRecord)
-
-
setTreeDrawing(TreeDrawing)
-
-
suppressDrawing(boolean)
-
tree
protected mesquite.lib.Tree tree
- The tree being drawn
holdingTree
protected mesquite.lib.Tree holdingTree
- A tree which is to be drawn, but which is being held until drawing of the current tree is finished.
FREEFORM
public static final int FREEFORM
- Orientation of the tree unspecified
UP
public static final int UP
- Orientation of the tree with tips up
RIGHT
public static final int RIGHT
- Orientation of the tree with tips to right
LEFT
public static final int LEFT
- Orientation of the tree with tips to left
DOWN
public static final int DOWN
- Orientation of the tree with tips down
CIRCULAR
public static final int CIRCULAR
- Tree is drawn in circular arrangement of nodes
needsUpdating
protected int needsUpdating
- This is part of system to record whether the tree needs redrawing, used so as to prevent multiple updates
suppress
protected boolean suppress
- Records whether tree drawing is to be suppressed
suppressNames
public boolean suppressNames
- Records whether or not the taxon names are to be drawn
tipsMargin
public int tipsMargin
- The margin from the tips to the edge of the drawing field
showBranchLengths
public boolean showBranchLengths
- If true, then branches are drawn proportional to their lengths
scaling
public double scaling
- Scaling of the tree drawing
fixedDepthScale
public double fixedDepthScale
- If tree drawn with fixed depth, this is the depth.
fixedScalingOn
public boolean fixedScalingOn
- Records whether fixed depth scale is in use.
branchColor
public java.awt.Color branchColor
- The color of the branches
branchColorDimmed
public java.awt.Color branchColorDimmed
- The color of a dimmed branch
ownerModule
protected mesquite.lib.MesquiteModule ownerModule
totalCreated
public static long totalCreated
TreeDisplay
public TreeDisplay(mesquite.lib.MesquiteModule ownerModule,
mesquite.lib.MesquiteWindow window)
getBranchColor
public java.awt.Color getBranchColor(int N)
setTreeDrawing
public void setTreeDrawing(mesquite.lib.TreeDrawing td)
getTreeDrawing
public mesquite.lib.TreeDrawing getTreeDrawing()
getDrawingInProcess
public boolean getDrawingInProcess()
setDrawingInProcess
public void setDrawingInProcess(boolean inProgress)
getDrawTaxonNames
public mesquite.lib.duties.DrawTaxonNames getDrawTaxonNames()
setDrawTaxonNames
public void setDrawTaxonNames(mesquite.lib.duties.DrawTaxonNames dtn)
setTaxa
public void setTaxa(mesquite.lib.Taxa taxa)
getTaxa
public mesquite.lib.Taxa getTaxa()
getTree
public mesquite.lib.Tree getTree()
setTree
public void setTree(mesquite.lib.Tree tree)
setTaxonNameBuffer
public void setTaxonNameBuffer(int b)
getTaxonNameBuffer
public int getTaxonNameBuffer()
setTipsMargin
public void setTipsMargin(int margin)
getTipsMargin
public int getTipsMargin()
setInvalid
public void setInvalid(boolean iv)
getInvalid
public boolean getInvalid()
pleaseUpdateAll
public void pleaseUpdateAll()
pleaseUpdate
public void pleaseUpdate()
repaint
public void repaint()
- Overrides:
- repaint in class java.awt.Component
setFrame
public void setFrame(boolean doFrame)
setSize
public void setSize()
setFieldSize
public void setFieldSize(int x,
int y)
setFieldWidth
public void setFieldWidth(int x)
setFieldHeight
public void setFieldHeight(int y)
getFieldWidth
public int getFieldWidth()
getFieldHeight
public int getFieldHeight()
getField
public java.awt.Rectangle getField()
setEdgeWidth
public void setEdgeWidth(int sp)
getEdgeWidth
public int getEdgeWidth()
setTaxonSpacing
public void setTaxonSpacing(int sp)
getTaxonSpacing
public int getTaxonSpacing()
setNotice
public void setNotice(java.lang.String s)
getExtras
public mesquite.lib.ListableVector getExtras()
addExtra
public void addExtra(mesquite.lib.TreeDisplayExtra extra)
removeExtra
public void removeExtra(mesquite.lib.TreeDisplayExtra extra)
findExtra
public boolean findExtra(mesquite.lib.TreeDisplayExtra extra)
setTreeAllExtras
public void setTreeAllExtras(mesquite.lib.Tree tree,
mesquite.lib.CommandRecord commandRec)
drawAllBackgroundExtras
public void drawAllBackgroundExtras(mesquite.lib.Tree tree,
int drawnRoot,
java.awt.Graphics g)
drawAllExtras
public void drawAllExtras(mesquite.lib.Tree tree,
int drawnRoot,
java.awt.Graphics g)
printAllExtras
public void printAllExtras(mesquite.lib.Tree tree,
int drawnRoot,
java.awt.Graphics g)
suppressDrawing
public void suppressDrawing(boolean toSuppress)
setOrientation
public void setOrientation(int orient)
getOrientation
public int getOrientation()
setAllowReorientation
public void setAllowReorientation(boolean allow)
getAllowReorientation
public boolean getAllowReorientation()
paint
public void paint(java.awt.Graphics g)
- Overrides:
- paint in class java.awt.Container
getTextVersion
public java.lang.String getTextVersion()
fillTaxon
public void fillTaxon(java.awt.Graphics g,
int m)
addPanelPlease
public void addPanelPlease(java.awt.Panel p)
removePanelPlease
public void removePanelPlease(java.awt.Panel p)
addComponentPlease
public void addComponentPlease(java.awt.Component p)
removeComponentPlease
public void removeComponentPlease(java.awt.Component p)
moveExtraToFront
public void moveExtraToFront(mesquite.lib.TreeDisplayExtra extra)
destroyExtras
public void destroyExtras()
dispose
public void dispose()
- Overrides:
- dispose in class mesquite.lib.MesquitePanel
All Packages Class Hierarchy This Package Previous Next Index