|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object extended bydiva.canvas.AbstractFigure extended bydiva.canvas.toolbox.SwingWrapper
A figure that embeds swing components in canvas drawings.
| Constructor Summary | |
SwingWrapper(javax.swing.JComponent c)
Construct a new swing wrapper instance to wrap the given component. |
|
| Method Summary | |
java.awt.geom.Rectangle2D |
getBounds()
Get the bounding box of this figure. |
javax.swing.JComponent |
getComponent()
Return the component that this is wrapping. |
java.awt.Shape |
getShape()
Get the shape of this figure. |
void |
paint(java.awt.Graphics2D g)
Ask the wrapped component to paint itself. |
void |
setComponent(javax.swing.JComponent c)
Replace the currently wrapped component with the given component and reshape/repaint the figure. |
void |
setParent(CanvasComponent fc)
Set the parent of this figure. |
void |
transform(java.awt.geom.AffineTransform at)
Transform the figure with the supplied transform. |
void |
translate(double x,
double y)
Translate the figure by the given distance. |
| Methods inherited from class diva.canvas.AbstractFigure |
contains, getInteractor, getLayer, getOrigin, getParent, getToolTipText, getTransformContext, getUserObject, hit, intersects, isVisible, paint, repaint, repaint, setInteractor, setToolTipText, setUserObject, setVisible |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SwingWrapper(javax.swing.JComponent c)
| Method Detail |
public java.awt.geom.Rectangle2D getBounds()
getBounds in interface FiguregetBounds in class AbstractFigurepublic javax.swing.JComponent getComponent()
public java.awt.Shape getShape()
getShape in interface FiguregetShape in class AbstractFigurepublic void paint(java.awt.Graphics2D g)
paint in interface VisibleComponentpaint in class AbstractFigurepublic void setComponent(javax.swing.JComponent c)
public void setParent(CanvasComponent fc)
setParent in interface FiguresetParent in class AbstractFigurepublic void transform(java.awt.geom.AffineTransform at)
transform in interface Figuretransform in class AbstractFigurepublic void translate(double x, double y)
translate in interface Figuretranslate in class AbstractFigure
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||