public class IlvDrillDownRenderer extends IlvFilterSDMRenderer
IlvDrillDownRenderer
is a
filtering renderer that makes
more and more objects appear as the user zooms in
the view. To do this, the renderer dispatches the
objects in different manager layers with visibility filters.
The drill-down renderer looks at the property "DrillDownZoom"
for each object. All the objects with the same drill-down zoom are placed
in a manager layer that will be visible only when the view's zoom level
is greater than the drill-down zoom. A drill-down zoom means that the
object is always visible.
For example, assume that the links of the data model have
a property "distance"
, and that the style sheet
contains the following rules:
SDM { DrillDown : "true"; } link[distance>="1000"] { DrillDownZoom : "0"; } link[distance<"1000"] { DrillDownZoom : "2"; } link[distance<"100"] { DrillDownZoom : "4"; } link[distance<"10"] { DrillDownZoom : "8"; }
1000
have a drill-down zoom of 0
;
they are always visible.
1000
and greater than 100
have a drill-down zoom of 2
; they will become
visible only when the view is zoomed in by a factor of 2
.
100
and greater than 10
have a drill-down zoom of 4
; they will become
visible only when the view is zoomed in by a factor of 4
.
10
have a drill-down zoom of 8
; they will become
visible only when the view is zoomed in by a factor of 8
.
_renderer
PSEUDOCLASS_PREFIX
Constructor and Description |
---|
IlvDrillDownRenderer()
Creates a new drill-down renderer with a
null
filtered renderer. |
IlvDrillDownRenderer(IlvSDMRenderer renderer)
Creates a new drill-down renderer for a specified
filtered renderer.
|
Modifier and Type | Method and Description |
---|---|
void |
addLinkGraphic(IlvSDMEngine engine,
Object link,
IlvGraphic graphic,
boolean redraw)
Adds the graphic link in a layer that depends on the value
of the rendering property
DrillDownZoom . |
void |
addNodeGraphic(IlvSDMEngine engine,
Object node,
IlvGraphic graphic,
boolean redraw)
Adds the graphic node in a layer that depends on the value
of the rendering property
DrillDownZoom . |
boolean |
isShowingIndicator()
Returns the flag that specifies whether an icon
should be displayed in the top-left corner of the
view to alert the user that some objects are
not visible at the current zoom level.
|
void |
removeAll(IlvSDMEngine engine)
Removes the layers added during the previous rendering phase.
|
void |
renderingDone(IlvSDMEngine engine)
Adds the drill-down indicator icon, if requested.
|
void |
setShowingIndicator(boolean showing)
Sets the flag that specifies whether an icon
should be displayed in the top-left corner of the
view to alert the user that some objects are
not visible at the current zoom level.
|
computeBBox, createLinkGraphic, createNodeGraphic, customize, getEncapsulatedGraphic, getFilteredRenderer, getGraphicProperty, getLinkConnectionRectangle, linkGraphicAdded, moveResizeNodeGraphic, nodeGraphicAdded, nodeGraphicBBoxChanged, prepareRendering, processServerAction, propertiesChanged, removeLinkGraphic, removeNodeGraphic, setFilteredRenderer, updateObjectProperties
addViewListeners, callMoveResizeNodeGraphic, convert, convert, getAlias, getAuxiliaryBean, getAuxiliaryBeans, getEngine, getLinkConnectionRectangle, getLocation, getParameter, needsViewListeners, propertyChanged, removeViewListeners, setAlias, setEngine, setLayerName, setParameter
public IlvDrillDownRenderer(IlvSDMRenderer renderer)
renderer
- The filtered renderer.public IlvDrillDownRenderer()
null
filtered renderer.public void setShowingIndicator(boolean showing)
Note: Enabling the indicator icon will slow down the panning of the view because the icon must stay at a fixed position, which is not compatible with the "optimized translation" mode of the manager view.
showing
- If true
, an icon will
appear in the top-left corner of the view when
some objects are not visible at the current zoom level.
The icon will disappear when the view is zoomed in enough
for all the objects to be visible.public boolean isShowingIndicator()
public void addNodeGraphic(IlvSDMEngine engine, Object node, IlvGraphic graphic, boolean redraw)
DrillDownZoom
. Each layer has a
visibility filter that makes it visible only when the view's
transformer has a zoom level greater than the drill-down zoom.
graphic object must be redrawn.addNodeGraphic
in class IlvFilterSDMRenderer
engine
- 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)
DrillDownZoom
. Each layer has a
visibility filter that makes it visible only when the view's
transformer has a zoom level greater than the drill-down zoom.addLinkGraphic
in class IlvFilterSDMRenderer
engine
- 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 removeAll(IlvSDMEngine engine)
removeAll
in class IlvFilterSDMRenderer
engine
- The SDM engine.public void renderingDone(IlvSDMEngine engine)
renderingDone
in class IlvFilterSDMRenderer
engine
- The SDM engine.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.