|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.knime.base.node.viz.plotter.basic.BasicDrawingElement
public abstract class BasicDrawingElement
A drawing element consists of points which are already mapped to the
drawing pane's dimension. The BasicDrawingElements can be added
to the BasicPlotter with
#addBasicDrawingElement(BasicDrawingElement). The
BasicDrawingElements should be used if only the domain data of
the shape is available, since they are automatically mapped to the drawing
pane's dimension. There some ready-to-use implementations of the
BasicDrawingElement:
BasicLine,
BasicEllipse,
BasicRectangle,
BasicText.
Each of these implementations restore the original stroke and color of the
graphics object. New implementations should keep this behavior.
| Constructor Summary | |
|---|---|
BasicDrawingElement()
Creates an empty shape with default color(black) and default stroke. |
|
| Method Summary | |
|---|---|
void |
addDomainValue(DataCellPoint domainValue)
Adds a domain value to the set of domain values that are mapped to the DrawingPane's dimension. |
void |
addPoint(Point p)
Adds a (mapped) point of the path. |
Color |
getColor()
|
List<DataCellPoint> |
getDomainValues()
|
List<Point> |
getPoints()
|
Stroke |
getStroke()
|
abstract void |
paint(Graphics2D g2)
The method which "knows" how to paint it. |
void |
setColor(Color color)
|
void |
setDomainValues(DataCellPoint... points)
Adds a list of domain values that should be in same order as referring mapped points. |
void |
setDomainValues(List<DataCellPoint> domainValues)
Adds a list of domain values that should be in same order as referring mapped points. |
void |
setPoints(List<Point> points)
Sets the mapped points. |
void |
setPoints(Point... points)
Sets the mapped points. |
void |
setStroke(Stroke stroke)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BasicDrawingElement()
| Method Detail |
|---|
public void addPoint(Point p)
BasicPlotter.updateSize()
only.
p - one point of the pathpublic void addDomainValue(DataCellPoint domainValue)
domainValue - the domain valuepublic void setDomainValues(List<DataCellPoint> domainValues)
domainValues - the domain valuespublic void setDomainValues(DataCellPoint... points)
points - domain pointspublic List<DataCellPoint> getDomainValues()
public void setPoints(List<Point> points)
BasicPlotter only.
points - the mapped points making up this drawing elementpublic void setPoints(Point... points)
BasicPlotter only.
points - mapped pointspublic List<Point> getPoints()
public Color getColor()
public void setColor(Color color)
color - the color of this elementpublic void setStroke(Stroke stroke)
stroke - the stroke of this elementpublic Stroke getStroke()
public abstract void paint(Graphics2D g2)
g2 - the graphics object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||