http://www.jpicedt.org

jpicedt.graphic.view
Class DefaultViewFactory.AbstractCurveView

java.lang.Object
  extended byjpicedt.graphic.view.AbstractView
      extended byjpicedt.graphic.view.DefaultViewFactory.LeafElementView
          extended byjpicedt.graphic.view.DefaultViewFactory.AbstractCurveView
All Implemented Interfaces:
View, ViewConstants
Direct Known Subclasses:
EepicViewFactory.AbstractCurveView, LatexViewFactory.AbstractCurveView
Enclosing class:
DefaultViewFactory

public class DefaultViewFactory.AbstractCurveView
extends DefaultViewFactory.LeafElementView

a View for rendering any concrete implementation of jpicedt.graphic.model.AbstractCurve


Field Summary
protected  Arrow arrow1
           
protected  PicVector arrow1Dir
           
protected  PicPoint arrow1Loc
           
protected  Arrow arrow2
           
protected  PicVector arrow2Dir
           
protected  PicPoint arrow2Loc
           
protected  Stroke arrowStroke
           
protected  Paint dotDrawPaint
           
protected  Paint dotFillPaint
           
protected  Shape dotShape
           
protected  Stroke dotStroke
           
protected  boolean hasSegments
           
protected  boolean isDotFilled
           
 
Fields inherited from class jpicedt.graphic.view.DefaultViewFactory.LeafElementView
interiorPaint, lineWidth, outlinePaint, outlineStroke, overStrikeWidth, shadowBounds, shape
 
Fields inherited from class jpicedt.graphic.view.AbstractView
bounds, element, highlighter
 
Fields inherited from interface jpicedt.graphic.view.ViewConstants
BARBELL_SIZE, CLICK_DISTANCE
 
Constructor Summary
DefaultViewFactory.AbstractCurveView(AbstractCurve curve)
          construct a new View for the given curve
 
Method Summary
 void paint(Graphics2D g, 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.
 
Methods inherited from class jpicedt.graphic.view.DefaultViewFactory.LeafElementView
changedUpdate, getViewFactory, hitTest, syncBounds
 
Methods inherited from class jpicedt.graphic.view.AbstractView
getBounds, getContainer, getDrawing, getElement, getGraphics, getHighlighter, getParentView, hitTest, paintHighlighter, repaint, setElement, setHighlighter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

arrowStroke

protected Stroke arrowStroke

arrow1

protected Arrow arrow1

arrow2

protected Arrow arrow2

arrow1Dir

protected PicVector arrow1Dir

arrow2Dir

protected PicVector arrow2Dir

arrow1Loc

protected PicPoint arrow1Loc

arrow2Loc

protected PicPoint arrow2Loc

hasSegments

protected boolean hasSegments

dotShape

protected Shape dotShape

isDotFilled

protected boolean isDotFilled

dotStroke

protected Stroke dotStroke

dotFillPaint

protected Paint dotFillPaint

dotDrawPaint

protected Paint dotDrawPaint
Constructor Detail

DefaultViewFactory.AbstractCurveView

public DefaultViewFactory.AbstractCurveView(AbstractCurve curve)
construct a new View for the given curve

Method Detail

syncShape

protected void syncShape()
Synchronize the "shape" variable with the model. To reduce the burden for subclasses, this method calls 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.

Overrides:
syncShape in class DefaultViewFactory.LeafElementView

syncAttributes

protected void syncAttributes()
Inherits from superclass, except where painting dots is concerned, where this method delegates to syncDotShape() to create the appropriate Shape.

Overrides:
syncAttributes in class DefaultViewFactory.LeafElementView

syncDotShape

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.

This method gets invoked by syncAttributes as part of the delegation mechanism, when style of dots has changed.


paint

public void paint(Graphics2D g,
                  Rectangle2D a)
Render the View to the given graphic context.

Specified by:
paint in interface View
Overrides:
paint in class DefaultViewFactory.LeafElementView
Parameters:
a - the current graphic clip

http://www.jpicedt.org

Submit a bug : syd@jpicedt.org