jp.sf.mapswidgets
Class Polyline

java.lang.Object
  extended by jp.sf.mapswidgets.Overlay
      extended by jp.sf.mapswidgets.Polyline

public final class Polyline
extends Overlay

Instances of this class represent a vector polyline overlay on the map.

A polyline is drawn with the vector drawing facilities of the browser if they are available or an image overlay from Google servers otherwise.

See Google Maps API documentation [Class Reference > GPolyline].

See Also:
Marker

Constructor Summary
Polyline(Point[] points)
          Construct a new instance of this class given the points.
Polyline(Point[] points, org.eclipse.swt.graphics.RGB color)
          Construct a new instance of this class given the points and the color.
Polyline(Point[] points, org.eclipse.swt.graphics.RGB color, int lineWidth)
          Construct a new instance of this class given the points, the color and the width of the line.
Polyline(Point[] points, org.eclipse.swt.graphics.RGB color, int lineWidth, double opacity)
          Construct a new instance of this class given the points, the color , the width of the line and the opacity.
 
Method Summary
 void dispose()
          Removes this polyline form the map.
 org.eclipse.swt.graphics.RGB getColor()
          Get the color.
 int getLineWidth()
          Get the width of the line.
 double getOpacity()
          Get the opacity.
 Point[] getPoints()
          Get the points.
 java.util.List<Point> getPointsList()
          Get the inner points list.
 void setColor(org.eclipse.swt.graphics.RGB color)
          Set the color
 void setLineWidth(int lineWidth)
          Set the width of the line
 void setOpacity(double opacity)
          Set the opacity.
 void setPoints(Point[] points)
          Set the points
 
Methods inherited from class jp.sf.mapswidgets.Overlay
toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Polyline

public Polyline(Point[] points)
Construct a new instance of this class given the points.

Parameters:
points - the points

Polyline

public Polyline(Point[] points,
                org.eclipse.swt.graphics.RGB color)
Construct a new instance of this class given the points and the color.

Parameters:
points - the points
color - the color

Polyline

public Polyline(Point[] points,
                org.eclipse.swt.graphics.RGB color,
                int lineWidth)
Construct a new instance of this class given the points, the color and the width of the line.

Parameters:
points - the points
color - the color
lineWidth - the width of the line in pixels

Polyline

public Polyline(Point[] points,
                org.eclipse.swt.graphics.RGB color,
                int lineWidth,
                double opacity)
Construct a new instance of this class given the points, the color , the width of the line and the opacity.

Parameters:
points - the points
color - the color
lineWidth - the width of the line in pixels
opacity - the opacity
Method Detail

dispose

public void dispose()
Removes this polyline form the map.


getColor

public org.eclipse.swt.graphics.RGB getColor()
Get the color.

Returns:
the color

getLineWidth

public int getLineWidth()
Get the width of the line.

Returns:
the width of the line

getOpacity

public double getOpacity()
Get the opacity.

Returns:
the opacity

getPoints

public Point[] getPoints()
Get the points.

Returns:
the points

getPointsList

public java.util.List<Point> getPointsList()
Get the inner points list.

Changes to this list are reflected immediately.

Returns:
the points

setColor

public void setColor(org.eclipse.swt.graphics.RGB color)
Set the color

Parameters:
color - the color

setLineWidth

public void setLineWidth(int lineWidth)
Set the width of the line

Parameters:
lineWidth - the width of the line

setOpacity

public void setOpacity(double opacity)
Set the opacity.

Parameters:
opacity - the opacity

setPoints

public void setPoints(Point[] points)
Set the points

Parameters:
points - the points