g2d.plot
Class Spline
java.lang.Object
g2d.glyph.Identifiable
g2d.glyph.Attributable
g2d.glyph.Glyphish
g2d.glyph.GlyphList
g2d.plot.Spline
- All Implemented Interfaces:
- KeyListener, MouseListener, MouseMotionListener, EventListener
public class Spline
- extends GlyphList
Edges are defined by their source and sink given as java.awt.geom.Point2D.
These two points are given at object construction time and must be
non-null.
An axis manifests itself as a simple spline
- Since:
- September 2008
- Author:
- Ian
| Methods inherited from class g2d.glyph.GlyphList |
add, add, clear, contains, getBounds, getGlyphThing, getListIterator, inside, intersects, length, paint, remove, transform |
| Methods inherited from class g2d.glyph.Glyphish |
keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, paint, rotate, rotate, scale, setKeyAction, setMouseAction, shear, translate, unsetMouseAction |
| Methods inherited from class g2d.glyph.Attributable |
_getAttribute, _setAttribute, getAttribute, getAttributeAsBoolean, getAttributeAsByte, getAttributeAsChar, getAttributeAsDouble, getAttributeAsFloat, getAttributeAsInt, getAttributeAsShort, getAttributeAsString, getKeys, getStaticAttribute, getStaticKeys, isAttribute, isStaticAttribute, removeAllAttributes, removeAllStaticAttributes, removeAttribute, removeStaticAttribute, setAttribute, setStaticAttribute, showAttributes |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Spline
public Spline(Point2D p1,
Point2D p2)
setCoordinates
public void setCoordinates(Point2D[] coordinates)
- Update the curve segments of this spline using the
given array of points. Assumes that array of points
has a length 3n+1 and each segment is a cubic curve
(Bezier) defined by 4 consecutive points. The end point
of one cubic curve is the starting point of the next one.
If using DOT layout, these are all points without "s," or
"e," attributes in the list pos="..."
- Parameters:
coordinates - Array of Point2D's defining curve
getStyle
public String getStyle()
setStyle
public void setStyle(String style)
getStrokeWidth
public float getStrokeWidth()
setStrokeWidth
public void setStrokeWidth(float strokeWidth)
getColor
public Color getColor()
- Obtain current color of edge.
- Returns:
- Color of edge
- See Also:
setColor(java.awt.Color)
setColor
public void setColor(Color c)
- Set color of edge to given value.
Note, to have change take effect visually need to
issue repainting of container.
- Parameters:
c - Color used for edge- See Also:
getColor()