|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lib.PrintDiagramRenderer
public class PrintDiagramRenderer
The standard diagram renderer is useful for producing coloured displays of the node hierarchy in a top to bottom, left to right non-proportional tree structure.
Field Summary | |
---|---|
private int |
HEIGHT
|
private double |
HEIGHT_BASE
|
protected boolean |
layoutInvalid
|
private double |
SCALAR
|
private int |
WIDTH
|
private double |
WIDTH_BASE
|
private int |
XSPACING
|
private double |
XSPACING_BASE
|
private int |
yDepth
|
private int |
YSPACING
|
private double |
YSPACING_BASE
|
Constructor Summary | |
---|---|
PrintDiagramRenderer()
Initialize the diagram renderer |
Method Summary | |
---|---|
int |
getHeight()
|
int |
getWidth()
|
int |
getXSpacing()
|
int |
getYSpacing()
|
double |
getZoomLevel()
Get our currnet zoom level |
void |
invalidateLayout()
|
private void |
layoutButton(JDiagram diagram,
java.awt.Dimension dimensions,
JTreeNode button,
int x,
int y)
Draw the button onto the form at the relevant position |
private void |
layoutNodes(JDiagram diagram,
java.awt.Dimension dimensions,
JTreeNode node,
int xDepth)
Recursively render the diagram |
void |
layoutNodes(JDiagram diagram,
JTreeNode root)
Lay out a hierarchy of nodes onto the diagram |
void |
loadConfiguration()
Reload attributes from the configuration database. |
java.awt.AlphaComposite |
makeComposite(float alpha)
Create a composite colour for transparency |
void |
paintDiagram(JDiagram diagram,
java.awt.Graphics g)
Paint a JDiagram for the user |
private void |
paintRecursively(java.awt.Graphics g,
JTreeNode node)
Recursively iterate through the tree and draw the lines connecting buttons |
void |
paintTreeNode(JTreeNode node,
java.awt.Graphics g)
Paint an individual tree node |
void |
setXSpacing(int value)
|
void |
setYSpacing(int value)
|
void |
setZoomLevel(double zoom)
Reset the zoom level of the diagram |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private double WIDTH_BASE
private double HEIGHT_BASE
private int WIDTH
private int HEIGHT
private double SCALAR
private int yDepth
private double XSPACING_BASE
private double YSPACING_BASE
private int XSPACING
private int YSPACING
protected boolean layoutInvalid
Constructor Detail |
---|
public PrintDiagramRenderer()
Method Detail |
---|
public void loadConfiguration()
public double getZoomLevel()
getZoomLevel
in interface IRenderer
public void setXSpacing(int value)
public void setYSpacing(int value)
public int getXSpacing()
public int getYSpacing()
public int getWidth()
public int getHeight()
public void setZoomLevel(double zoom)
setZoomLevel
in interface IRenderer
public void paintDiagram(JDiagram diagram, java.awt.Graphics g)
paintDiagram
in interface IRenderer
diagram
- Diagram to paint to.g
- Graphics object to paint with.private void paintRecursively(java.awt.Graphics g, JTreeNode node)
public void paintTreeNode(JTreeNode node, java.awt.Graphics g)
paintTreeNode
in interface IRenderer
node
- Node to paint.g
- Graphics object to paint with.public java.awt.AlphaComposite makeComposite(float alpha)
public void layoutNodes(JDiagram diagram, JTreeNode root)
layoutNodes
in interface IRenderer
diagram
- Diagram to lay out the nodes on.root
- Root of the hierachy of nodes.private void layoutNodes(JDiagram diagram, java.awt.Dimension dimensions, JTreeNode node, int xDepth)
public void invalidateLayout()
private void layoutButton(JDiagram diagram, java.awt.Dimension dimensions, JTreeNode button, int x, int y)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |