public class SwingWrapper extends AbstractFigure
| Constructor and Description |
|---|
SwingWrapper(JComponent c)
Construct a new swing wrapper instance
to wrap the given component.
|
| Modifier and Type | Method and Description |
|---|---|
Rectangle2D |
getBounds()
Get the bounding box of this figure.
|
JComponent |
getComponent()
Return the component that this is
wrapping.
|
Shape |
getShape()
Get the shape of this figure.
|
void |
paint(Graphics2D g)
Ask the wrapped component to paint itself.
|
void |
setComponent(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(AffineTransform at)
Transform the figure with the supplied transform.
|
void |
translate(double x,
double y)
Translate the figure by the given distance.
|
contains, getInteractor, getLayer, getOrigin, getParent, getToolTipText, getTransformContext, getUserObject, hit, intersects, isVisible, paint, repaint, repaint, setInteractor, setToolTipText, setUserObject, setVisiblepublic SwingWrapper(JComponent c)
public Rectangle2D getBounds()
getBounds in interface FiguregetBounds in class AbstractFigurepublic JComponent getComponent()
public Shape getShape()
getShape in interface FiguregetShape in class AbstractFigurepublic void paint(Graphics2D g)
paint in interface VisibleComponentpaint in class AbstractFigurepublic void setComponent(JComponent c)
public void setParent(CanvasComponent fc)
setParent in interface FiguresetParent in class AbstractFigurepublic void transform(AffineTransform at)
transform in interface Figuretransform in class AbstractFigurepublic void translate(double x,
double y)
translate in interface Figuretranslate in class AbstractFigureCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.