|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.batik.refimpl.gvt.AbstractGraphicsNode
A partial implementation of the GraphicsNode interface.
Field Summary | |
protected Clip |
clip
The clipping filter for this graphics node. |
protected java.awt.Composite |
composite
The compositing operation to be used when a graphics node is painted on top of another one. |
protected java.awt.Cursor |
cursor
The cursor attached to this graphics node. |
protected GraphicsNodeEventFilter |
eventFilter
The filter used to filter graphics node events. |
protected Filter |
filter
The filter of this graphics node. |
protected java.awt.RenderingHints |
hints
The rendering hints that control the quality to use when rendering this graphics node. |
protected GraphicsNodeHitDetector |
hitDetector
The hit detector used to filter mouse events. |
protected boolean |
isVisible
This flag bit indicates whether or not this graphics node is visible. |
protected javax.swing.event.EventListenerList |
listeners
The listeners list. |
protected Mask |
mask
The mask of this graphics node. |
protected java.util.Map |
mememtos
The Map used to store mememto objects. |
protected CompositeGraphicsNode |
parent
The parent of this graphics node. |
protected RootGraphicsNode |
root
The root of the GVT tree. |
protected java.awt.geom.AffineTransform |
transform
The transform of this graphics node. |
Fields inherited from interface org.apache.batik.gvt.GraphicsNode |
KEY_AREA_OF_INTEREST |
Constructor Summary | |
AbstractGraphicsNode()
Constructs a new graphics node. |
Method Summary | |
protected boolean |
acceptEvent(GraphicsNodeEvent evt)
|
void |
addGraphicsNodeKeyListener(GraphicsNodeKeyListener l)
Adds the specified graphics node key listener to receive graphics node key events from this node. |
void |
addGraphicsNodeMouseListener(GraphicsNodeMouseListener l)
Adds the specified graphics node mouse listener to receive graphics node mouse events from this node. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds the specified property change listener to receive property change events from this node. |
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener l)
Adds the specified property change listener to receive property change events for the specified property name of this node. |
boolean |
contains(java.awt.geom.Point2D p)
Tests if the specified Point2D is inside the boundary of this node. |
void |
dispatch(GraphicsNodeEvent evt)
Dispatches a graphics node event to this node or one of its child. |
protected void |
fireGraphicsNodePaintListener(java.awt.geom.Rectangle2D oldBounds)
Fires the paint listener. |
protected void |
firePropertyChange(java.lang.String propertyName,
boolean oldValue,
boolean newValue)
|
protected void |
firePropertyChange(java.lang.String propertyName,
int oldValue,
int newValue)
|
protected void |
firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
|
java.awt.geom.Rectangle2D |
getBounds()
Compute the rendered bounds of this node based on it's renderBounds, i.e., the area painted by its primitivePaint method. |
Clip |
getClip()
Returns the clipping filter of this node or null if any. |
java.awt.Composite |
getComposite()
Returns the composite of this node. |
java.awt.Cursor |
getCursor()
Returns the cursor of this node. |
Filter |
getFilter()
Returns the filter of this node or null if any. |
protected java.awt.geom.Rectangle2D |
getGlobalBounds()
|
java.awt.geom.AffineTransform |
getGlobalTransform()
Returns the concatenated transform, i.e., this node's transform preconcatenated with it's parent's transforms. |
GraphicsNodeEventFilter |
getGraphicsNodeEventFilter()
Returns the graphics node event filter of this node. |
GraphicsNodeHitDetector |
getGraphicsNodeHitDetector()
Returns the hit detector for this node. |
java.util.EventListener[] |
getListeners(java.lang.Class listenerType)
Returns an array of listeners that were added to this node and of the specified type. |
Mask |
getMask()
Returns the mask of this node or null if any. |
java.lang.Object |
getMemento(java.lang.Object key)
Returns the value of the memento with the specified key or null if any. |
CompositeGraphicsNode |
getParent()
Returns the parent of this node or null if any. |
java.awt.RenderingHints |
getRenderingHints()
Returns the rendering hints of this node or null if any. |
RootGraphicsNode |
getRoot()
Returns the root of the GVT tree or null if
the node is not part of a GVT tree. |
java.awt.geom.AffineTransform |
getTransform()
Returns the transform of this node. |
boolean |
intersects(java.awt.geom.Rectangle2D r)
Tests if the interior of this node intersects the interior of a specified Rectangle2D. |
protected void |
invalidateGeometryCache()
Invalidates the cached geometric bounds. |
protected boolean |
isAntialiasedClip(java.awt.geom.AffineTransform usr2dev,
java.awt.RenderingHints hints,
java.awt.Shape clip)
Returns true if there is a clip and it should be antialiased |
protected boolean |
isOffscreenBufferNeeded()
Returns true of an offscreen buffer is needed to render this node, false otherwise. |
boolean |
isVisible()
Determines whether or not this node is visible when its parent is visible. |
GraphicsNode |
nodeHitAt(java.awt.geom.Point2D p)
Returns the GraphicsNode containing point p if this node or one of its children is sensitive to mouse events at p. |
void |
paint(java.awt.Graphics2D g2d,
GraphicsNodeRenderContext rc)
Paints this node. |
void |
processChangeEvent(CompositeGraphicsNodeEvent evt)
|
void |
processKeyEvent(GraphicsNodeKeyEvent evt)
Dispatches a graphics node event to this node or one of its child. |
void |
processMouseEvent(GraphicsNodeMouseEvent evt)
Dispatches a graphics node event to this node or one of its child. |
void |
putMemento(java.lang.Object key,
java.lang.Object mememto)
Associates the specified memento with the specified key in this node. |
void |
removeGraphicsNodeKeyListener(GraphicsNodeKeyListener l)
Removes the specified graphics node key listener so that it no longer receives graphics node key events from this node. |
void |
removeGraphicsNodeMouseListener(GraphicsNodeMouseListener l)
Removes the specified graphics node mouse listener so that it no longer receives graphics node mouse events from this node. |
void |
removeMemento(java.lang.Object key)
Removes the memento object with the specified key. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes the specified property change listener so that it no longer receives property change events from this node. |
void |
setClip(Clip newClipper)
Sets the clipping filter for this node. |
void |
setComposite(java.awt.Composite newComposite)
Sets the composite of this node. |
void |
setCursor(java.awt.Cursor newCursor)
Sets the cursor of this node. |
void |
setFilter(Filter newFilter)
Sets the filter of this node. |
void |
setGraphicsNodeEventFilter(GraphicsNodeEventFilter evtFilter)
Sets the graphics node event filter of this node. |
void |
setGraphicsNodeHitDetector(GraphicsNodeHitDetector hitDetector)
Sets the hit detector for this node. |
void |
setMask(Mask newMask)
Sets the mask of this node. |
void |
setRenderingHint(java.awt.RenderingHints.Key key,
java.lang.Object value)
Maps the specified key to the specified value in the rendering hints of this node. |
void |
setRenderingHints(java.util.Map hints)
Copies all of the mappings from the specified Map to the rendering hints of this node. |
void |
setRenderingHints(java.awt.RenderingHints newHints)
Sets the rendering hints of this node. |
protected void |
setRoot(RootGraphicsNode newRoot)
|
void |
setTransform(java.awt.geom.AffineTransform newTransform)
Sets the transform of this node. |
void |
setVisible(boolean isVisible)
Sets if this node is visible or not depending on the specified value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.batik.gvt.GraphicsNode |
getGeometryBounds, getOutline, getPrimitiveBounds, hasProgressivePaint, primitivePaint, progressivePaint |
Field Detail |
protected java.util.Map mememtos
protected javax.swing.event.EventListenerList listeners
protected GraphicsNodeEventFilter eventFilter
protected GraphicsNodeHitDetector hitDetector
protected java.awt.Cursor cursor
protected java.awt.geom.AffineTransform transform
protected java.awt.Composite composite
protected boolean isVisible
protected Clip clip
protected java.awt.RenderingHints hints
protected Mask mask
protected CompositeGraphicsNode parent
protected RootGraphicsNode root
protected Filter filter
Constructor Detail |
public AbstractGraphicsNode()
Method Detail |
protected void firePropertyChange(java.lang.String propertyName, boolean oldValue, boolean newValue)
protected void firePropertyChange(java.lang.String propertyName, int oldValue, int newValue)
protected void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
protected void fireGraphicsNodePaintListener(java.awt.geom.Rectangle2D oldBounds)
oldBounds
- the old bounds of this node in renderer space.public void setCursor(java.awt.Cursor newCursor)
GraphicsNode
setCursor
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
newCursor
- the new cursor of this nodepublic java.awt.Cursor getCursor()
GraphicsNode
getCursor
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
public void setTransform(java.awt.geom.AffineTransform newTransform)
GraphicsNode
setTransform
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
newTransform
- the new transform of this nodepublic java.awt.geom.AffineTransform getTransform()
GraphicsNode
getTransform
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
public java.awt.geom.AffineTransform getGlobalTransform()
GraphicsNode
getGlobalTransform
in interface GraphicsNode
public void setComposite(java.awt.Composite newComposite)
GraphicsNode
setComposite
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
composite
- the composite of this nodepublic java.awt.Composite getComposite()
GraphicsNode
getComposite
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
public void setVisible(boolean isVisible)
GraphicsNode
setVisible
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
isVisible
- If true this node is visiblepublic boolean isVisible()
GraphicsNode
isVisible
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
public void setClip(Clip newClipper)
GraphicsNode
setClip
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
newClipper
- the new clipping filter of this nodepublic Clip getClip()
GraphicsNode
getClip
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
public void setRenderingHint(java.awt.RenderingHints.Key key, java.lang.Object value)
GraphicsNode
setRenderingHint
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
key
- the key of the hint to be setvalue
- the value indicating preferences for the specified
hint category.public void setRenderingHints(java.util.Map hints)
GraphicsNode
setRenderingHints
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
hints
- the rendering hints to be setpublic void setRenderingHints(java.awt.RenderingHints newHints)
GraphicsNode
setRenderingHints
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
newHints
- the new rendering hints of this nodepublic java.awt.RenderingHints getRenderingHints()
GraphicsNode
getRenderingHints
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
public void setMask(Mask newMask)
GraphicsNode
setMask
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
newMask
- the new mask of this nodepublic Mask getMask()
GraphicsNode
getMask
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
public void setFilter(Filter newFilter)
GraphicsNode
setFilter
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
newFilter
- the new filter of this nodepublic Filter getFilter()
GraphicsNode
getFilter
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
public void paint(java.awt.Graphics2D g2d, GraphicsNodeRenderContext rc) throws java.lang.InterruptedException
GraphicsNode
paint
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
g2d
- the Graphics2D to userc
- the GraphicsNodeRenderContext to usethrown
- if the current thread was interrupted during paintprotected boolean isOffscreenBufferNeeded()
protected boolean isAntialiasedClip(java.awt.geom.AffineTransform usr2dev, java.awt.RenderingHints hints, java.awt.Shape clip)
public void addGraphicsNodeMouseListener(GraphicsNodeMouseListener l)
GraphicsNode
addGraphicsNodeMouseListener
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
l
- the graphics node mouse listener to addpublic void removeGraphicsNodeMouseListener(GraphicsNodeMouseListener l)
GraphicsNode
removeGraphicsNodeMouseListener
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
l
- the graphics node mouse listener to removepublic void addGraphicsNodeKeyListener(GraphicsNodeKeyListener l)
GraphicsNode
addGraphicsNodeKeyListener
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
l
- the graphics node key listener to addpublic void removeGraphicsNodeKeyListener(GraphicsNodeKeyListener l)
GraphicsNode
removeGraphicsNodeKeyListener
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
l
- the graphics node key listener to removepublic void setGraphicsNodeEventFilter(GraphicsNodeEventFilter evtFilter)
GraphicsNode
setGraphicsNodeEventFilter
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
evtFilter
- the new graphics node event filterpublic GraphicsNodeEventFilter getGraphicsNodeEventFilter()
GraphicsNode
getGraphicsNodeEventFilter
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
public void setGraphicsNodeHitDetector(GraphicsNodeHitDetector hitDetector)
GraphicsNode
setGraphicsNodeHitDetector
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
hitDetector
- the new hit detectorpublic GraphicsNodeHitDetector getGraphicsNodeHitDetector()
GraphicsNode
getGraphicsNodeHitDetector
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
GraphicsNode
addPropertyChangeListener
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
l
- the property change listener to addpublic void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener l)
GraphicsNode
addPropertyChangeListener
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
propertyName
- the name of the propertyl
- the property change listener to add for the specified propertypublic void removePropertyChangeListener(java.beans.PropertyChangeListener l)
GraphicsNode
removePropertyChangeListener
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
l
- the property change listener to removepublic void dispatch(GraphicsNodeEvent evt)
GraphicsNode
dispatch
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
evt
- the evt to dispatchpublic java.util.EventListener[] getListeners(java.lang.Class listenerType)
GraphicsNode
getListeners
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
listenerType
- the type of the listeners to returnpublic CompositeGraphicsNode getParent()
GraphicsNode
getParent
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
public RootGraphicsNode getRoot()
GraphicsNode
null
if
the node is not part of a GVT tree.getRoot
in interface GraphicsNode
protected void setRoot(RootGraphicsNode newRoot)
public void putMemento(java.lang.Object key, java.lang.Object mememto)
GraphicsNode
putMemento
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
key
- the key with which the specified memento is to be associatedmemento
- the memento to be associated with the specified keypublic java.lang.Object getMemento(java.lang.Object key)
GraphicsNode
getMemento
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
the
- key whose associated value is to be returnedpublic void removeMemento(java.lang.Object key)
GraphicsNode
removeMemento
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
key
- the key whose mapping is to be removed from the mapprotected void invalidateGeometryCache()
protected java.awt.geom.Rectangle2D getGlobalBounds()
public java.awt.geom.Rectangle2D getBounds()
getBounds
in interface GraphicsNode
public boolean contains(java.awt.geom.Point2D p)
GraphicsNode
contains
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
p
- the specified Point2D in the user spacepublic GraphicsNode nodeHitAt(java.awt.geom.Point2D p)
GraphicsNode
nodeHitAt
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
p
- the specified Point2D in the user spacepublic boolean intersects(java.awt.geom.Rectangle2D r)
GraphicsNode
intersects
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
r
- the specified Rectangle2D in the user node spacepublic void processMouseEvent(GraphicsNodeMouseEvent evt)
GraphicsNode
processMouseEvent
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
evt
- the evt to dispatchpublic void processKeyEvent(GraphicsNodeKeyEvent evt)
GraphicsNode
processKeyEvent
in interface GraphicsNode
org.apache.batik.gvt.GraphicsNode
evt
- the evt to dispatchpublic void processChangeEvent(CompositeGraphicsNodeEvent evt)
protected boolean acceptEvent(GraphicsNodeEvent evt)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |