public abstract class AbstractDrawable
extends java.lang.Object
implements java.io.Serializable
Modifier | Constructor and Description |
---|---|
protected |
AbstractDrawable()
Create an AbstractDrawable.
|
Modifier and Type | Method and Description |
---|---|
abstract float |
distance(int x,
int y,
com.bbn.openmap.proj.Projection proj)
This computes the nearest distance from this drawable to the specified pixel coordinates.
|
java.awt.Color |
getLineColor()
Get the color for rendering lines in this drawable.
|
java.lang.String |
getName()
Get the name associated with this object (usually used for tooltips).
|
java.awt.BasicStroke |
getStroke()
Get the Stroke used to draw lines in this drawable.
|
java.lang.String |
getStrokeType()
Get the name of the generic stroke type in this drawable.
|
abstract void |
paintDrawable(java.awt.Graphics2D g,
com.bbn.openmap.proj.Projection proj)
Render this drawable upon a canvas using the specified Graphics and Projection.
|
protected java.lang.String |
paramString()
Return description of this object for including in a toString() method's answer.
|
void |
setLineColor(java.awt.Color lineColor)
Set the color for rendering lines in this drawable.
|
void |
setName(java.lang.String name)
Set the name associated with this object (usually used for tooltips).
|
void |
setStroke(java.awt.BasicStroke stroke,
java.lang.String strokeType)
Set the Stroke used to draw lines in this drawable.
|
protected AbstractDrawable()
public java.awt.Color getLineColor()
public void setLineColor(java.awt.Color lineColor)
lineColor
- Color for rendering this objectpublic java.lang.String getName()
public void setName(java.lang.String name)
name
- String name for this drawablepublic java.awt.BasicStroke getStroke()
public java.lang.String getStrokeType()
public void setStroke(java.awt.BasicStroke stroke, java.lang.String strokeType)
stroke
- BasicStroke for this drawablestrokeType
- name of this kind of stroke, regardless of scalingpublic abstract void paintDrawable(java.awt.Graphics2D g, com.bbn.openmap.proj.Projection proj)
g
- Graphics2D object for rendering the drawableproj
- Projection for translating geographic coordinates of the drawablepublic abstract float distance(int x, int y, com.bbn.openmap.proj.Projection proj)
x
- int pixel X-coordinatey
- int pixel Y-coordinateproj
- Projection to translate drawable into screen spaceprotected java.lang.String paramString()