uk.ac.starlink.diva
Class DrawPolylineFigure

java.lang.Object
  extended by diva.canvas.AbstractFigure
      extended by diva.canvas.toolbox.PathFigure
          extended by uk.ac.starlink.diva.DrawPathFigure
              extended by uk.ac.starlink.diva.DrawPolylineFigure
All Implemented Interfaces:
CanvasComponent, Figure, ShapedFigure, VisibleComponent, UserObjectContainer, DrawFigure

public class DrawPolylineFigure
extends DrawPathFigure

A figure that displays a polyline that can have its vertices moved.

Version:
$Id$
Author:
Peter W. Draper
See Also:
DrawBasicFigure

Field Summary
protected  Polyline2D.Double polyline
          The Polyline that we're using.
 
Fields inherited from class uk.ac.starlink.diva.DrawPathFigure
listeners, transformFreely
 
Constructor Summary
DrawPolylineFigure(double x, double y, Paint fill)
          Create a new polyline with the given origin and colour.
DrawPolylineFigure(double x, double y, Paint fill, float lineWidth, AlphaComposite composite)
          Create a new polyline with the given origin, colour and linewidth.
DrawPolylineFigure(Polyline2D poly)
          Create a new polyline using the given polyline shape.
DrawPolylineFigure(Polyline2D poly, Paint fill, float lineWidth, AlphaComposite composite)
          Create a new polyline using the given polyline shape, colour and linewidth.
 
Method Summary
 Polyline2D.Double createPolyline(double x, double y)
          Create a polyline and position it at the origin.
 
Methods inherited from class uk.ac.starlink.diva.DrawPathFigure
addListener, fireChanged, fireCreated, fireRemoved, getFillPaint, isTransformFreely, removeListener, setFillPaint, setTransformFreely, setVisible, transform, translate
 
Methods inherited from class diva.canvas.toolbox.PathFigure
getBounds, getComposite, getDashArray, getLineWidth, getShape, getStroke, getStrokePaint, hit, paint, setComposite, setDashArray, setLineWidth, setShape, setStroke, setStrokePaint
 
Methods inherited from class diva.canvas.AbstractFigure
contains, getInteractor, getLayer, getOrigin, getParent, getToolTipText, getTransformContext, getUserObject, intersects, isVisible, paint, repaint, repaint, setInteractor, setParent, setToolTipText, setUserObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface uk.ac.starlink.diva.DrawFigure
getComposite, getLineWidth, getStrokePaint, setComposite, setLineWidth, setShape, setStrokePaint
 
Methods inherited from interface diva.canvas.Figure
contains, getBounds, getInteractor, getLayer, getOrigin, getParent, getShape, getToolTipText, hit, intersects, setInteractor, setParent, setToolTipText
 
Methods inherited from interface diva.canvas.VisibleComponent
isVisible, paint, paint
 
Methods inherited from interface diva.canvas.CanvasComponent
getTransformContext, repaint, repaint
 
Methods inherited from interface diva.util.UserObjectContainer
getUserObject, setUserObject
 

Field Detail

polyline

protected Polyline2D.Double polyline
The Polyline that we're using.

Constructor Detail

DrawPolylineFigure

public DrawPolylineFigure(Polyline2D poly)
Create a new polyline using the given polyline shape. This has unit-width continuous stroke and no paint pattern.


DrawPolylineFigure

public DrawPolylineFigure(Polyline2D poly,
                          Paint fill,
                          float lineWidth,
                          AlphaComposite composite)
Create a new polyline using the given polyline shape, colour and linewidth.


DrawPolylineFigure

public DrawPolylineFigure(double x,
                          double y,
                          Paint fill)
Create a new polyline with the given origin and colour.


DrawPolylineFigure

public DrawPolylineFigure(double x,
                          double y,
                          Paint fill,
                          float lineWidth,
                          AlphaComposite composite)
Create a new polyline with the given origin, colour and linewidth.

Method Detail

createPolyline

public Polyline2D.Double createPolyline(double x,
                                        double y)
Create a polyline and position it at the origin.



Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.