public class IlvMapStyleSheetRenderer extends IlvStyleSheetRenderer
IlvMapStyleSheetRenderer
lazily creates a map layer when a node
or a link is first added. This class is intended to replace the default
IlvStyleSheetRenderer
when managing IlvMapLayer
objects.
To use this class in your application, you must insert the following code before creating the engine:
// replace the style sheet renderer with the map renderer class. IlvRendererUtil.addRendererAlias( IlvRendererUtil.getRendererAlias(IlvStyleSheetRenderer.class.getName()), IlvMapStyleSheetRenderer.class.getName());
Note: use this class only with Rogue Wave JViews Maps.
Modifier and Type | Class and Description |
---|---|
static class |
IlvMapStyleSheetRenderer.IlvMapSymbolManagerLayer
This layer class prevents saving symbols graphic representation through
ivl persistence (ie in the map file). |
Modifier and Type | Field and Description |
---|---|
static String |
LINK_LAYER_NAME
The name of the link map layer.
|
static String |
SYMBOL_LAYER_NAME
The name of the symbol map layer.
|
_debug, _error, ACTUAL_LOCATION_MASK, CENTER, CLIP, defaultCSS, FREE, IMAGE_MASK, LOCATION_MASK
PSEUDOCLASS_PREFIX
APPLIED_RULE_MASK, BAD_CLASS_MASK, BAD_PROP_MASK, BAD_PROP_WITH_STACK_MASK, CREATED_MASK, DECL_MASK, DECL_VALUE_MASK, FAILED_CONVERSIONS_MASK, TIME_REPORT_MASK, WARNING_PROP_MASK
Constructor and Description |
---|
IlvMapStyleSheetRenderer()
Creates a style sheet renderer for maps.
|
Modifier and Type | Method and Description |
---|---|
void |
addLinkGraphic(IlvSDMEngine engine,
Object node,
IlvGraphic graphic,
boolean redraw)
Creates a new link map layer if one does not already exist.
|
void |
addNodeGraphic(IlvSDMEngine engine,
Object node,
IlvGraphic graphic,
boolean redraw)
Creates a new symbol map layer if one does not already exist.
|
protected IlvMapLayer |
createLinkMapLayer(IlvManager manager)
Creates a link layer and adds a listener that will remove all symbols if
the layer is removed.
|
protected IlvMapLayer |
createLinkMapLayer(IlvManager manager,
int indexHint)
Creates a link layer and adds a listener that will remove all symbols if
the layer is removed.
|
protected IlvMapLayer |
createSymbolMapLayer(IlvManager manager)
Creates the symbol layer and adds a listener that will remove all symbols
if the layer is removed.
|
protected IlvMapLayer |
createSymbolMapLayer(IlvManager manager,
int indexHint)
Creates the symbol layer and adds a listener that will remove all symbols
if the layer is removed.
|
protected void |
customizeLayers(IlvSDMEngine engine,
Object node,
IlvGraphic g,
String[] pseudoClass)
Changes the layer of the graphic object if needed.
|
protected String |
getLinkLayerName(int indexHint)
Returns the link layer name for that SDM index.
|
IlvMapLayer |
getLinkMapLayer(IlvManager manager)
Tries to find a layer with
LINK_LAYER_NAME in the
IlvMapLayerTreeModel of the manager. |
IlvMapLayer |
getLinkMapLayer(IlvManager manager,
int indexHint)
Tries to find a layer with
LINK_LAYER_NAME in the
IlvMapLayerTreeModel of the manager. |
protected String |
getSymbolLayerName(int indexHint)
Returns the symbol layer name for that SDM index.
|
IlvMapLayer |
getSymbolMapLayer(IlvManager manager)
Tries to find a layer with
SYMBOL_LAYER_NAME in the
IlvMapLayerTreeModel of the manager. |
IlvMapLayer |
getSymbolMapLayer(IlvManager manager,
int indexHint)
Tries to find a layer with
getSymbolLayerName(int) in the
IlvMapLayerTreeModel of the manager. |
addPropertyChangeListener, clear, clear, createLinkGraphic, createLinkInstance, createNode, createNodeGraphic, createNodeInstance, customize, customizeBean, customizeBeanWithDeclarations, flushFromCaches, getBaseTextDirection, getCssClassPropertyName, getCSSEngine, getCSSRules, getDebugGraphicDecls, getDebugMask, getDeclarations, getFunction, getFunctionList, getFunctions, getGraphicProperty, getInstance, getLinkConnectionRectangle, getLinkConnectorMode, getLinksLayer, getNodesLayer, getStyleSheet, getStyleSheetDebugMask, getStyleSheets, getStyleSheets, isAddingLinkConnectors, isLinkConnectorEnabled, isOptimizeRestylingMemoizingDependencies, nodeGraphicBBoxChanged, prepareRendering, printCSS, propertiesChanged, registerFunction, removeAll, removeLinkGraphic, removeNodeGraphic, removePropertyChangeListener, setAddingLinkConnectors, setBaseTextDirection, setCssClassPropertyName, setDebugMask, setEngine, setFunctionList, setFunctions, setLinkConnectorEnabled, setLinkConnectorMode, setLinksLayer, setNodesLayer, setOptimizeRestylingMemoizingDependencies, setStyleSheet, setStyleSheetDebugMask, setStyleSheets, setStyleSheets, unregisterFunction, updateObjectProperties
addViewListeners, callMoveResizeNodeGraphic, computeBBox, convert, convert, getAlias, getAuxiliaryBean, getAuxiliaryBeans, getEncapsulatedGraphic, getEngine, getLinkConnectionRectangle, getLocation, getParameter, linkGraphicAdded, moveResizeNodeGraphic, needsViewListeners, nodeGraphicAdded, processServerAction, propertyChanged, removeViewListeners, renderingDone, setAlias, setLayerName, setParameter
public static final String SYMBOL_LAYER_NAME
public static final String LINK_LAYER_NAME
public IlvMapStyleSheetRenderer()
public IlvMapLayer getLinkMapLayer(IlvManager manager)
LINK_LAYER_NAME
in the
IlvMapLayerTreeModel
of the manager.manager
- The manager to create the map layer for.null
.public IlvMapLayer getLinkMapLayer(IlvManager manager, int indexHint)
LINK_LAYER_NAME
in the
IlvMapLayerTreeModel
of the manager.manager
- The manager to create the map layer for.indexHint
- the index set through CSS for a type of links.null
.public IlvMapLayer getSymbolMapLayer(IlvManager manager)
SYMBOL_LAYER_NAME
in the
IlvMapLayerTreeModel
of the manager.manager
- The manager to create the map layer for.null
.public IlvMapLayer getSymbolMapLayer(IlvManager manager, int indexHint)
getSymbolLayerName(int)
in the
IlvMapLayerTreeModel
of the manager.manager
- The manager to create the map layer for.indexHint
- the index specified through CSS for a type of symbol.null
.protected IlvMapLayer createSymbolMapLayer(IlvManager manager)
manager
- The manager used to add the symbol layer into the
IlvMapLayerTreeModel
of the manager.protected IlvMapLayer createSymbolMapLayer(IlvManager manager, int indexHint)
manager
- The manager used to add the symbol layer into the
IlvMapLayerTreeModel
of the manager.indexHint
- the index specified through CSS for a type of symbol.getSymbolLayerName(int)
protected String getSymbolLayerName(int indexHint)
SYMBOL_LAYER_NAME
when the hint is unspecified or will concatenate the index if it is set.indexHint
- the index specified through CSS for a type of symbol.protected IlvMapLayer createLinkMapLayer(IlvManager manager)
manager
- The manager used to add the symbol layer into the
IlvMapLayerTreeModel
of the manager.protected IlvMapLayer createLinkMapLayer(IlvManager manager, int indexHint)
manager
- The manager used to add the symbol layer into the
IlvMapLayerTreeModel
of the manager.indexHint
- the index specified through CSS for a type of link.protected String getLinkLayerName(int indexHint)
LINK_LAYER_NAME
when the hint is unspecified or will concatenate the index if it is set.indexHint
- the index specified through CSS for a type of link.protected void customizeLayers(IlvSDMEngine engine, Object node, IlvGraphic g, String[] pseudoClass)
customizeLayers
in class IlvStyleSheetRenderer
engine
- The engine.node
- The node.g
- The graphic object.pseudoClass
- the pseudo classes.public void addNodeGraphic(IlvSDMEngine engine, Object node, IlvGraphic graphic, boolean redraw)
addNodeGraphic
in class IlvStyleSheetRenderer
engine
- The rendering engine.node
- The symbol to add to the layer.graphic
- The graphic to add.redraw
- Set to true
to redraw.IlvStyleSheetRenderer.addNodeGraphic(ilog.views.sdm.IlvSDMEngine,
java.lang.Object, ilog.views.IlvGraphic, boolean)
public void addLinkGraphic(IlvSDMEngine engine, Object node, IlvGraphic graphic, boolean redraw)
addLinkGraphic
in class IlvStyleSheetRenderer
engine
- The rendering engine.node
- The link to add to the layer.graphic
- The graphic to add.redraw
- Set to true
to redraw.IlvStyleSheetRenderer.addLinkGraphic(ilog.views.sdm.IlvSDMEngine, java.lang.Object, ilog.views.IlvGraphic, boolean)
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.