Package jpicedt.graphic.view
Class DefaultViewFactory.PicNodeConnectionView
- java.lang.Object
-
- jpicedt.graphic.view.AbstractView
-
- jpicedt.graphic.view.DefaultViewFactory.LeafElementView
-
- jpicedt.graphic.view.DefaultViewFactory.PicNodeConnectionView
-
- All Implemented Interfaces:
View,ViewConstants
- Enclosing class:
- DefaultViewFactory
public class DefaultViewFactory.PicNodeConnectionView extends DefaultViewFactory.LeafElementView
a View for rendering any concrete implementation of jpicedt.graphic.model.PicNodeConnection This view is responsible for painting the edge only! Nodes are rendered with their own view (provided they were added to the drawing at some early point...)
-
-
Field Summary
Fields Modifier and Type Field Description protected Arrowarrow1protected PicVectorarrow1Dirprotected PicPointarrow1Locprotected Arrowarrow2protected PicVectorarrow2Dirprotected PicPointarrow2Locprotected java.awt.StrokearrowStroke-
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
Constructors Constructor Description PicNodeConnectionView(PicNodeConnection edge)construct a new View for the given node connection
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidpaint(java.awt.Graphics2D g, java.awt.geom.Rectangle2D a)Render the View to the given graphic context.protected voidsyncShape()Synchronize the "shape" variable with the model.-
Methods inherited from class jpicedt.graphic.view.DefaultViewFactory.LeafElementView
changedUpdate, getViewFactory, hitTest, syncAttributes, syncBounds
-
Methods inherited from class jpicedt.graphic.view.AbstractView
getBounds, getContainer, getDrawing, getElement, getGraphics, getHighlighter, getParentView, hitTest, paintHighlighter, repaint, setElement, setHighlighter
-
-
-
-
Constructor Detail
-
PicNodeConnectionView
public PicNodeConnectionView(PicNodeConnection edge)
construct a new View for the given node connection
-
-
Method Detail
-
syncShape
protected void syncShape()
Synchronize the "shape" variable with the model. To reduce the burden for subclasses, this method callssyncTangentsafter having updated theshapefield. It is up to subclasses to adapt their behaviour according to the underlying model, if only computing tangents is different.- Overrides:
syncShapein classDefaultViewFactory.LeafElementView
-
paint
public void paint(java.awt.Graphics2D g, java.awt.geom.Rectangle2D a)Render the View to the given graphic context.- Specified by:
paintin interfaceView- Overrides:
paintin classDefaultViewFactory.LeafElementViewa- the current graphic clip
-
-