|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ka2ddo.yaac.gui.drawlayer.AbstractDrawable
public abstract class AbstractDrawable
This class defines common attributes and methods for a drawable object in the DrawLayer.
Constructor Summary | |
---|---|
protected |
AbstractDrawable()
|
Method Summary | |
---|---|
abstract float |
distance(int x,
int y,
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,
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AbstractDrawable()
Method Detail |
---|
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, Projection proj)
g
- Graphics2D object for rendering the drawableproj
- Projection for translating geographic coordinates of the drawablepublic abstract float distance(int x, int y, Projection proj)
x
- int pixel X-coordinatey
- int pixel Y-coordinateproj
- Projection to translate drawable into screen space
protected java.lang.String paramString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |