|
|||
| PREV CLASS NEXT CLASS | |||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||
java.lang.Object | +--ch.ethz.graphbench.toolbox.Toolbox
This class provides some methods for generating Algorithm outputs. It provides methods to draw arbitrary Shapes within the graph and also methods for displaying text output.
| Field Summary | |
static int |
HORIZONTAL
Specifies that a horizontal line should be drawn. |
static int |
VERTICAL
Specifies that a vertical line should be drawn. |
| Method Summary | |
void |
addLine(int position,
int direction,
java.awt.Color color)
Adds a line to the list of graphical components. |
void |
addShape(java.awt.Shape shape,
java.awt.Color color,
boolean filled)
Adds shape to the list of graphical components. |
void |
clearAllGraphicComponents()
Removes all graphical components from the list. |
void |
clearOutputText()
Clears all text in the text ouput window. |
static Toolbox |
getToolbox()
Returns an instance of Toolbox. |
void |
printText(java.lang.String text)
Ouputs a string to a special frame. |
void |
removeLine(int position,
int direction)
Removes a line from the list of graphical components. |
void |
removeShape(java.awt.Shape shape)
Removes shape from list of graphical components. |
void |
setDirected(boolean directed)
Sets the directed attribute of the Toolbox object |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int HORIZONTAL
public static final int VERTICAL
| Method Detail |
public void setDirected(boolean directed)
directed - The new directed valuepublic void printText(java.lang.String text)
text - String to be added to text output frame.
public void addShape(java.awt.Shape shape,
java.awt.Color color,
boolean filled)
shape - Shape to be drawn in the future.color - Color to use to draw shape with.filled - Boolean indicating if shape should be drawn filled or
outlined.public void removeShape(java.awt.Shape shape)
shape - Shape to be removed
public void addLine(int position,
int direction,
java.awt.Color color)
position - Position of the line, either x- or y-coordinate
depending on the type of the line.direction - Type of the line, can either be Toolbox.HORIZONTAL or
Toolbox.VERTICAL.color - The color to draw the line with.
public void removeLine(int position,
int direction)
position - Position of the line to be removed, either x- or
y-coordinate depending on the type of the line.direction - Type of the line to be removed, can either be
Toolbox.HORIZONTAL or Toolbox.VERTICAL.public void clearAllGraphicComponents()
public void clearOutputText()
public static Toolbox getToolbox()
|
|||
| PREV CLASS NEXT CLASS | |||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||