Graph 2 D
Graph 2 D
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD
graph2D
Class Graph2D
java.lang.Object
java.awt.event.WindowAdapter
graph2D.Graph2D
All Implemented Interfaces:
java.awt.event.WindowFocusListener, java.awt.event.WindowListener,
java.awt.event.WindowStateListener, java.util.EventListener
Direct Known Subclasses:
Plotter
Graph2D let users work with a graphic space for drawing strings, points, lines, polylines, polygons,
arcs and filled arcs.
Version:
(1.2)
Author:
(CC-BY-NC-SA. IIP, PRG, EDA @ ETSINF-UPV. pmarques)
Field Summary
Fields
Constructor Summary
Constructors
Graph2D()
The by default constructor creates a squared working space for x in [-1.0 .. +1.0] and y in [-1.0 ..
+1.0].
Method Summary
void clear()
Clear all elements, reestablishing background color and, possibly, axes
and mouse position.
java.awt.Color getBackgroundColor()
Returns the current setting for the background color.
java.awt.Font getFont()
Returns the current setting for the Font.
java.awt.Color getForegroundColor()
Returns the current setting for the foreground color.
double getMaxX()
Returns the maximum x coordinate.
double getMaxY()
Returns the maximum y coordinate.
double getMinX()
Returns the minimum x coordinate.
double getMinY()
Returns the minimum y coordinate.
int getThickness()
Returns the current setting for the thickness of the elements.
void setBackgroundColor(java.awt.Color c)
Set background Color c, for drawing from now on.
void setFont(java.awt.Font f)
Set the Font f for drawing Strings from now on.
void setForegroundColor(java.awt.Color c)
Set foreground Color c, for drawing from now on.
void setResizable(boolean sR)
Makes the Graphic window resizable or not.
void setThickness(int th)
Set lines and points thickness th for drawing from now on.
void setTitle(java.lang.String tit)
Sets the title of the graph window.
void showAxes(boolean opt)
Set drawing axes on (true by default) or off (false).
void showMousePosition(boolean opt)
Set showing mouse position on (true by default) or off (false).