|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.draw2d.Figure
org.eclipse.draw2d.Shape
de.cau.cs.kieler.karma.SwitchableFigure
public class SwitchableFigure
Class for encapsulating the actual drawn figure to avoid inheritance problems. Also has some additional methods for example changing resizeability.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.eclipse.draw2d.Figure |
---|
Figure.FigureIterator, Figure.IdentitySearch |
Nested classes/interfaces inherited from interface org.eclipse.draw2d.IFigure |
---|
IFigure.NoInsets |
Field Summary | |
---|---|
protected IFigure |
currentFigure
The figure that will actually be displayed. |
Fields inherited from class org.eclipse.draw2d.Shape |
---|
lineStyle, lineWidth |
Fields inherited from class org.eclipse.draw2d.Figure |
---|
bgColor, border, bounds, fgColor, flags, font, MAX_FLAG, maxSize, minSize, NO_MANAGER, prefSize, toolTip |
Fields inherited from interface org.eclipse.draw2d.IFigure |
---|
MAX_DIMENSION, MIN_DIMENSION, NO_INSETS |
Constructor Summary | |
---|---|
SwitchableFigure()
The constructor. |
Method Summary | |
---|---|
protected void |
fillShape(Graphics graphics)
|
IFigure |
getCurrentFigure()
Getter for the currently displayed figure. |
float[] |
getLineDash()
|
int |
getLineStyle()
|
int |
getLineWidth()
|
float |
getLineWidthFloat()
|
boolean |
getResizeable()
check if the figure may be be resized. |
protected void |
outlineShape(Graphics graphics)
|
void |
paint(Graphics graphics)
|
void |
setBackgroundColor(Color bg)
|
void |
setBounds(Rectangle rect)
|
void |
setBoundsDirect(Rectangle rect)
Directly set the bounds of this figure, without further checks. |
void |
setCurrentFigure(IFigure figure)
Setter for the currently displayed figure. |
void |
setFill(boolean fill)
|
void |
setForegroundColor(Color fg)
|
void |
setLineDash(float[] dash)
|
void |
setLineStyle(int style)
|
void |
setLineWidth(int w)
|
void |
setLineWidthFloat(float value)
|
void |
setMaximumSize(Dimension d)
|
void |
setMinimumSize(Dimension d)
|
void |
setPreferredSize(Dimension d)
|
void |
setResizeable(Boolean b)
set the figure to be resizeable or not. |
void |
setSize(int w,
int h)
|
Methods inherited from class org.eclipse.draw2d.Shape |
---|
getAlpha, getAntialias, getLineAttributes, getLineCap, getLineDashOffset, getLineJoin, getLineMiterLimit, paintFigure, setAlpha, setAlpha, setAntialias, setAntialias, setFillXOR, setLineAttributes, setLineCap, setLineDashOffset, setLineJoin, setLineMiterLimit, setOutline, setOutlineXOR, setXOR |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected IFigure currentFigure
Constructor Detail |
---|
public SwitchableFigure()
Method Detail |
---|
public void paint(Graphics graphics)
paint
in interface IFigure
paint
in class Figure
public IFigure getCurrentFigure()
public void setCurrentFigure(IFigure figure)
figure
- new figure to be displayedpublic void setForegroundColor(Color fg)
setForegroundColor
in interface IFigure
setForegroundColor
in class Figure
public void setBackgroundColor(Color bg)
setBackgroundColor
in interface IFigure
setBackgroundColor
in class Figure
public void setBounds(Rectangle rect)
setBounds
in interface IFigure
setBounds
in class Figure
public void setBoundsDirect(Rectangle rect)
rect
- the new boundspublic void setMinimumSize(Dimension d)
setMinimumSize
in interface IFigure
setMinimumSize
in class Figure
public void setMaximumSize(Dimension d)
setMaximumSize
in interface IFigure
setMaximumSize
in class Figure
public void setSize(int w, int h)
setSize
in interface IFigure
setSize
in class Figure
public void setPreferredSize(Dimension d)
setPreferredSize
in interface IFigure
setPreferredSize
in class Figure
protected void fillShape(Graphics graphics)
fillShape
in class Shape
protected void outlineShape(Graphics graphics)
outlineShape
in class Shape
public void setLineWidth(int w)
setLineWidth
in class Shape
public int getLineWidth()
getLineWidth
in class Shape
public void setLineWidthFloat(float value)
setLineWidthFloat
in class Shape
public float getLineWidthFloat()
getLineWidthFloat
in class Shape
public void setLineStyle(int style)
setLineStyle
in class Shape
public int getLineStyle()
getLineStyle
in class Shape
public void setLineDash(float[] dash)
setLineDash
in class Shape
public float[] getLineDash()
getLineDash
in class Shape
public boolean getResizeable()
public void setResizeable(Boolean b)
b
- false for not resizeablepublic void setFill(boolean fill)
setFill
in class Shape
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |