public class PaneWrapper extends AbstractFigure implements EventAcceptor
In order to pass events down into the contained pane, the PaneWrapper implements EventAccepter. It forwards events to the internal pane.
Constructor and Description |
---|
PaneWrapper(CanvasPane pane)
Create a new pane figure with the given pane.
|
Modifier and Type | Method and Description |
---|---|
void |
dispatchEvent(AWTEvent event)
Dispatch an AWT event on this pane figure.
|
Figure |
getBackground()
Get the background figure.
|
Shape |
getShape()
Get the shape of this figure.
|
CanvasPane |
getWrappedPane()
Get the wrapped pane
|
boolean |
isClipEnabled()
Get the clipping enabled flag.
|
boolean |
isEnabled()
Test the enabled flag of the wrapped pane.
|
void |
paint(Graphics2D g)
Paint the pane figure.
|
void |
paint(Graphics2D g,
Rectangle2D region)
Paint the pane figure within the given region.
|
protected void |
processLayerEvent(LayerEvent event)
Process a layer event.
|
void |
repaint(DamageRegion d)
Accept notification that a repaint has occurred in the wrapped
pane.
|
void |
setBackground(Figure background)
Set the background figure.
|
void |
setClipEnabled(boolean flag)
Set the clipping enabled flag.
|
void |
setEnabled(boolean flag)
Set the enabled flag of the wrapped pane.
|
void |
setTransform(AffineTransform at)
Set the transform of the internal pane, relative to the
external one.
|
void |
transform(AffineTransform at)
Transform the figure with the supplied transform.
|
void |
translate(double x,
double y)
Translate this pane wrapper the given distance.
|
contains, getBounds, getInteractor, getLayer, getOrigin, getParent, getToolTipText, getTransformContext, getUserObject, hit, intersects, isVisible, repaint, setInteractor, setParent, setToolTipText, setUserObject, setVisible
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getParent, getTransformContext, repaint
public PaneWrapper(CanvasPane pane)
public void dispatchEvent(AWTEvent event)
dispatchEvent
in interface EventAcceptor
public Figure getBackground()
public Shape getShape()
getShape
in interface Figure
getShape
in class AbstractFigure
public CanvasPane getWrappedPane()
public boolean isClipEnabled()
public boolean isEnabled()
isEnabled
in interface EventAcceptor
public void paint(Graphics2D g)
paint
in interface VisibleComponent
paint
in class AbstractFigure
public void paint(Graphics2D g, Rectangle2D region)
paint
in interface VisibleComponent
paint
in class AbstractFigure
protected void processLayerEvent(LayerEvent event)
Currently, this methods also implements a simple technique to manage event-handling between the "inner" and "outer" panes. If this PaneWrapper has a selection interactor, and it is in the selection, then don't process the event. This means that the outer pane gets to handle all events if the wrapper has already been selected.
public void repaint(DamageRegion d)
repaint
in interface CanvasComponent
repaint
in class AbstractFigure
public void setBackground(Figure background)
public void setClipEnabled(boolean flag)
public void setEnabled(boolean flag)
setEnabled
in interface EventAcceptor
public void setTransform(AffineTransform at)
public void transform(AffineTransform at)
transform
in interface Figure
transform
in class AbstractFigure
public void translate(double x, double y)
translate
in interface Figure
translate
in class AbstractFigure
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.