|
||||||||||
![]() |
FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--ilog.views.sdm.renderer.IlvRendererUtil
The class IlvRendererUtil defines a set
of static utility methods that help implement and manage SDM
renderers.
| Field Summary | |
static String |
Animation
The alias "Animation" for the class ilog.views.sdm.renderer.animation.IlvAnimationRenderer. |
static String |
Coloring
The alias "Coloring" for the class ilog.views.sdm.renderer.IlvColoringRenderer. |
static String |
Decoration
The alias "Decoration" for the class ilog.views.sdm.renderer.IlvDecorationRenderer. |
static String |
DrillDown
The alias "DrillDown" for the class ilog.views.sdm.renderer.IlvDrillDownRenderer. |
static String |
ExpandCollapse
The alias "ExpandCollapse" for the class ilog.views.sdm.renderer.IlvSubGraphRenderer. |
static String |
ExpandCollapse40
The alias "ExpandCollapse40" for the class ilog.views.sdm.renderer.IlvExpandCollapseRenderer. |
static String |
GrapherPin
The alias "GrapherPin" for the class ilog.views.sdm.renderer.IlvGrapherPinRenderer. |
static String |
GraphLayout
The alias "GraphLayout" for the class ilog.views.sdm.renderer.graphlayout.IlvGraphLayoutRenderer. |
static String |
HalfZooming
The alias "HalfZooming" for the class ilog.views.sdm.renderer.IlvHalfZoomingRenderer. |
static String |
InfoBalloon
The alias "InfoBalloon" for the class ilog.views.sdm.renderer.IlvInfoBalloonRenderer. |
static String |
Interactor
The alias "Interactor" for the class ilog.views.sdm.renderer.IlvInteractorRenderer. |
static String |
LabelLayout
The alias "LabelLayout" for the class ilog.views.sdm.renderer.graphlayout.IlvLabelLayoutRenderer. |
static String |
Legend
The alias "Legend" for the class ilog.views.sdm.renderer.IlvLegendRenderer. |
static String |
LinkLayout
The alias "LinkLayout" for the class ilog.views.sdm.renderer.graphlayout.IlvLinkLayoutRenderer. |
static String |
Map
The alias "Map" for the class ilog.views.sdm.renderer.maps.IlvMapRenderer. |
static String |
StyleSheet
The alias "StyleSheet" for the class ilog.views.sdm.renderer.IlvStyleSheetRenderer. |
static String |
SubGraph
The alias "SubGraph" for the class ilog.views.sdm.renderer.IlvSubGraphRenderer. |
static String |
SwimLanes
The alias "SwimLanes" for the class ilog.views.sdm.renderer.graphlayout.IlvSwimLanesRenderer. |
| Method Summary | |
static void |
addRendererAlias(String alias,
String rendererClassName)
Adds an alias for a renderer class. |
static void |
customize(IlvSDMEngine engine,
Object object,
IlvGraphic g,
String[] pseudoClasses)
This method calls IlvSDMRenderer.customize(ilog.views.sdm.IlvSDMEngine, java.lang.Object, ilog.views.IlvGraphic, java.lang.String[])
on the root renderer of the SDM engine. |
static void |
customize(IlvSDMEngine engine,
Object object,
String[] pseudoClasses,
boolean redraw)
This method is similar to customize(ilog.views.sdm.IlvSDMEngine,java.lang.Object,ilog.views.IlvGraphic,java.lang.String[]),
but instead of specifying the graphic object yourself, the SDM
engine uses the graphic object representing the data object. |
static Object |
getGraphicProperty(IlvSDMEngine engine,
Object object,
String property,
String[] pseudoClasses,
Class targetClass)
This method calls the getGraphicProperty method
of the root renderer attached to the SDM engine. |
static boolean |
getGraphicPropertyAsBoolean(IlvSDMEngine engine,
Object object,
String property,
String[] pseudoClasses,
boolean def)
This method calls getGraphicProperty and converts the result to a Boolean. |
static Color |
getGraphicPropertyAsColor(IlvSDMEngine engine,
Object object,
String property,
String[] pseudoClasses,
Color def)
This method calls getGraphicProperty and converts the result to a Color. |
static double |
getGraphicPropertyAsDouble(IlvSDMEngine engine,
Object object,
String property,
String[] pseudoClasses,
double def)
This method calls getGraphicProperty and converts the result to a double. |
static float |
getGraphicPropertyAsFloat(IlvSDMEngine engine,
Object object,
String property,
String[] pseudoClasses,
float def)
This method calls getGraphicProperty and converts the result to a float. |
static int |
getGraphicPropertyAsInt(IlvSDMEngine engine,
Object object,
String property,
String[] pseudoClasses,
int def)
This method calls getGraphicProperty and converts the result to an int. |
static long |
getGraphicPropertyAsLong(IlvSDMEngine engine,
Object object,
String property,
String[] pseudoClasses,
long def)
This method calls getGraphicProperty and converts the result to a long. |
static String |
getGraphicPropertyAsString(IlvSDMEngine engine,
Object object,
String property,
String[] pseudoClasses,
String def)
This method calls getGraphicProperty and converts the result to a String. |
static IlvPrototype |
getPrototype(String prototypeURL,
Class jarClass)
Loads a prototype from a URL. |
static String[] |
getPseudoClasses(IlvSDMEngine engine,
Object object,
String[] additionalClasses)
Returns the pseudo classes associated with the specified data object, concatenated with the specified additional classes. |
static IlvSDMRenderer |
getRenderer(IlvSDMEngine engine,
String name)
Finds a renderer attached to an SDM engine, starting with the root renderer returned by IlvSDMEngine.getRenderer(),
and going down the chain of filtering renderers to the final
style sheet renderer. |
static String |
getRendererAlias(String className)
Returns the alias of a renderer class from a class name. |
static String[] |
getRendererAliases()
Returns all the renderer aliases registered so far. |
static String |
getRendererClassName(String alias)
Returns the name of a renderer class from an alias. |
static String[] |
getRendererClassNames()
Returns all the renderer class names registered so far. |
static void |
updateObjectProperties(IlvSDMEngine engine,
Object object,
String property,
Object value,
String[] pseudoClasses)
This method calls IlvSDMRenderer.updateObjectProperties(ilog.views.sdm.IlvSDMEngine, java.lang.Object, java.lang.String, java.lang.Object, java.lang.String[])
on the root renderer of the SDM engine. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public static final String Animation
"Animation" for the class ilog.views.sdm.renderer.animation.IlvAnimationRenderer.addRendererAlias(java.lang.String, java.lang.String)public static final String Coloring
"Coloring" for the class ilog.views.sdm.renderer.IlvColoringRenderer.addRendererAlias(java.lang.String, java.lang.String)public static final String Decoration
"Decoration" for the class ilog.views.sdm.renderer.IlvDecorationRenderer.addRendererAlias(java.lang.String, java.lang.String)public static final String ExpandCollapse40
"ExpandCollapse40" for the class ilog.views.sdm.renderer.IlvExpandCollapseRenderer.addRendererAlias(java.lang.String, java.lang.String)public static final String SubGraph
"SubGraph" for the class ilog.views.sdm.renderer.IlvSubGraphRenderer.addRendererAlias(java.lang.String, java.lang.String)public static final String ExpandCollapse
"ExpandCollapse" for the class ilog.views.sdm.renderer.IlvSubGraphRenderer.addRendererAlias(java.lang.String, java.lang.String)public static final String HalfZooming
"HalfZooming" for the class ilog.views.sdm.renderer.IlvHalfZoomingRenderer.addRendererAlias(java.lang.String, java.lang.String)public static final String InfoBalloon
"InfoBalloon" for the class ilog.views.sdm.renderer.IlvInfoBalloonRenderer.addRendererAlias(java.lang.String, java.lang.String)public static final String Legend
"Legend" for the class ilog.views.sdm.renderer.IlvLegendRenderer.addRendererAlias(java.lang.String, java.lang.String)public static final String DrillDown
"DrillDown" for the class ilog.views.sdm.renderer.IlvDrillDownRenderer.addRendererAlias(java.lang.String, java.lang.String)public static final String Map
"Map" for the class ilog.views.sdm.renderer.maps.IlvMapRenderer.addRendererAlias(java.lang.String, java.lang.String)public static final String SwimLanes
"SwimLanes" for the class ilog.views.sdm.renderer.graphlayout.IlvSwimLanesRenderer.addRendererAlias(java.lang.String, java.lang.String)public static final String LabelLayout
"LabelLayout" for the class ilog.views.sdm.renderer.graphlayout.IlvLabelLayoutRenderer.addRendererAlias(java.lang.String, java.lang.String)public static final String LinkLayout
"LinkLayout" for the class ilog.views.sdm.renderer.graphlayout.IlvLinkLayoutRenderer.addRendererAlias(java.lang.String, java.lang.String)public static final String GraphLayout
"GraphLayout" for the class ilog.views.sdm.renderer.graphlayout.IlvGraphLayoutRenderer.addRendererAlias(java.lang.String, java.lang.String)public static final String Interactor
"Interactor" for the class ilog.views.sdm.renderer.IlvInteractorRenderer.addRendererAlias(java.lang.String, java.lang.String)public static final String GrapherPin
"GrapherPin" for the class ilog.views.sdm.renderer.IlvGrapherPinRenderer.addRendererAlias(java.lang.String, java.lang.String)public static final String StyleSheet
"StyleSheet" for the class ilog.views.sdm.renderer.IlvStyleSheetRenderer.addRendererAlias(java.lang.String, java.lang.String)| Method Detail |
public static void addRendererAlias(String alias,
String rendererClassName)
By default, the following aliases are defined:
| Animation | IlvAnimationRenderer |
| Coloring | IlvColoringRenderer |
| Decoration | IlvDecorationRenderer |
| ExpandCollapse40 | IlvExpandCollapseRenderer |
| SubGraph | IlvSubGraphRenderer |
| ExpandCollapse | IlvSubGraphRenderer |
| HalfZooming | IlvHalfZoomingRenderer |
| InfoBalloon | IlvInfoBalloonRenderer |
| Legend | IlvLegendRenderer |
| DrillDown | IlvDrillDownRenderer |
| Map | IlvMapRenderer |
| SwimLanes | IlvSwimLanesRenderer |
| LabelLayout | IlvLabelLayoutRenderer |
| LinkLayout | IlvLinkLayoutRenderer |
| GraphLayout | IlvGraphLayoutRenderer |
| Interactor | IlvInteractorRenderer |
| GrapherPin | IlvGrapherPinRenderer |
| StyleSheet | IlvStyleSheetRenderer |
It is possible to override the definition of a predefined alias. This may
be useful if you want to modify a predefined renderer. All you have to do
is call addRendererAlias with the existing alias name and the
name of the new renderer class. Note, though, that the new class
must be a subclass of the predefined renderer.
The aliases for the predefined renderers are
defined as static strings (for example, StyleSheet, GraphLayout, and so forth).
It is recommended using these static variables to avoid spelling errors.
alias - The alias for the renderer class to add.rendererClassName - The fully qualified name of the renderer class.public static String getRendererClassName(String alias)
alias - The renderer alias.addRendererAlias(java.lang.String, java.lang.String)public static String getRendererAlias(String className)
className - The fully qualified renderer class name.addRendererAlias(java.lang.String, java.lang.String)public static String[] getRendererAliases()
addRendererAlias(java.lang.String, java.lang.String)public static String[] getRendererClassNames()
addRendererAlias(java.lang.String, java.lang.String)
public static IlvSDMRenderer getRenderer(IlvSDMEngine engine,
String name)
IlvSDMEngine.getRenderer(),
and going down the chain of filtering renderers to the final
style sheet renderer. The renderer can be looked up either by its
alias name or by its class name.
Note that, when a renderer is looked up using a class name, only the first renderer whose class is equal to the specified class is returned. This means that if a predefined renderer is redefined with a subclass of the original renderer, this new renderer will not be found. So, it is usually better to query a renderer by its alias name.
The aliases for the predefined renderers are
defined as static strings (for example, StyleSheet, GraphLayout, and so forth).
It is recommended using these static variables to avoid spelling errors.
engine - The SDM engine.name - The alias or the fully qualified class name of the renderer.null if the renderer could not be found.
public static Object getGraphicProperty(IlvSDMEngine engine,
Object object,
String property,
String[] pseudoClasses,
Class targetClass)
getGraphicProperty method
of the root renderer attached to the SDM engine.
engine - The SDM engine.object - The data object.property - The name of the rendering property.pseudoClasses - The pseudo classes of the object. This parameter can be null.targetClass - The target class.
public static String getGraphicPropertyAsString(IlvSDMEngine engine,
Object object,
String property,
String[] pseudoClasses,
String def)
engine - The SDM engine.object - The data object.property - The name of the rendering property.pseudoClasses - The pseudo classes of the object. This parameter can be null.def - A default value to return if the property is not defined.getGraphicProperty(ilog.views.sdm.IlvSDMEngine,java.lang.Object,java.lang.String,java.lang.String[],java.lang.Class)
public static boolean getGraphicPropertyAsBoolean(IlvSDMEngine engine,
Object object,
String property,
String[] pseudoClasses,
boolean def)
engine - The SDM engine.object - The data object.property - The name of the rendering property.pseudoClasses - The pseudo classes of the object. This parameter can be null.def - A default value to return if the property is not defined.
public static int getGraphicPropertyAsInt(IlvSDMEngine engine,
Object object,
String property,
String[] pseudoClasses,
int def)
int.
engine - The SDM engine.object - The data object.property - The name of the rendering property.pseudoClasses - The pseudo classes of the object. This parameter can be null.def - A default value to return if the property is not defined.
public static long getGraphicPropertyAsLong(IlvSDMEngine engine,
Object object,
String property,
String[] pseudoClasses,
long def)
long.
engine - The SDM engine.object - The data object.property - The name of the rendering property.pseudoClasses - The pseudo classes of the object. This parameter
can be null.def - A default value to return if the property is not defined.
public static float getGraphicPropertyAsFloat(IlvSDMEngine engine,
Object object,
String property,
String[] pseudoClasses,
float def)
float.
engine - The SDM engine.object - The data object.property - The name of the rendering property.pseudoClasses - The pseudo classes of the object. This parameter can be null.def - A default value to return if the property is not defined.
public static double getGraphicPropertyAsDouble(IlvSDMEngine engine,
Object object,
String property,
String[] pseudoClasses,
double def)
double.
engine - The SDM engine.object - The data object.property - The name of the rendering property.pseudoClasses - The pseudo classes of the object. This parameter can be null.def - A default value to return if the property is not defined.
public static Color getGraphicPropertyAsColor(IlvSDMEngine engine,
Object object,
String property,
String[] pseudoClasses,
Color def)
Color.
engine - The SDM engine.object - The data object.property - The name of the rendering property.pseudoClasses - The pseudo classes of the object. This parameter can be null.def - A default value to return if the property is not defined.
public static void updateObjectProperties(IlvSDMEngine engine,
Object object,
String property,
Object value,
String[] pseudoClasses)
IlvSDMRenderer.updateObjectProperties(ilog.views.sdm.IlvSDMEngine, java.lang.Object, java.lang.String, java.lang.Object, java.lang.String[])
on the root renderer of the SDM engine.
engine - The SDM engine.object - The data object.property - The name of the rendering property.value - The new value of the property.pseudoClasses - The pseudo classes of the object.
This parameter can be null.IlvSDMRenderer.updateObjectProperties(ilog.views.sdm.IlvSDMEngine, java.lang.Object, java.lang.String, java.lang.Object, java.lang.String[])
public static void customize(IlvSDMEngine engine,
Object object,
IlvGraphic g,
String[] pseudoClasses)
IlvSDMRenderer.customize(ilog.views.sdm.IlvSDMEngine, java.lang.Object, ilog.views.IlvGraphic, java.lang.String[])
on the root renderer of the SDM engine.
This method does not automatically redraw the graphic object.
To do so, call the variant
customize(ilog.views.sdm.IlvSDMEngine,java.lang.Object,java.lang.String[],boolean).
engine - The SDM engine.object - The data object used to compute
the rendering properties to set.g - The graphic object to customize.pseudoClasses - A list of symbolic names that identify
the context in which the graphic object must be customized.
For example, the pseudo class defines the "pseudo-classes"
in the style sheet renderer.
public static void customize(IlvSDMEngine engine,
Object object,
String[] pseudoClasses,
boolean redraw)
customize(ilog.views.sdm.IlvSDMEngine,java.lang.Object,ilog.views.IlvGraphic,java.lang.String[]),
but instead of specifying the graphic object yourself, the SDM
engine uses the graphic object representing the data object.
Another difference is that this method calls IlvManager.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
to automatically update and redraw the manager view.
engine - The SDM engine.object - The data object used to compute
the rendering properties to set.pseudoClasses - A list of symbolic names that identify
the context in which the graphic object must be customized.
For example, the pseudo class defines the "pseudo-classes"
in the style sheet renderer.redraw - Pass true if you want the object to be redrawn.
public static String[] getPseudoClasses(IlvSDMEngine engine,
Object object,
String[] additionalClasses)
engine - The SDM engine.object - The data object.additionalClasses - An array of Strings that identify the
pseudo classes to concatenate with the classes associated
with the object.IlvSDMEngine.addPseudoClass(java.lang.Object, java.lang.String))
and additionalClasses.
public static IlvPrototype getPrototype(String prototypeURL,
Class jarClass)
throws MalformedURLException,
IlvReadFileException,
IOException
IlvPrototypeLibrary.getPrototype(java.lang.String,java.lang.Class).prototypeURL - A string containing the URL of the prototype.jarClass - A class loaded from the JAR file where the prototype library file is located.
|
||||||||||
![]() |
FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||