|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.canvas.AbstractFigure
diva.canvas.toolbox.LabelFigure
uk.ac.starlink.diva.DrawLabelFigure
public class DrawLabelFigure
Implementation of a LabelFigure for use with a Draw
implementation.
Field Summary | |
---|---|
protected EventListenerList |
listeners
|
protected static boolean |
transformFreely
Hint that figures should ignore any transformation constraints |
Constructor Summary | |
---|---|
DrawLabelFigure()
|
|
DrawLabelFigure(String s)
|
|
DrawLabelFigure(String s,
Font f)
|
|
DrawLabelFigure(String s,
Font font,
double padding,
int anchor)
|
|
DrawLabelFigure(String s,
String face,
int style,
int size)
|
Method Summary | |
---|---|
void |
addListener(FigureListener l)
Registers a listener for to be informed when figure changes occur. |
protected void |
fireChanged()
Send a FigureChangedEvent object specifying that this figure has changed. |
protected void |
fireCreated()
Send a FigureChangedEvent object specifying that this figure has created to all listeners. |
protected void |
fireRemoved()
Send a FigureChangedEvent object specifying that this figure has been removed. |
float |
getLineWidth()
Get the line width. |
Paint |
getStrokePaint()
Get the outline. |
static boolean |
isTransformFreely()
Find out if this is an occasion when a figure should give up any constraints and transform freely. |
void |
removeListener(FigureListener l)
Remove a listener. |
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 |
transform(AffineTransform at)
Transform the label with the given transform. |
void |
translate(double x,
double y)
Move the figure the indicated distance. |
Methods inherited from class diva.canvas.toolbox.LabelFigure |
---|
autoAnchor, getAnchor, getAnchorPoint, getBounds, getComposite, getFillPaint, getFont, getOrigin, getPadding, getShape, getString, paint, setAnchor, setComposite, setFillPaint, setFont, setPadding, setString, translateTo, translateTo |
Methods inherited from class diva.canvas.AbstractFigure |
---|
contains, getInteractor, getLayer, getParent, getToolTipText, getTransformContext, getUserObject, hit, intersects, isVisible, paint, repaint, repaint, setInteractor, setParent, setToolTipText, setUserObject, setVisible |
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, getFillPaint, setComposite, setFillPaint, setVisible |
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 |
---|
protected static boolean transformFreely
protected EventListenerList listeners
Constructor Detail |
---|
public DrawLabelFigure()
public DrawLabelFigure(String s)
public DrawLabelFigure(String s, String face, int style, int size)
public DrawLabelFigure(String s, Font f)
public DrawLabelFigure(String s, Font font, double padding, int anchor)
Method Detail |
---|
public void transform(AffineTransform at)
LabelFigure
transform
in interface Figure
transform
in class LabelFigure
public void translate(double x, double y)
AbstractFigure
translate
in interface Figure
translate
in class AbstractFigure
public void setShape(Shape shape)
DrawFigure
setShape
in interface DrawFigure
public void setLineWidth(float lineWidth)
DrawFigure
setLineWidth
in interface DrawFigure
public float getLineWidth()
DrawFigure
getLineWidth
in interface DrawFigure
public void setStrokePaint(Paint outline)
DrawFigure
setStrokePaint
in interface DrawFigure
public Paint getStrokePaint()
DrawFigure
getStrokePaint
in interface DrawFigure
public void setTransformFreely(boolean state)
DrawFigure
Draw
, given their normal constraints,
e.g. XRangeFigure).
setTransformFreely
in interface DrawFigure
public static boolean isTransformFreely()
public void addListener(FigureListener l)
addListener
in interface DrawFigure
l
- the FigureListenerpublic void removeListener(FigureListener l)
removeListener
in interface DrawFigure
l
- the FigureListenerprotected void fireCreated()
protected void fireRemoved()
protected void fireChanged()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |