|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttreebolic.view.Mapper
treebolic.view.AbstractPainter
public abstract class AbstractPainter
Painter base class
Field Summary | |
---|---|
private static int |
FONTDEFAULTSIZE
Font default size |
private static int |
FONTDEFAULTSTEP
Font size increment/decrement step |
protected boolean |
hyperbolicEdges
Whether to render edges as hyperbolic edges |
protected boolean |
isDragging
Whether a dragging operation is pending |
protected static int |
NFONTS
Number of font sizes |
protected java.awt.Color |
theBackColor
Default background color |
private static java.awt.Color |
theBackColor0
Initial default background color |
java.awt.Image |
theBackgroundImage
Background (tiled) image |
java.awt.Image |
theDefaultEdgeImage
Default edge image |
java.awt.Image |
theDefaultNodeImage
Default node image |
java.awt.Image |
theDefaultTreeEdgeImage
Default tree edge image |
protected java.awt.Color |
theEdgeColor
Default edge color |
private static java.awt.Color |
theEdgeColor0
Initial default tree edge color |
protected int |
theEdgeStyle
Default edge style |
protected java.awt.Font[] |
theFonts
Fonts |
protected java.awt.Color |
theForeColor
Default foreground color |
private static java.awt.Color |
theForeColor0
Initial default foreground color |
protected java.awt.Graphics |
theGraphics
Cached graphics context |
protected java.awt.Color |
theNodeBackColor
Default node background color |
private static java.awt.Color |
theNodeBackColor0
Initial default node background color |
protected java.awt.Color |
theNodeForeColor
Default node foreground color |
private static java.awt.Color |
theNodeForeColor0
Initial default node foreground color |
protected java.awt.Color |
theTreeEdgeColor
Default tree edge color |
private static java.awt.Color |
theTreeEdgeColor0
Initial default tree edge color |
protected int |
theTreeEdgeStyle
Default tree edge style |
protected static int |
theXInset
x inset for node box |
protected static int |
theYInset
y inset for node box |
Fields inherited from class treebolic.view.Mapper |
---|
theLeft, theScaleX, theScaleY, theSize, theTop, theXShift, theYShift |
Constructor Summary | |
---|---|
AbstractPainter()
Constructor |
Method Summary | |
---|---|
void |
enterDrag()
Enter drag mode |
boolean |
getHyperbolicEdges()
Get edge rendering mode |
void |
leaveDrag()
Leave drag mode |
abstract void |
paint(INode thisRoot,
java.util.List<IEdge> thisEdgeList)
Paint |
abstract void |
paintBackground()
Paint background |
void |
resetColors()
Reset colors |
void |
setColors(java.awt.Color thisBackColor,
java.awt.Color thisForeColor,
java.awt.Color thisNodeBackColor,
java.awt.Color thisNodeForeColor,
java.awt.Color thisTreeEdgeColor,
java.awt.Color thisEdgeColor)
Set colors |
void |
setEdgeStyles(java.lang.Integer thisTreeEdgeStyle,
java.lang.Integer thisEdgeStyle)
Set default edge styles |
void |
setFonts(java.lang.String thisFontFace,
java.lang.Integer thisFontSize,
java.lang.Integer thisFontSizeStep)
Set fonts |
void |
setHyperbolicEdges(java.lang.Boolean thisFlag)
Set edge rendering mode |
void |
setImages(java.awt.Image thisBackgroundImage,
java.awt.Image thisDefaultNodeImage,
java.awt.Image thisDefaultTreeEdgeImage,
java.awt.Image thisDefaultEdgeImage)
Set images |
void |
setup(java.awt.Graphics thisGraphics,
java.awt.Dimension thisSize)
Set up graphics context for the painter to work on |
Methods inherited from class treebolic.view.Mapper |
---|
computeScale, getSize, getViewLocation, getXShift, getYShift, hUnitCircleToView, hViewToUnitCircle, setXShift, setYShift, setZoomFactor, viewToUnitCircle, wUnitCircleToView, wViewToUnitCircle, xUnitCircleToView, xViewToUnitCircle, yUnitCircleToView, yViewToUnitCircle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int NFONTS
private static final int FONTDEFAULTSIZE
private static final int FONTDEFAULTSTEP
protected static final int theXInset
protected static final int theYInset
private static final java.awt.Color theBackColor0
private static final java.awt.Color theForeColor0
private static final java.awt.Color theNodeBackColor0
private static final java.awt.Color theNodeForeColor0
private static final java.awt.Color theTreeEdgeColor0
private static final java.awt.Color theEdgeColor0
protected java.awt.Graphics theGraphics
protected boolean isDragging
protected boolean hyperbolicEdges
protected java.awt.Font[] theFonts
protected java.awt.Color theBackColor
protected java.awt.Color theForeColor
protected java.awt.Color theNodeBackColor
protected java.awt.Color theNodeForeColor
protected java.awt.Color theTreeEdgeColor
protected java.awt.Color theEdgeColor
protected int theTreeEdgeStyle
protected int theEdgeStyle
public java.awt.Image theDefaultNodeImage
public java.awt.Image theDefaultTreeEdgeImage
public java.awt.Image theDefaultEdgeImage
public java.awt.Image theBackgroundImage
Constructor Detail |
---|
public AbstractPainter()
Method Detail |
---|
public abstract void paintBackground()
public abstract void paint(INode thisRoot, java.util.List<IEdge> thisEdgeList)
thisRoot
- starting nodethisEdgeList
- edgespublic void setup(java.awt.Graphics thisGraphics, java.awt.Dimension thisSize)
thisGraphics
- graphics context to work onthisSize
- size of the graphics contextpublic void setFonts(java.lang.String thisFontFace, java.lang.Integer thisFontSize, java.lang.Integer thisFontSizeStep)
thisFontFace
- fontthisFontSize
- font sizethisFontSizeStep
- font size increment/decrement steppublic void setColors(java.awt.Color thisBackColor, java.awt.Color thisForeColor, java.awt.Color thisNodeBackColor, java.awt.Color thisNodeForeColor, java.awt.Color thisTreeEdgeColor, java.awt.Color thisEdgeColor)
thisBackColor
- background default colorthisForeColor
- foreground default colorthisNodeBackColor
- node background default colorthisNodeForeColor
- node foreground default colorthisTreeEdgeColor
- tree edge default colorthisEdgeColor
- edge default colorpublic void resetColors()
public void setEdgeStyles(java.lang.Integer thisTreeEdgeStyle, java.lang.Integer thisEdgeStyle)
thisTreeEdgeStyle
- default tree edge stylethisEdgeStyle
- default edge stylepublic void setImages(java.awt.Image thisBackgroundImage, java.awt.Image thisDefaultNodeImage, java.awt.Image thisDefaultTreeEdgeImage, java.awt.Image thisDefaultEdgeImage)
thisBackgroundImage
- background imagethisDefaultNodeImage
- default node imagethisDefaultTreeEdgeImage
- default tree edge imagethisDefaultEdgeImage
- default edge imagepublic void setHyperbolicEdges(java.lang.Boolean thisFlag)
thisFlag
- true if edges are rendered as arcspublic boolean getHyperbolicEdges()
public void enterDrag()
public void leaveDrag()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |