com.nutiteq.components
Class Polygon

java.lang.Object
  extended by com.nutiteq.components.Polygon
All Implemented Interfaces:
OnMapElement

public class Polygon
extends java.lang.Object
implements OnMapElement

A generic polygon object. At the moment only available in blue.


Constructor Summary
Polygon(WgsPoint[] coordinates)
           
Polygon(WgsPoint[] coordinates, boolean serverSideRender)
           
Polygon(WgsPoint[] coordinates, PolyStyle style)
           
Polygon(WgsPoint[] coordinates, PolyStyle style, boolean serverSideRender)
           
Polygon(WgsPoint[] coordinates, PolyStyle style, Label label)
           
Polygon(WgsPoint[] coordinates, PolyStyle style, Label label, boolean serverSideRender)
           
 
Method Summary
 void calculatePosition(GeoMap displayedMap, int zoomLevel)
           
 int distanceInPixels(MapPos cursorOnMap)
           
 Label getLabel()
           
 WgsPoint[] getPoints()
           
 boolean isCentered(MapPos cursorPoint)
           
 boolean isVisible(int viewX, int viewY, int viewWidth, int viewHeight, int zoom)
           
 void paint(Graphics g, MapPos middlePoint, int displayCenterX, int displayCenterY, Rectangle changedMapArea)
           
 void setStyle(PolyStyle style)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Polygon

public Polygon(WgsPoint[] coordinates)

Polygon

public Polygon(WgsPoint[] coordinates,
               PolyStyle style)

Polygon

public Polygon(WgsPoint[] coordinates,
               PolyStyle style,
               Label label)

Polygon

public Polygon(WgsPoint[] coordinates,
               boolean serverSideRender)

Polygon

public Polygon(WgsPoint[] coordinates,
               PolyStyle style,
               boolean serverSideRender)

Polygon

public Polygon(WgsPoint[] coordinates,
               PolyStyle style,
               Label label,
               boolean serverSideRender)
Method Detail

isVisible

public boolean isVisible(int viewX,
                         int viewY,
                         int viewWidth,
                         int viewHeight,
                         int zoom)
Specified by:
isVisible in interface OnMapElement

paint

public void paint(Graphics g,
                  MapPos middlePoint,
                  int displayCenterX,
                  int displayCenterY,
                  Rectangle changedMapArea)
Specified by:
paint in interface OnMapElement

calculatePosition

public void calculatePosition(GeoMap displayedMap,
                              int zoomLevel)
Specified by:
calculatePosition in interface OnMapElement

isCentered

public boolean isCentered(MapPos cursorPoint)
Specified by:
isCentered in interface OnMapElement

distanceInPixels

public int distanceInPixels(MapPos cursorOnMap)
Specified by:
distanceInPixels in interface OnMapElement

getLabel

public Label getLabel()
Specified by:
getLabel in interface OnMapElement

getPoints

public WgsPoint[] getPoints()
Specified by:
getPoints in interface OnMapElement

setStyle

public void setStyle(PolyStyle style)