com.nutiteq.components
Class Line

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

public class Line
extends java.lang.Object
implements OnMapElement

Line object to be displayed on map


Constructor Summary
Line(WgsPoint[] points)
          Constructor for line object with default style
Line(WgsPoint[] points, boolean serverSideRender)
           
Line(WgsPoint[] points, LineStyle style)
          Constructor for line with user defined style
Line(WgsPoint[] points, LineStyle style, boolean serverSideRender)
           
Line(WgsPoint[] points, LineStyle style, Label label)
           
Line(WgsPoint[] points, LineStyle style, Label label, boolean serverSideRender)
           
 
Method Summary
 void calculatePosition(GeoMap displayedMap, int zoomLevel)
          Not part of public API.
 int distanceInPixels(MapPos cursorOnMap)
           
 Label getLabel()
           
 LineStyle getLineStyle()
          Not part of public API.
 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(LineStyle lineStyle)
          Set line style.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Line

public Line(WgsPoint[] points)
Constructor for line object with default style

Parameters:
points - points in line (in WGS84)

Line

public Line(WgsPoint[] points,
            boolean serverSideRender)

Line

public Line(WgsPoint[] points,
            LineStyle style)
Constructor for line with user defined style

Parameters:
points - points in line (in WGS84)
style - line style

Line

public Line(WgsPoint[] points,
            LineStyle style,
            Label label)

Line

public Line(WgsPoint[] points,
            LineStyle style,
            boolean serverSideRender)

Line

public Line(WgsPoint[] points,
            LineStyle 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)
Not part of public API. Removed by obfuscator

Specified by:
calculatePosition in interface OnMapElement

setStyle

public void setStyle(LineStyle lineStyle)
Set line style.


getPoints

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

getLineStyle

public LineStyle getLineStyle()
Not part of public API. Removed by obfuscator


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