public class Polyline
extends java.lang.Object
Constructor and Description |
---|
Polyline(java.lang.String givenColor)
Constructs an empty polyline with the given color and a
width of one pixel.
|
Polyline(java.lang.String givenColor,
int givenWidth)
Constructs an empty polyline with the given color and the given
width, in pixels.
|
Modifier and Type | Method and Description |
---|---|
void |
addPoint(java.awt.Point point)
Adds a point to the polyline.
|
java.lang.String |
getColor()
Returns the color of this polyline.
|
java.util.ArrayList<java.awt.Point> |
getPoints()
Returns the list of points in this polyline.
|
int |
getWidth()
Returns the width of this polyline, in pixels.
|
public Polyline(java.lang.String givenColor)
givenColor
- name of the color for this polylinepublic Polyline(java.lang.String givenColor, int givenWidth)
givenColor
- name of the color for this polylinegivenWidth
- width in pixels for this polylinepublic void addPoint(java.awt.Point point)
point
- point to be addedpublic java.util.ArrayList<java.awt.Point> getPoints()
public java.lang.String getColor()
public int getWidth()