|
||||||||||
| 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.PaneWrapper
A figure that wraps a whole canvas pane. This class is thus one of the ways in which a canvas pane can be nested within other canvas panes. It can be given a figure that is drawn as the background or outline of the pane. Once an instance of this class has been created, the wrapped pane cannot be changed.
In order to pass events down into the contained pane, the PaneWrapper implements EventAccepter. It forwards events to the internal pane.
| Constructor Summary | |
PaneWrapper(CanvasPane pane)
Create a new pane figure with the given pane. |
|
| Method Summary | |
void |
dispatchEvent(java.awt.AWTEvent event)
Dispatch an AWT event on this pane figure. |
Figure |
getBackground()
Get the background figure. |
java.awt.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(java.awt.Graphics2D g)
Paint the pane figure. |
void |
paint(java.awt.Graphics2D g,
java.awt.geom.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(java.awt.geom.AffineTransform at)
Set the transform of the internal pane, relative to the external one. |
void |
transform(java.awt.geom.AffineTransform at)
Transform the figure with the supplied transform. |
void |
translate(double x,
double y)
Translate this pane wrapper the given distance. |
| Methods inherited from class diva.canvas.AbstractFigure |
contains, getBounds, getInteractor, getLayer, getOrigin, getParent, getToolTipText, getTransformContext, getUserObject, hit, intersects, isVisible, 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 diva.canvas.CanvasComponent |
getParent, getTransformContext, repaint |
| Constructor Detail |
public PaneWrapper(CanvasPane pane)
| Method Detail |
public void dispatchEvent(java.awt.AWTEvent event)
dispatchEvent in interface EventAcceptorpublic Figure getBackground()
public java.awt.Shape getShape()
getShape in interface FiguregetShape in class AbstractFigurepublic CanvasPane getWrappedPane()
public boolean isClipEnabled()
public boolean isEnabled()
isEnabled in interface EventAcceptorpublic void paint(java.awt.Graphics2D g)
paint in interface VisibleComponentpaint in class AbstractFigurepublic void paint(java.awt.Graphics2D g, java.awt.geom.Rectangle2D region)
paint in interface VisibleComponentpaint in class AbstractFigureprotected 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 CanvasComponentrepaint in class AbstractFigurepublic void setBackground(Figure background)
public void setClipEnabled(boolean flag)
public void setEnabled(boolean flag)
setEnabled in interface EventAcceptorpublic void setTransform(java.awt.geom.AffineTransform at)
public 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 | |||||||||