|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.rosuda.ibase.toolkit.PlotComponent
org.rosuda.ibase.toolkit.PGSCanvas
org.rosuda.klimt.plots.TreeCanvas
public class TreeCanvas
Tree Canvas - implementation of the tree display
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.rosuda.ibase.toolkit.PGSCanvas |
|---|
PGSCanvas.IDlgCL |
| Field Summary | |
|---|---|
boolean |
connMode
link nodes with 90-deg lines |
double |
devGainScale
deviance gain scale |
int |
dragm
|
SNode |
dragn
node currently being dragged (externally used by mouse listeners) |
boolean |
finalAlign
allign all leaves on the bottom |
boolean |
infoUpdate
info window has to be updated |
boolean |
labelBg
if true node labels (selectable) have background rectangle even if not selected |
int |
ldx
|
int |
ldy
|
java.util.Vector |
nod
vector of nodes of type SNode |
boolean |
nodeMode
use node sizes proportional to the # of caes |
boolean |
PD_goCart
P.Dirschedl proposed GoCart |
boolean |
PD_lines
P.Dirschedl proposed lines |
boolean |
PD_POE
P.Dirschedl proposed PlaceOverExpectation |
boolean |
PD_POE_log
use log scale for expectations/predictions |
boolean |
rot90
rotate tree by 90 deg |
SNode |
selectedNode
currently selected node or null if none |
boolean |
shortLabels
|
boolean |
showDetailed
show detailed or rough info |
boolean |
showDevGain
show deviance gain |
boolean |
showInfo
showing info about a node currently |
boolean |
showLabels
show node labels |
boolean |
showPathWindow
state of the path winodw |
boolean |
showPVAll
show prediction in inner nodes, too |
boolean |
showSampleDev
show sample deviance as well (has no effect in showDevGain=false) |
static int |
Tool_Move
tool mode constant: move |
static int |
Tool_Node
tool mode constant: select node |
static int |
Tool_Query
tool mode constant: query |
static int |
Tool_Select
tool mode constant: select cases |
static int |
Tool_Zoom
tool mode constant: zoom |
int |
toolMode
tool mode |
double |
zoomFactor
zoom factor used to determine logical zoom behavior |
| Fields inherited from class org.rosuda.ibase.toolkit.PGSCanvas |
|---|
ax, ay, cancel, desc, inProgress, intDlg, myFrame, pageFormat, paintLayerCounter, pm |
| Fields inherited from class org.rosuda.ibase.toolkit.PlotComponent |
|---|
AWTGrDevID, GrDevID, JOGLGrDevID, layers, SWINGGrDevID |
| Fields inherited from interface java.awt.print.Printable |
|---|
NO_SUCH_PAGE, PAGE_EXISTS |
| Constructor Summary | |
|---|---|
TreeCanvas(SNode troot,
java.awt.Frame cont)
construct a new display instance based on the specified tree |
|
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
action listener methods reroutes all request to the commander interface |
void |
buildLeaf(int parx,
int pary,
int splitUnit,
int yShift,
int myWidth,
int totalHeight,
SNode t,
int maxH,
boolean updatePlacement)
builds node structure recursively. |
void |
drawGroupsRect(PoGraSS g,
int x,
int y,
int w,
int h,
SMarker m,
int[] cases)
tool: draws all selections including secondary marks in a rectangle from left to right |
java.awt.Dimension |
getMinimumSize()
supply minimal resize dimension (needed especially by MacOS X) |
void |
keyPressed(java.awt.event.KeyEvent e)
|
void |
keyReleased(java.awt.event.KeyEvent e)
|
void |
keyTyped(java.awt.event.KeyEvent e)
|
void |
mouseClicked(java.awt.event.MouseEvent ev)
|
void |
mouseDragged(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mouseMoved(java.awt.event.MouseEvent ev)
|
void |
mousePressed(java.awt.event.MouseEvent ev)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
void |
moveLeaf(int dx,
int dy,
SNode t,
boolean recursively)
move node coordinates relative based on the x/y difference |
void |
Notifying(NotifyMsg msg,
java.lang.Object o,
java.util.Vector path)
notify handler (simply repaints the tree) ignores the parameter |
void |
paintLeaf(PoGraSS g,
SNode t)
paints a node and all its subnodes recursively. |
void |
paintPoGraSS(PoGraSS p)
implementation of the abstract method of PGSCanvas calls paintLeaf(org.rosuda.pograss.PoGraSS, org.rosuda.klimt.SNode)(g,root) |
void |
queryNode(SNode n,
boolean detailed)
|
void |
redesignNodes()
|
void |
redesignNodes(boolean updatePlacement)
redesign nodes based on the current canvas geometry (result in a call to redesignNodes(Dimension, boolean)) |
void |
redesignNodes(java.awt.Dimension geom,
boolean updatePlacement)
redesign nodes based on the specifie geometry. |
java.lang.Object |
run(java.lang.Object o,
java.lang.String cmd)
commander interface implementation for all user commands |
void |
selectNode(SNode n)
set currently selected node |
void |
setToolMode(int mode)
set tool mode and use according cursor shape |
void |
updateCachedValues()
updates all cached values of the tree. |
| Methods inherited from class org.rosuda.ibase.toolkit.PGSCanvas |
|---|
beginPaint, dispose, endPaint, finalize, forcedFlush, getData, getFrame, getGlobalNotifier, getPlotManager, getTitle, getXAxis, getYAxis, nextLayer, paintLayer, print, setFrame, setOption, setOption, setOption, setOption, setOption, setOption, setTitle |
| Methods inherited from class org.rosuda.ibase.toolkit.PlotComponent |
|---|
addKeyListener, addMouseListener, addMouseMotionListener, getBounds, getComponent, getHeight, getLocation, getParent, getSize, getWidth, newQueryPopup, newQueryPopup, paintLayer, repaint, setBackground, setCursor, setSize, setSize, setToolTipText, setUpdateRoot |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int Tool_Select
public static final int Tool_Move
public static final int Tool_Zoom
public static final int Tool_Node
public static final int Tool_Query
public java.util.Vector nod
SNode
public SNode selectedNode
public int dragm
public int ldx
public int ldy
public SNode dragn
public boolean showInfo
public boolean showDetailed
public boolean infoUpdate
public boolean rot90
public boolean nodeMode
public boolean connMode
public boolean finalAlign
public boolean showDevGain
public boolean showSampleDev
public boolean showPVAll
public boolean showLabels
public boolean shortLabels
public double devGainScale
public boolean showPathWindow
public int toolMode
public double zoomFactor
public boolean PD_lines
public boolean PD_goCart
public boolean PD_POE
public boolean PD_POE_log
public boolean labelBg
| Constructor Detail |
|---|
public TreeCanvas(SNode troot,
java.awt.Frame cont)
troot - root of the treecont - parent frame| Method Detail |
|---|
public java.awt.Dimension getMinimumSize()
public void updateCachedValues()
public void redesignNodes()
public void redesignNodes(boolean updatePlacement)
redesignNodes(Dimension, boolean))
public void redesignNodes(java.awt.Dimension geom,
boolean updatePlacement)
buildLeaf(int, int, int, int, int, int, org.rosuda.klimt.SNode, int, boolean) and #paint implicitely
geom - target geometry to use for design
public void Notifying(NotifyMsg msg,
java.lang.Object o,
java.util.Vector path)
Notifying in interface DependentNotifying in class PGSCanvaso - Object that sent the notification. The actual content is implementation-dependent.path - This parameter is null for non-cascaded notify - in that case further calls to NotifyAll are not allowed. Otherwise it contains a Vector with all objects notified so far during cascaded notify. To aviod cyclic notifications every instance must either reject cascaded notifications (i.e. no calls to NotifyAll at all) or check for occurence of itself in the chain before calling NotifyAll.
The only valid recursive calls in Notifying are NotifyAll(path) and NotifyAll(..,path), because only these two pass the "path" parameter to avoid cyclic loops.
public void moveLeaf(int dx,
int dy,
SNode t,
boolean recursively)
dx - difference in x directiondy - difference in y directiont - the node to be movedrecursively - if set to true all sub-nodes are also moved respectively
public void buildLeaf(int parx,
int pary,
int splitUnit,
int yShift,
int myWidth,
int totalHeight,
SNode t,
int maxH,
boolean updatePlacement)
parx - parent x coordinatepary - parent y coordinatesplitUnit - space between two leaves - smallest granularity unit of the design (in x direction)yShift - space between tree levels in y directionmyWidth - with of this nodetotalHeight - total height of the final treet - the node to be paintedpublic void paintPoGraSS(PoGraSS p)
paintLeaf(org.rosuda.pograss.PoGraSS, org.rosuda.klimt.SNode)(g,root)
paintPoGraSS in class PGSCanvasg - graphic context to paint on
public void paintLeaf(PoGraSS g,
SNode t)
SNode
contents of the SNode nodes.
g - graphic context to pain ont - node to paint
public void queryNode(SNode n,
boolean detailed)
public void selectNode(SNode n)
public java.lang.Object run(java.lang.Object o,
java.lang.String cmd)
run in interface Commanderrun in class PGSCanvaso - origin of the commandcmd - command string
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenerpublic void setToolMode(int mode)
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenerpublic void mouseMoved(java.awt.event.MouseEvent ev)
mouseMoved in interface java.awt.event.MouseMotionListenerpublic void mouseClicked(java.awt.event.MouseEvent ev)
mouseClicked in interface java.awt.event.MouseListenerpublic void mousePressed(java.awt.event.MouseEvent ev)
mousePressed in interface java.awt.event.MouseListenerpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenerpublic void keyTyped(java.awt.event.KeyEvent e)
keyTyped in interface java.awt.event.KeyListenerpublic void keyPressed(java.awt.event.KeyEvent e)
keyPressed in interface java.awt.event.KeyListenerpublic void keyReleased(java.awt.event.KeyEvent e)
keyReleased in interface java.awt.event.KeyListener
public void drawGroupsRect(PoGraSS g,
int x,
int y,
int w,
int h,
SMarker m,
int[] cases)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||