public class Point
extends Shape
One more more points in the plot.
-
-
Constructor Summary
Constructors
-
Method Summary
Creates a Point with circle mark and black color.
of(double[][] points,
char mark)
Creates a Point with black color.
Creates a Point with circle mark.
void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
MARKS
public static char[] MARKS
The marks of point.
-
Constructor Details
-
Point
public Point(double[][] points,
char mark,
Color color)
Constructor.
- Parameters:
points - a n-by-2 or n-by-3 matrix that are the coordinates of points.
mark - the mark of points.
- . : dot
- + : +
- - : -
- | : |
- * : star
- x : x
- o : circle
- O : large circle
- @ : solid circle
- # : large solid circle
- s : square
- S : large square
- q : solid square
- Q : large solid square
- others : dot
color - the color of points.
-
Method Details
-
paint
Description copied from class: Shape
Draws the shape.
- Specified by:
paint in class Shape
-
of
public static Point of(double[][] points)
Creates a Point with circle mark and black color.
-
of
public static Point of(double[][] points,
Color color)
Creates a Point with circle mark.
-
of
public static Point of(double[][] points,
char mark)
Creates a Point with black color.