|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.sdm.renderer.IlvSDMRenderer
ilog.views.sdm.renderer.IlvFilterSDMRenderer
public abstract class IlvFilterSDMRenderer
The class IlvFilterSDMRenderer
is a superclass for "filtering" SDM renderers.
Filtering renderers implement the "Decorator" design pattern. A filtering renderer relies on another renderer (called the "filtered" renderer) to do most of the rendering work, but it can slightly modify the objects created by the filtered renderer to add a particular functionality.
Filtering renderers can be cascaded at an arbitrary level: a filtering renderer can filter another filtering renderer, and so on.
Each method of IlvFilterSDMRenderer simply
calls the same method on the filtered renderer. Subclasses
will override one or several methods to add a particular
functionality. Note that, in most cases, the overridden
methods must call their superclass to ensure that the
rendering chain is not broken.
This class is marked as "abstract" because it is of no use in itself. It is only useful as a superclass for other filtering renderers.
| Field Summary | |
|---|---|
protected IlvSDMRenderer |
_renderer
The filtered renderer that this filtering renderer delegates to. |
| Constructor Summary | |
|---|---|
IlvFilterSDMRenderer()
Creates a filtering renderer with a null
filtered renderer. |
|
IlvFilterSDMRenderer(IlvSDMRenderer renderer)
Creates a filtering renderer with a specified filtered renderer. |
|
| Method Summary | |
|---|---|
void |
addLinkGraphic(IlvSDMEngine engine,
Object link,
IlvGraphic graphic,
boolean redraw)
This method simply calls the addLinkGraphic method
of the filtered renderer. |
void |
addNodeGraphic(IlvSDMEngine engine,
Object node,
IlvGraphic graphic,
boolean redraw)
This method simply calls the addNodeGraphic method
of the filtered renderer. |
IlvRect |
computeBBox(IlvSDMEngine engine,
IlvManagerView view,
IlvTransformer t)
This method calls the filtered renderer's computeBBox method. |
IlvGraphic |
createLinkGraphic(IlvSDMEngine engine,
Object link,
IlvGraphic from,
IlvGraphic to)
This method simply calls the createLinkGraphic method
of the filtered renderer. |
IlvGraphic |
createNodeGraphic(IlvSDMEngine engine,
Object node)
This method simply calls the createNodeGraphic method
of the filtered renderer. |
void |
customize(IlvSDMEngine engine,
Object object,
IlvGraphic g,
String[] pseudoClasses)
This method simply calls the customize method
of the filtered renderer. |
IlvGraphic |
getEncapsulatedGraphic(IlvGraphic graphic)
This method calls the filtered renderer's getEncapsulatedGraphic
method. |
IlvSDMRenderer |
getFilteredRenderer()
Returns the filtered renderer to which this filtering renderer delegates. |
Object |
getGraphicProperty(IlvSDMEngine engine,
Object object,
String property,
String[] pseudoClasses,
Class targetClass)
This method simply calls the getGraphicProperty method
of the filtered renderer. |
IlvRect |
getLinkConnectionRectangle(IlvSDMEngine engine,
IlvGraphic graphic,
IlvTransformer t)
This method calls the filtered renderer's getLinkConnectionRectangle
method. |
void |
linkGraphicAdded(IlvSDMEngine engine,
Object object,
IlvGraphic graphic,
boolean redraw)
Simply calls the linkGraphicAdded method
of the filtered renderer. |
protected void |
moveResizeNodeGraphic(IlvSDMEngine engine,
Object node,
IlvGraphic graphic,
IlvRect newBBox,
int anchor)
Move the graphic to its final position |
void |
nodeGraphicAdded(IlvSDMEngine engine,
Object object,
IlvGraphic graphic,
boolean redraw)
Simply calls the nodeGraphicAdded method
of the filtered renderer. |
void |
nodeGraphicBBoxChanged(IlvSDMEngine engine,
Object node,
IlvGraphic graphic,
IlvRect oldBBox,
IlvRect newBBox,
String[] pseudoClasses)
This method calls the filtered renderer's nodeGraphicBBoxChanged
method. |
void |
prepareRendering(IlvSDMEngine engine)
This implementation calls the filtered renderer's prepareRendering method. |
boolean |
processServerAction(int x,
int y,
IlvManagerView view)
Calls the filtered renderer's processServerAction method. |
void |
propertyChanged(IlvSDMEngine engine,
Object object,
String propertyName,
Object oldValue,
Object newValue,
IlvGraphic graphic)
This method simply calls the propertyChanged method
of the filtered renderer. |
void |
removeAll(IlvSDMEngine engine)
This implementation calls the filtered renderer's removeAll method. |
void |
removeLinkGraphic(IlvSDMEngine engine,
Object link,
IlvGraphic graphic,
boolean redraw)
Simply calls the removeLinkGraphic method
of the filtered renderer. |
void |
removeNodeGraphic(IlvSDMEngine engine,
Object node,
IlvGraphic graphic,
boolean redraw)
Simply calls the removeNodeGraphic method
of the filtered renderer. |
void |
renderingDone(IlvSDMEngine engine)
This implementation calls the filtered renderer's renderingDone method. |
void |
setFilteredRenderer(IlvSDMRenderer renderer)
Sets the filtered renderer called by this filtering renderer. |
void |
updateObjectProperties(IlvSDMEngine engine,
Object object,
String property,
Object value,
String[] pseudoClasses)
This method simply calls the updateObjectProperties method
of the filtered renderer. |
| Methods inherited from class ilog.views.sdm.renderer.IlvSDMRenderer |
|---|
addViewListeners, callMoveResizeNodeGraphic, convert, convert, getAlias, getAuxiliaryBean, getAuxiliaryBeans, getEngine, getLocation, getParameter, needsViewListeners, removeViewListeners, setAlias, setEngine, setLayerName, setParameter |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected IlvSDMRenderer _renderer
| Constructor Detail |
|---|
public IlvFilterSDMRenderer(IlvSDMRenderer renderer)
renderer - The filtered renderer.public IlvFilterSDMRenderer()
null
filtered renderer. The filtered renderer must be set
using setFilteredRenderer(ilog.views.sdm.renderer.IlvSDMRenderer).
| Method Detail |
|---|
public void setFilteredRenderer(IlvSDMRenderer renderer)
renderer - The new filtered renderer.public IlvSDMRenderer getFilteredRenderer()
public IlvGraphic createLinkGraphic(IlvSDMEngine engine,
Object link,
IlvGraphic from,
IlvGraphic to)
createLinkGraphic method
of the filtered renderer.
createLinkGraphic in class IlvSDMRendererengine - The SDM engine associated with the grapher in
which the graphic object will be added.link - The data link to translate into an IlvGraphic.from - The graphic object associated with the source node of the link.to - The graphic object associated with the destination node of the link.
public IlvGraphic createNodeGraphic(IlvSDMEngine engine,
Object node)
createNodeGraphic method
of the filtered renderer.
createNodeGraphic in class IlvSDMRendererengine - The SDM engine associated with the grapher in
which the graphic object will be added.node - The data node to translate into an IlvGraphic.
public void addNodeGraphic(IlvSDMEngine engine,
Object node,
IlvGraphic graphic,
boolean redraw)
addNodeGraphic method
of the filtered renderer.
addNodeGraphic in class IlvSDMRendererengine - The SDM engine associated with the grapher in which
the graphic object will be added.node - The node that is being translated into an IlvGraphic.graphic - The graphic object returned by createNodeGraphic.redraw - If true, the region covered
by the new graphic object must be redrawn.
public void addLinkGraphic(IlvSDMEngine engine,
Object link,
IlvGraphic graphic,
boolean redraw)
addLinkGraphic method
of the filtered renderer.
addLinkGraphic in class IlvSDMRendererengine - The SDM engine associated with the grapher in which
the graphic object will be added.link - The link that is being translated into an IlvGraphic.graphic - The graphic object returned by createLinkGraphic.redraw - If true, the region covered by the new
graphic object must be redrawn.
public void nodeGraphicAdded(IlvSDMEngine engine,
Object object,
IlvGraphic graphic,
boolean redraw)
nodeGraphicAdded method
of the filtered renderer.
nodeGraphicAdded in class IlvSDMRendererengine - The SDM engine associated with the grapher in which
the graphic object has been added.object - The object that is being translated into an IlvGraphic.graphic - The graphic object that has just been added to the grapher.redraw - If true, the region covered by the new
graphic object must be redrawn.IlvSDMRenderer.addNodeGraphic(ilog.views.sdm.IlvSDMEngine, java.lang.Object, ilog.views.IlvGraphic, boolean)
public void linkGraphicAdded(IlvSDMEngine engine,
Object object,
IlvGraphic graphic,
boolean redraw)
linkGraphicAdded method
of the filtered renderer.
linkGraphicAdded in class IlvSDMRendererengine - The SDM engine associated with the grapher in which
the graphic object has been added.object - The object that is being translated into an IlvGraphic.graphic - The graphic object that has just been added to the grapher.redraw - If true, the region covered by the new
graphic object must be redrawn.IlvSDMRenderer.addLinkGraphic(ilog.views.sdm.IlvSDMEngine, java.lang.Object, ilog.views.IlvGraphic, boolean)
public void removeNodeGraphic(IlvSDMEngine engine,
Object node,
IlvGraphic graphic,
boolean redraw)
removeNodeGraphic method
of the filtered renderer.
removeNodeGraphic in class IlvSDMRendererengine - The SDM engine associated with the grapher from which
the graphic object will be removed.node - The node that has been removed or modified in the data model.graphic - The graphic object that must be removed from the grapher.redraw - If true, the region covered by the
graphic object must be redrawn.
public void removeLinkGraphic(IlvSDMEngine engine,
Object link,
IlvGraphic graphic,
boolean redraw)
removeLinkGraphic method
of the filtered renderer.
removeLinkGraphic in class IlvSDMRendererengine - The SDM engine associated with the grapher from which
the graphic object will be removed.link - The link that has been removed or modified in the data model.graphic - The graphic object that must be removed from the grapher.redraw - If true, the region covered by the
graphic object must be redrawn.public void removeAll(IlvSDMEngine engine)
removeAll method.
removeAll in class IlvSDMRendererengine - The SDM engine.public void prepareRendering(IlvSDMEngine engine)
prepareRendering method.
prepareRendering in class IlvSDMRendererengine - The SDM engine.public void renderingDone(IlvSDMEngine engine)
renderingDone method.
renderingDone in class IlvSDMRendererengine - The SDM engine.
public void propertyChanged(IlvSDMEngine engine,
Object object,
String propertyName,
Object oldValue,
Object newValue,
IlvGraphic graphic)
propertyChanged method
of the filtered renderer.
propertyChanged in class IlvSDMRendererengine - The SDM engine associated with the grapher in
which the graphic object is displayed.object - The data object whose property has changed.propertyName - The name of the property that has been modified.oldValue - The old value of the property.newValue - The new value of the property.graphic - The graphic object associated with object.
public Object getGraphicProperty(IlvSDMEngine engine,
Object object,
String property,
String[] pseudoClasses,
Class targetClass)
getGraphicProperty method
of the filtered renderer.
getGraphicProperty in class IlvSDMRendererengine - The SDM engine.object - The data object that is being rendered.property - The name of the graphic property.pseudoClasses - The pseudo-classes of the object. This parameter can be null.targetClass - The class of the object on which the property will be
set. The method can introspect the class to determine the type
of the property, and convert the value if necessary. If this argument
is null, the property should be returned without conversion.
public void updateObjectProperties(IlvSDMEngine engine,
Object object,
String property,
Object value,
String[] pseudoClasses)
updateObjectProperties method
of the filtered renderer.
updateObjectProperties in class IlvSDMRendererengine - The SDM engine.object - The data object.property - The name of the graphic property.value - The new value of the property.pseudoClasses - The pseudo-classes of the objects.
This parameter can be null.
public void customize(IlvSDMEngine engine,
Object object,
IlvGraphic g,
String[] pseudoClasses)
customize method
of the filtered renderer.
customize in class IlvSDMRendererengine - The SDM engine.object - The data object that the graphic object represents.g - The graphic object to customize.pseudoClasses - The pseudo-classes of the object. This parameter
can be null.
public IlvRect getLinkConnectionRectangle(IlvSDMEngine engine,
IlvGraphic graphic,
IlvTransformer t)
getLinkConnectionRectangle
method.
getLinkConnectionRectangle in class IlvSDMRendererengine - The SDM engine.graphic - The graphic object returned by createNodeGraphic.t - The transformer of the view.
public IlvGraphic getEncapsulatedGraphic(IlvGraphic graphic)
getEncapsulatedGraphic
method.
getEncapsulatedGraphic in class IlvSDMRenderergraphic - A graphic object returned by createNodeGraphic.
public void nodeGraphicBBoxChanged(IlvSDMEngine engine,
Object node,
IlvGraphic graphic,
IlvRect oldBBox,
IlvRect newBBox,
String[] pseudoClasses)
nodeGraphicBBoxChanged
method.
nodeGraphicBBoxChanged in class IlvSDMRendererengine - The SDM engine.node - The data node that the graphic object represents.graphic - The graphic object that has been moved and/or resized.oldBBox - The bounding box of the graphic object before
the change.newBBox - The bounding box of the graphic object after
the change.pseudoClasses - The pseudo-classes of the object.
This parameter can be null.
public IlvRect computeBBox(IlvSDMEngine engine,
IlvManagerView view,
IlvTransformer t)
computeBBox method.
computeBBox in class IlvSDMRendererengine - The SDM engine.view - The manager view for which the bounding rectangle is computed.t - The transformer used to compute the bbox.
A null value is equivalent to an identity transformer.
protected void moveResizeNodeGraphic(IlvSDMEngine engine,
Object node,
IlvGraphic graphic,
IlvRect newBBox,
int anchor)
moveResizeNodeGraphic in class IlvSDMRendererengine - The SDM engine.node - The data node that the graphic object represents.graphic - The graphic object that to be moved and/or resized.newBBox - An IlvRectangle initialized with the "x", "y",
"width" and "height" graphic properties.
If the width or height of the rectangle are non-zero, the graphic object
is moved and resized, otherwise the graphic object is only moved.
The final position must be stored in this parameter.anchor - see IlvDirection for the possible values
public boolean processServerAction(int x,
int y,
IlvManagerView view)
processServerAction method.
processServerAction in class IlvSDMRendererx - The X coordinate of the point where the user clicked on the client-side,
in view coordinates.y - The y coordinate of the point where the user clicked on the client-side,
in view coordinates.view - The view used to render the graph image.
true if the action was processed,
false if the action was not processed.
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||