us.zuercher.gpx2map.plotter
Interface MarkerStyle

All Known Implementing Classes:
ImageMarkerStyle, Style

public interface MarkerStyle

All markers, include Styles must implement this interface.

Author:
Stephan Zuercher

Method Summary
 int getHeight()
          Return the marker style's height.
 String getName()
          Returns the marker style's name.
 AbstractShape getShape(Point center, int radius, Color color)
          Returns an AbstractShape that renders this marker style with the given location, size and color.
 int getWidth()
          Return the marker style's width.
 boolean hasConstantDimensions()
          Tests whether this marker style has a constant height and width.
 

Method Detail

getName

String getName()
Returns the marker style's name.

Returns:
the marker style's name.

getShape

AbstractShape getShape(Point center,
                       int radius,
                       Color color)
Returns an AbstractShape that renders this marker style with the given location, size and color. Note that if this MarkerStyle returns true from hasConstantDimensions(), the radius/size parameter of this call will be ignored.

Parameters:
center - center point of the marker shape
radius - size of the marker shape (see above)
color - marker color
Returns:
an AbstractShape that renders the marker
See Also:
hasConstantDimensions()

hasConstantDimensions

boolean hasConstantDimensions()
Tests whether this marker style has a constant height and width. If not, the user must specify the marker style's rendering size when calling getShape(Point, int, Color).

Returns:
true if this marker style is fixed in size, false otherwise.
See Also:
getHeight(), getWidth()

getHeight

int getHeight()
Return the marker style's height. Calls to this method only yield useful information if hasConstantDimensions() returns true.

Returns:
the marker style's height.
See Also:
hasConstantDimensions()

getWidth

int getWidth()
Return the marker style's width. Calls to this method only yield useful information if hasConstantDimensions() returns true.

Returns:
the marker style's width.
See Also:
hasConstantDimensions()