Class mjr.pstree.PSTGraph
All Packages Class Hierarchy This Package Previous Next Index
Class mjr.pstree.PSTGraph
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----sprite.SpriteArea
|
+----graph.GraphArea
|
+----mjr.pstree.PSTGraph
- public class PSTGraph
- extends GraphArea
- implements ButtonOwner, CheckboxOwner
Interactive graph area for the priority search tree demo.
-
BUTTON_BORDER
-
-
BUTTON_HEIGHT
-
-
BUTTON_WIDTH
-
-
LEGEND_HEIGHT
-
-
LEGEND_TXT
-
-
POINT_BOUND
-
-
RANDOM_PTS
-
-
RANGE_INST
-
-
applet
-
-
clear
-
-
draw
-
-
images
-
-
median
-
-
queryEdges
-
-
queryPts
-
-
random
-
-
rcsid
-
-
searchBox
-
-
showSplitLine
-
-
statusText
-
-
tree
-
-
PSTGraph(Applet, int, int, ParameterInfo)
-
-
ButtonClicked(ButtonSprite)
-
-
CheckboxChanged(CheckboxSprite, boolean)
-
-
HandleBackgroundEvent(Event)
- Gets input from the user that isn't intercepted by any sprite.
-
LoadGraph(String)
-
-
RemoveNode(Node)
-
-
addPanels(Applet, String)
-
-
addPoint(int, int)
-
-
allowSearching()
-
-
disallowSearching()
-
-
dispInstructions(String[])
-
-
dprint(String)
-
-
dprintln(String)
-
-
drawTree()
-
-
getNodeAt(int, int)
-
-
getPoints()
-
-
loadImages(Applet, String, String[])
-
-
lockGraph()
-
-
randomPoints()
- inserts from 0 to RANDOM_PTS random points into
each of the 4 quadrants of the graph
-
rangeQuery(int, int, int)
-
-
showStatus()
- displays the current instructions in the status area
of the applet
-
trouble(String)
-
-
unLockGraph()
-
draw
protected ButtonSprite draw
clear
protected ButtonSprite clear
random
protected ButtonSprite random
searchBox
protected SearchBoxSprite searchBox
median
protected CheckboxSprite median
queryPts
protected Vector queryPts
queryEdges
protected Vector queryEdges
images
protected Vector images
tree
protected PSTree tree
applet
protected Applet applet
showSplitLine
protected boolean showSplitLine
statusText
protected String statusText
RANGE_INST
protected final static String RANGE_INST[]
rcsid
public final static String rcsid
RANDOM_PTS
public final static int RANDOM_PTS
BUTTON_WIDTH
public final static int BUTTON_WIDTH
BUTTON_HEIGHT
public final static int BUTTON_HEIGHT
BUTTON_BORDER
public final static int BUTTON_BORDER
POINT_BOUND
public int POINT_BOUND
LEGEND_HEIGHT
public final static int LEGEND_HEIGHT
LEGEND_TXT
protected final static String LEGEND_TXT[]
PSTGraph
public PSTGraph(Applet applet,
int WIDTH,
int HEIGHT,
ParameterInfo info)
getPoints
protected Vector getPoints()
dispInstructions
public void dispInstructions(String theInst[])
showStatus
public void showStatus()
- displays the current instructions in the status area
of the applet
randomPoints
protected void randomPoints()
- inserts from 0 to RANDOM_PTS random points into
each of the 4 quadrants of the graph
CheckboxChanged
public void CheckboxChanged(CheckboxSprite checkbox,
boolean newState)
ButtonClicked
public void ButtonClicked(ButtonSprite button)
loadImages
protected Vector loadImages(Applet applet,
String base,
String gifs[])
rangeQuery
public void rangeQuery(int x0,
int x1,
int y0)
allowSearching
protected void allowSearching()
disallowSearching
protected void disallowSearching()
lockGraph
protected void lockGraph()
unLockGraph
protected void unLockGraph()
drawTree
protected synchronized void drawTree()
HandleBackgroundEvent
public void HandleBackgroundEvent(Event e)
- Gets input from the user that isn't intercepted by any sprite.
Currently only handles mouse clicks, which create a new node.
- Overrides:
- HandleBackgroundEvent in class SpriteArea
addPoint
protected PSTNode addPoint(int x,
int y)
RemoveNode
protected void RemoveNode(Node node)
- Overrides:
- RemoveNode in class GraphArea
getNodeAt
public PSTNode getNodeAt(int x,
int y)
LoadGraph
public synchronized void LoadGraph(String s)
- Overrides:
- LoadGraph in class GraphArea
dprintln
public void dprintln(String str)
dprint
public void dprint(String str)
trouble
public void trouble(String str)
addPanels
protected void addPanels(Applet applet,
String theTile)
All Packages Class Hierarchy This Package Previous Next Index