|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ascape.util.vis.DrawFeature
public abstract class DrawFeature
An class providing a drawing method for a given object. Special Note: We have moved this clas temporarily to .model to fix a dependency issue. This will be adressed in a better way soon. A DrawFeature is just some interpretation of an object's state as a paintable figure. Provides the abstract capability to nest features. At the moment, this is really only used to provide a way to set a color and draw a feature with the same draw sources, and is intended to support user customization. This will be fleshed out in the future as user customization becomes more important, but isn't a very important feature at the moment. For now, you would typically just set a color and draw a figure within the same draw feature.
Field Summary | |
---|---|
protected java.lang.String |
name
The user mnemonic name for this feature. |
protected DrawFeature |
nestedFeature
A nested feature. |
Constructor Summary | |
---|---|
DrawFeature()
Constructs the feature. |
|
DrawFeature(DrawFeature nestedFeature)
Constructs the feature with a nested feature. |
|
DrawFeature(java.lang.String name)
Constructs the feature with the provided name. |
|
DrawFeature(java.lang.String name,
DrawFeature nestedFeature)
Constructs the feature with a name and nested feature. |
Method Summary | |
---|---|
abstract void |
draw(java.awt.Graphics g,
java.lang.Object object,
int width,
int height)
Draws a graphic interpretation of the object into the supplied graphics port, (typically) within the supplied dimensions. |
java.lang.String |
getName()
Returns the user relevant name of this feature. |
DrawFeature |
getNestedFeature()
Returns the feature nested inside this one. |
void |
setName(java.lang.String name)
Sets the user relevant name for this feature. |
void |
setNestedFeature(DrawFeature nestedFeature)
Sets the feature nested inside of this one. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected DrawFeature nestedFeature
protected java.lang.String name
Constructor Detail |
---|
public DrawFeature()
public DrawFeature(java.lang.String name)
name
- a name for this draw featurepublic DrawFeature(java.lang.String name, DrawFeature nestedFeature)
name
- a name for this draw featurenestedFeature
- the feature to nest within this featurepublic DrawFeature(DrawFeature nestedFeature)
nestedFeature
- the feature to nest within this featureMethod Detail |
---|
public DrawFeature getNestedFeature()
public void setNestedFeature(DrawFeature nestedFeature)
nestedFeature
- the feature to nestpublic abstract void draw(java.awt.Graphics g, java.lang.Object object, int width, int height)
g
- the Graphics context to draw intoobject
- the object to interpret for drawingwidth
- the width of the space that should be drawn intoheight
- the height of the space that should be drawn intopublic java.lang.String getName()
getName
in interface HasName
public void setName(java.lang.String name)
getName
method, since you will be creating a subclass anyway.)
name
- the user
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |