public class DefaultViewFactory.AbstractCurveView extends DefaultViewFactory.LeafElementView
Modifier and Type | Field and Description |
---|---|
protected Arrow |
arrow1 |
protected PicVector |
arrow1Dir |
protected PicPoint |
arrow1Loc |
protected Arrow |
arrow2 |
protected PicVector |
arrow2Dir |
protected PicPoint |
arrow2Loc |
protected java.awt.Stroke |
arrowStroke |
protected java.awt.Paint |
dotDrawPaint |
protected java.awt.Paint |
dotFillPaint |
protected java.awt.Shape |
dotShape |
protected java.awt.Stroke |
dotStroke |
protected boolean |
hasSegments |
protected boolean |
isDotFilled |
interiorPaint, lineWidth, outlinePaint, outlineStroke, overStrikeWidth, shadowBounds, shape
bounds, element, highlighter
BARBELL_SIZE, CLICK_DISTANCE
Constructor and Description |
---|
DefaultViewFactory.AbstractCurveView(AbstractCurve curve)
construct a new View for the given curve
|
Modifier and Type | Method and Description |
---|---|
void |
paint(java.awt.Graphics2D g,
java.awt.geom.Rectangle2D a)
Render the View to the given graphic context.
|
protected void |
syncAttributes()
Inherits from superclass, except where painting dots is concerned, where this method delegates
to
syncDotShape() to create the appropriate Shape. |
protected void |
syncDotShape()
Computes the Shape (centered at 0,0) used for drawing polygon's dots, built from the given attributes ;
set it to null if POLYDOTS_STYLE==NONE or if dotting is not supported by the factory.
|
protected void |
syncShape()
Synchronize the "shape" variable with the model.
|
changedUpdate, getViewFactory, hitTest, syncBounds
getBounds, getContainer, getDrawing, getElement, getGraphics, getHighlighter, getParentView, hitTest, paintHighlighter, repaint, setElement, setHighlighter
protected java.awt.Stroke arrowStroke
protected Arrow arrow1
protected Arrow arrow2
protected PicVector arrow1Dir
protected PicVector arrow2Dir
protected PicPoint arrow1Loc
protected PicPoint arrow2Loc
protected boolean hasSegments
protected java.awt.Shape dotShape
protected boolean isDotFilled
protected java.awt.Stroke dotStroke
protected java.awt.Paint dotFillPaint
protected java.awt.Paint dotDrawPaint
public DefaultViewFactory.AbstractCurveView(AbstractCurve curve)
protected void syncShape()
syncTangents
after having updated the shape
field. It is
up to subclasses to adapt their behaviour according to the underlying model, if only computing tangents
is different.syncShape
in class DefaultViewFactory.LeafElementView
protected void syncAttributes()
syncDotShape()
to create the appropriate Shape.syncAttributes
in class DefaultViewFactory.LeafElementView
protected void syncDotShape()
This method gets invoked by syncAttributes
as part of the delegation mechanism,
when style of dots has changed.
public void paint(java.awt.Graphics2D g, java.awt.geom.Rectangle2D a)
paint
in interface View
paint
in class DefaultViewFactory.LeafElementView
a
- the current graphic clipSubmit a bug : syd@jpicedt.org