public abstract class CanvasPane extends Object implements EventAcceptor, CanvasComponent
Constructor and Description |
---|
CanvasPane() |
Modifier and Type | Method and Description |
---|---|
protected void |
_initNewLayer(CanvasLayer l)
Helper method to initialize a layer when it is added to this
pane.
|
protected void |
_nullifyLayer(CanvasLayer l)
Helper method to tell a layer when it is been removed from
this pane.
|
void |
dispatchEvent(AWTEvent event)
Dispatch an AWT event on this pane.
|
JCanvas |
getCanvas()
Get the containing canvas, or null if there isn't one.
|
CanvasComponent |
getParent()
Get the parent component, or null if there isn't one.
|
Point2D |
getSize()
Get the size of this pane, in logical coordinates.
|
protected String |
getToolTipText(LayerEvent event)
Get the toolTipText for the point in the given LayerEvent.
|
TransformContext |
getTransformContext()
Return the transform context of this pane.
|
boolean |
isAntialiasing()
Return whether or not this pane is antialiased
|
boolean |
isEnabled()
Test the enabled flag of this pane.
|
Iterator |
layers()
Return an iteration of the layers, in undefined order.
|
abstract Iterator |
layersFromBack()
Return an iteration of the layers from back to front --
that is, in redraw order.
|
abstract Iterator |
layersFromFront()
Return an iteration of the layers from front to back --
that is, in event-processing order.
|
void |
paint(Graphics2D g)
Paint this pane onto a 2D graphics context.
|
void |
paint(Graphics2D g,
Rectangle2D region)
Paint this pane onto a 2D graphics object, within the given
region.
|
protected void |
processLayerEvent(LayerEvent event)
Process a layer event that has occurred on this pane.
|
void |
repaint()
Schedule a repaint of this pane.
|
void |
repaint(DamageRegion d)
Accept notification that a repaint has occurred somewhere
in this pane.
|
void |
scale(double xcenter,
double ycenter,
double xscale,
double yscale)
Scale this pane the given amount.
|
void |
setAntialiasing(boolean val)
Set whether or not to use antialiasing
when drawing this pane.
|
void |
setCanvas(JCanvas canvas)
Set the containing canvas of this pane.
|
void |
setEnabled(boolean flag)
Set the enabled flag of this pane.
|
void |
setParent(CanvasComponent parent)
Set the parent component of this pane.
|
void |
setSize(double width,
double height)
Set the size of this pane, in logical coordinates.
|
void |
setSize(Point2D size)
Set the size of this pane, in logical coordinates.
|
void |
setTransform(AffineTransform at)
Set the transform that maps logical coordinates into the
parent's coordinates.
|
void |
translate(double x,
double y)
Translate this pane the given distance.
|
public void dispatchEvent(AWTEvent event)
dispatchEvent
in interface EventAcceptor
public final CanvasComponent getParent()
getParent
in interface CanvasComponent
public final JCanvas getCanvas()
public final boolean isAntialiasing()
protected String getToolTipText(LayerEvent event)
public final TransformContext getTransformContext()
getTransformContext
in interface CanvasComponent
public Point2D getSize()
public final boolean isEnabled()
isEnabled
in interface EventAcceptor
public Iterator layers()
public abstract Iterator layersFromBack()
public abstract Iterator layersFromFront()
public void paint(Graphics2D g)
public void paint(Graphics2D g, Rectangle2D region)
protected void processLayerEvent(LayerEvent event)
public void repaint()
repaint
in interface CanvasComponent
public void repaint(DamageRegion d)
repaint
in interface CanvasComponent
public void setAntialiasing(boolean val)
public final void setCanvas(JCanvas canvas)
public final void setEnabled(boolean flag)
setEnabled
in interface EventAcceptor
public final void setParent(CanvasComponent parent)
public void setSize(double width, double height)
public void setSize(Point2D size)
public final void setTransform(AffineTransform at)
public void translate(double x, double y)
public void scale(double xcenter, double ycenter, double xscale, double yscale)
protected void _initNewLayer(CanvasLayer l)
protected void _nullifyLayer(CanvasLayer l)
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.