public interface JaxoCanvasComponent
Modifier and Type | Method and Description |
---|---|
void |
addMouseListener(java.awt.event.MouseListener l)
Adds the specified mouse listener to receive mouse events from this CanvasComponent.
|
void |
addMouseMotionListener(java.awt.event.MouseMotionListener l)
Adds the specified mouse motion listener to receive mouse motion events from this CanvasComponent.
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list.
|
java.awt.Component |
asComponent()
Return this CanvasComponent as a Component.
|
java.awt.Color |
getCanvasBackground()
Background color in the region that is actually covered by the canvas
getCanvasSize() . |
java.awt.Rectangle |
getCanvasBounds()
Part of the component that is covered by the actual canvas.
|
java.awt.Point |
getCanvasOrigin()
Origin of the actual canvas within the component.
|
java.awt.Dimension |
getCanvasSize()
Canvas size.
|
java.awt.Graphics |
getGraphics()
Return the graphics context of this CanvasComponent.
|
java.awt.Dimension |
getMaximumCanvasSize()
Maximum size of the canvas (even if there are objects with a larger bounding box).
|
java.awt.Dimension |
getMinimumCanvasSize()
Minimum size of the canvas (even if there are no objects
or they have a smaller bounding box).
|
void |
print(java.awt.Graphics g)
Prints this component.
|
void |
removeMouseListener(java.awt.event.MouseListener l)
Removes the specified mouse listener so that it no longer receives mouse events
from this component.
|
void |
removeMouseMotionListener(java.awt.event.MouseMotionListener l)
Removes the specified mouse motion listener so that it no longer receives mouse motion
events from this component.
|
void |
repaint()
Repaints this component.
|
void |
setCanvasBackground(java.awt.Color color)
Sets the color of the background.
|
void |
setMaximumCanvasSize(java.awt.Dimension value)
Sets the maximum canvas size.
|
void |
setMinimumCanvasSize(java.awt.Dimension value)
Sets the minimum canvas size.
|
void addMouseListener(java.awt.event.MouseListener l)
l
- the mouse listener. May be null.Component.addMouseListener(java.awt.event.MouseListener)
void addMouseMotionListener(java.awt.event.MouseMotionListener l)
l
- the mouse motion listener. May be null.Component.addMouseMotionListener(java.awt.event.MouseMotionListener)
void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- the property change listener to be added. May be null.Component.addPropertyChangeListener(java.beans.PropertyChangeListener)
java.awt.Component asComponent()
java.awt.Color getCanvasBackground()
getCanvasSize()
.java.awt.Rectangle getCanvasBounds()
getCanvasSize()
,
getCanvasOrigin()
java.awt.Point getCanvasOrigin()
java.awt.Dimension getCanvasSize()
java.awt.Graphics getGraphics()
Component.getGraphics()
java.awt.Dimension getMaximumCanvasSize()
java.awt.Dimension getMinimumCanvasSize()
void print(java.awt.Graphics g)
g
- the graphics context to use for printing.Component.print(java.awt.Graphics)
void removeMouseListener(java.awt.event.MouseListener l)
l
- the mouse listenerComponent.removeMouseListener(java.awt.event.MouseListener)
void removeMouseMotionListener(java.awt.event.MouseMotionListener l)
l
- the mouse motion listenerComponent.removeMouseMotionListener(java.awt.event.MouseMotionListener)
void repaint()
Component.repaint()
void setCanvasBackground(java.awt.Color color)
color
- The background color.void setMaximumCanvasSize(java.awt.Dimension value)
value
- The maximum canvas size.void setMinimumCanvasSize(java.awt.Dimension value)
value
- The minimum canvas size.Licensed under GPL. For more information, see http://jaxodraw.sourceforge.net/license.html or the LICENSE file in the jaxodraw distribution.