|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Visualization
This class is used to control and show a visualizations by an AnimationPanel
. If a visualizatoin is specified when an AnimationPanel
is running the normal step
method should be
altered. The step method should use Visualization to control the data. The
current step
should not be incremented until
the visualization and the visual steps are finished
.
Here is an example.
Field Summary | |
protected boolean |
circles
boolean specifying whether the circle visualization is being used |
protected boolean |
dottedLines
boolean specifying whether the dotted lines visualization is being used |
Constructor Summary | |
Visualization()
Constructor that creates a new Visualization |
Method Summary | |
void |
drawCircle(Graphics page,
Color c,
Rectangle rect,
Point p,
double finalsize)
Draws a circle at a certain Point adjusting the size according to the visual step. |
void |
drawDottedLine(Graphics page,
Color c,
Rectangle rect,
Point start,
Point end)
Draws a dotted line between the two specified points. |
boolean |
finalVisual()
Method that returns true if it is time for final visual for the visual steps. |
boolean |
firstVstep()
Method that returns true if it is the first visual step. |
int |
getFinalPause()
Gets the final pause for visualization. |
int |
getTotalVsteps()
gets the total number of visual steps |
int |
getVstep()
Gets the visual step. |
boolean |
InitFinalVisual()
Method that returns true if it is time to init the final visual. |
void |
InitVstep()
Method that initializes each visual step. |
void |
PickVisualization(String v)
Picks the specified visualization |
void |
resetVsteps()
resets visual steps to the first step |
void |
setFinalPause(int thepause)
Sets the final pause for visualization. |
void |
setTotalVsteps(int steps)
Sets the total number of visual steps. |
boolean |
VstepsDone()
Method that returns true when the visualization is done. |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected boolean circles
protected boolean dottedLines
Constructor Detail |
public Visualization()
Method Detail |
public void PickVisualization(String v)
v
- A string specifying the visualization to be used. Acceptable
values are "None", "Circles", and "Dotted Lines". If
v
is not an acceptable value the visualization is
not changed.public int getVstep()
firstVstep()
,
resetVsteps()
,
InitVstep()
public boolean firstVstep()
getVstep()
,
resetVsteps()
,
InitVstep()
public void resetVsteps()
getVstep()
,
firstVstep()
,
InitVstep()
,
VstepsDone()
public int getTotalVsteps()
setTotalVsteps(int)
public void setTotalVsteps(int steps)
25
.getTotalVsteps()
public int getFinalPause()
final visual
.setFinalPause(int)
,
finalVisual()
,
InitFinalVisual()
public void setFinalPause(int thepause)
final visual
. The default value is 5
visual
steps.getFinalPause()
,
finalVisual()
,
InitFinalVisual()
public boolean finalVisual()
pause
at
the end of the visual steps.InitFinalVisual()
,
getFinalPause()
,
setFinalPause(int)
public boolean InitFinalVisual()
pause
at
the end of the visual steps.InitFinalVisual()
,
getFinalPause()
,
setFinalPause(int)
public void InitVstep()
getVstep()
,
firstVstep()
,
resetVsteps()
public boolean VstepsDone()
current step
in the AnimationPanel
should be incremented if this is truefirstVstep()
public void drawCircle(Graphics page, Color c, Rectangle rect, Point p, double finalsize)
page
- used to paint on the componentc
- color of the circlerect
- a Rectangle that specifies the area that the component spansp
- point that circle is drawn atfinalsize
- the final diameter of the circle. The diameter should be
scaled
to the size of the
AnimationPanel.drawDottedLine(java.awt.Graphics, java.awt.Color, java.awt.Rectangle, Point, Point)
public void drawDottedLine(Graphics page, Color c, Rectangle rect, Point start, Point end)
page
- used to paint on the componentc
- color of the circlerect
- a Rectangle that specifies the area that the component spansstart
- point that the dotted line starts atend
- point that the dotted line starts atdrawCircle(java.awt.Graphics, java.awt.Color, java.awt.Rectangle, Point, double)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |