uk.ac.starlink.diva
Interface DrawFigure

All Superinterfaces:
CanvasComponent, Figure, UserObjectContainer, VisibleComponent
All Known Implementing Classes:
DrawBasicFigure, DrawCompositeFigure, DrawEllipseFigure, DrawFreehandFigure, DrawLabelFigure, DrawLineFigure, DrawPathFigure, DrawPolygonFigure, DrawPolylineFigure, DrawRectangleFigure, InterpolatedCurveFigure, XRangeFigure

public interface DrawFigure
extends Figure

DrawFigure defines an interface that any Figures drawn on a Draw implementation should implement. See DrawBasicFigure and DrawPathFigure for concrete implementations of this interface.

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

Method Summary
 void addListener(FigureListener l)
          Registers a listener for to be informed when figure changes occur.
 Composite getComposite()
          Get the composite (null for unset).
 Paint getFillPaint()
          Get the fill.
 float getLineWidth()
          Get the line width.
 Paint getStrokePaint()
          Get the outline.
 void removeListener(FigureListener l)
          Remove a listener.
 void setComposite(AlphaComposite composite)
          All Figures have composite fills/colours.
 void setFillPaint(Paint fill)
          All Figures can be potentially filled.
 void setLineWidth(float lineWidth)
          All Figures have a line width.
 void setShape(Shape shape)
          Set the Figure shape.
 void setStrokePaint(Paint outline)
          All Figures have an outline colour.
 void setTransformFreely(boolean state)
          Enable the hint that a figure should allow itself to transform freely, rather than obey any constraints (this is meant for figures that could not otherwise redraw themselves to fit a resized Draw, given their normal constraints, e.g.
 void setVisible(boolean flag)
          Set the visibility.
 
Methods inherited from interface diva.canvas.Figure
contains, getBounds, getInteractor, getLayer, getOrigin, getParent, getShape, getToolTipText, hit, intersects, setInteractor, setParent, setToolTipText, transform, translate
 
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
 

Method Detail

setShape

void setShape(Shape shape)
Set the Figure shape.


setVisible

void setVisible(boolean flag)
Set the visibility. Needs re-implementing to also remove any decorators.

Specified by:
setVisible in interface VisibleComponent

setFillPaint

void setFillPaint(Paint fill)
All Figures can be potentially filled. Ignored for non-filled figures.


getFillPaint

Paint getFillPaint()
Get the fill.


setComposite

void setComposite(AlphaComposite composite)
All Figures have composite fills/colours.


getComposite

Composite getComposite()
Get the composite (null for unset).


setLineWidth

void setLineWidth(float lineWidth)
All Figures have a line width.


getLineWidth

float getLineWidth()
Get the line width.


setStrokePaint

void setStrokePaint(Paint outline)
All Figures have an outline colour.


getStrokePaint

Paint getStrokePaint()
Get the outline.


setTransformFreely

void setTransformFreely(boolean state)
Enable the hint that a figure should allow itself to transform freely, rather than obey any constraints (this is meant for figures that could not otherwise redraw themselves to fit a resized Draw, given their normal constraints, e.g. XRangeFigure).


addListener

void addListener(FigureListener l)
Registers a listener for to be informed when figure changes occur.

Parameters:
l - the FigureListener

removeListener

void removeListener(FigureListener l)
Remove a listener.

Parameters:
l - the FigureListener


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