|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.util.css.IlvCSS
ilog.views.util.cssbeans.IlvCSSBeans
ilog.views.sdm.util.IlvCSSJViews
public class IlvCSSJViews
This subclass of IlvCSSBeans provides access to JViews objects. In addition to the beans processing
coming from the superclass, it can create and customize IlvGraphic objects like BGO and links.
Note that createBean() cannot create a link by itself. The user should call createLink(ilog.views.IlvGraphic, ilog.views.IlvGraphic, ilog.views.util.css.IlvApplicableDeclarationCollection)
directly.
| Nested Class Summary | |
|---|---|
static class |
IlvCSSJViews.ConvertWithBGO
Converter is improved with BGO specific processing |
| Nested classes/interfaces inherited from class ilog.views.util.cssbeans.IlvCSSBeans |
|---|
ilog.views.util.cssbeans.IlvCSSBeans.AppliedDeclarationHook, ilog.views.util.cssbeans.IlvCSSBeans.AttributeRuntimeAccess, ilog.views.util.cssbeans.IlvCSSBeans.SingletonModel |
| Field Summary | |
|---|---|
static int |
ACTUAL_LOCATION_MASK
Debug mask: shows node actual location (bbox centered). |
| Fields inherited from class ilog.views.util.cssbeans.IlvCSSBeans |
|---|
__IdRefersToCSSModel, __TypeRefersToCSSModel, _convert, BEAN_PARAMETER, CANCEL, CANCEL_PROP, CLASS_PARAMETER, CSS_ID, CSS_TYPE, ENGINE_PARAMETER, EXCEPTION_PARAMETER, EXPR, MODEL, MODEL_PROPERTY_PARAMETER, NEW, NO_AT, NO_VALUE, OBJECT_PARAMETER, OBJECT_TYPE_PARAMETER, PROPERTY_PARAMETER, RESULT_PARAMETER, REUSE, RULE_PARAMETER, RULE_SELECTOR_PARAMETER, SHARE, SUBOBJECT_TYPE, SYMBOL_RESOURCE_PREFIX, VALUE_PARAMETER, VARIABLES_RULE_NAME |
| Fields inherited from class ilog.views.util.css.IlvCSS |
|---|
_debug, _engineInitialized, _error, _lastPseudos, _matchCache, _recursive |
| Fields inherited from interface ilog.views.util.css.IlvCSSEngine.AttributeHandler |
|---|
MATCHING_DEFERRED, MATCHING_FAILED, MATCHING_OK |
| Fields inherited from interface ilog.views.util.styling.IlvStylable |
|---|
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 Summary | |
|---|---|
IlvCSSJViews()
|
|
IlvCSSJViews(ilog.views.util.css.IlvCSSEngine engine)
|
|
IlvCSSJViews(Reader css,
URL baseURL)
|
|
IlvCSSJViews(Reader css,
URL baseURL,
URL[] urlPath)
|
|
| Method Summary | |
|---|---|
protected boolean |
applyDeclarationsImpl(ilog.views.util.css.IlvCSSModel model,
Object node,
Object g,
ilog.views.util.css.IlvApplicableDeclarationCollection decls,
String[] pseudos,
ilog.views.util.cssbeans.IlvApplicableDeclarationsStatus status,
Collection<String> used)
Overrides applyDeclarations to customize BGO as well. |
protected void |
cacheParamValuesAtExternalBean(Object bean,
Map params,
String symbolPath,
String symbolName,
String palette,
String symbol,
ClassLoader loader,
boolean created)
This method allows to cache the current values of the parameters of an external bean at the bean. |
protected Object |
copyExternalBean(Object prototype,
boolean in)
Returns a copy of the given symbol prototype. |
protected Object |
createBeanImpl(ilog.views.util.css.IlvCSSModel model,
Object node,
boolean required,
ilog.views.util.css.IlvApplicableDeclarationCollection decls,
ilog.views.util.cssbeans.IlvApplicableDeclarationsStatus status,
Collection<String> consumed)
Creates a bean, according to the model and the style sheet declarations. |
IlvGraphic |
createLink(IlvGraphic from,
IlvGraphic to,
ilog.views.util.css.IlvApplicableDeclarationCollection decls)
Creates a link instance according to the given declarations. |
protected boolean |
doCreate(ilog.views.util.css.IlvApplicableDeclarationCollection decls,
Object bean)
Returns true if the bean class name is different from the class requested in
the CSS declaration. |
protected boolean |
isExternalBean(Object bean,
String classDecl)
Returns true iff the class declaration refers to a bean defined in external CSS and resources (aka "symbol"). |
protected void |
prepareExternalBean(Object symbol,
String symbolPath)
Called just before external bean is customized (not when created). |
protected static Class |
queryFactoryType(String factoryName)
Queries the class generated by the IlvRectangularObjectFactory. |
protected static void |
storeFactoryType(String factoryName,
Class created)
Records which class of IlvGraphic the IlvRectangularObjectFactory
has generated. |
| Methods inherited from class ilog.views.util.cssbeans.IlvCSSBeans |
|---|
addExternalBeanClassLoader, addInit, applyDeclarations, applyDeclarations, callExpression, clear, clearShared, clearShared, collectSubobjectIds, computeAttributeNameValue, computeValue, convertDeclarationsForEvaluation, convertDeclarationsForPublic, createBean, createBean, createBean, createBeanAndApplyDeclarations, createBeanAndApplyDeclarations, createBeanAndApplyDeclarations, createBeanAndApplyDeclarationsImpl, createDOMImplementation, createSingletonCSSModel, evaluateAttributeSelector, getAllFunctions, getAppliedDeclarationHook, getBeanClass, getBeanState, getClassLoader, getCssClassPropertyName, getCurrentCSSElement, getCurrentCSSModel, getDebugMask, getDeclarationValue, getDOMImplementationDuringConstructor, getExternalBeanClassLoaders, getFunction, getFunctionClosure, getFunctionList, getInitPseudoClass, getInstance, getModelValue, getPropertyClass, getSymbolDeclarations, handleMissingSymbol, instantiate, isClearExternalContext, isLoggingEnabled, isProcessingSymbol, isUsingBeanState, migrateTo81, refreshVariables, registerBeanClass, registerFunction, removeExternalBeanClassLoader, rulesChanged, setAppliedDeclarationHook, setBeanInfoFlags, setClassLoader, setClearExternalContext, setCssClassPropertyName, setDebugMask, setFunctionClosure, setFunctionList, setInitPseudoClass, setLoggingEnabled, setStyleSheetsImpl, setterInvoke, setUsingBeanState, unregisterAllFunction, unregisterFunction, unsetBeanInfoFlags, usesModelAttributes, usesModelAttributes, usesModelAttributes, usesModelAttributes, valueCode |
| Methods inherited from class ilog.views.util.css.IlvCSS |
|---|
addPropertyChangeListener, clear, createApplicableRuleList, debug, getBaseURL, getBaseURLPath, getCSSengine, getDebugDeclarations, getDebugRules, getDeclarations, getDeclarations, getDOMImplementation, getMatchedRules, getStyleSheet, getStyleSheetDebugMask, getStyleSheets, getStyleSheets, hasHierarchicalSelectors, printCSS, printCSS, removePropertyChangeListener, setBaseURLPath, setEmptyStyleSheet, setStyleSheet, setStyleSheetDebugMask, setStyleSheets, setStyleSheets, traceException |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int ACTUAL_LOCATION_MASK
| Constructor Detail |
|---|
public IlvCSSJViews()
public IlvCSSJViews(Reader css,
URL baseURL)
throws IlvStylingException
css - baseURL -
IlvStylingException
public IlvCSSJViews(Reader css,
URL baseURL,
URL[] urlPath)
throws IlvStylingException
css - baseURL - urlPath -
IlvStylingExceptionpublic IlvCSSJViews(ilog.views.util.css.IlvCSSEngine engine)
engine - | Method Detail |
|---|
protected Object createBeanImpl(ilog.views.util.css.IlvCSSModel model,
Object node,
boolean required,
ilog.views.util.css.IlvApplicableDeclarationCollection decls,
ilog.views.util.cssbeans.IlvApplicableDeclarationsStatus status,
Collection<String> consumed)
throws ClassNotFoundException,
InstantiationException,
IllegalAccessException,
IOException,
InvocationTargetException
class
attribute from the CSS, loads the class from this name with the
system class loader, and returns a new instance of this class
using the constructor with an empty argument list.
If the class name contains '#', the
remainder of the name is a prototype URL. This method will then
load the prototype and return an IlvGraphicGroup
instance.
If the class implements
IlvRectangularObjectFactory, a
declaration IlvRect is searched for to provide the factory's
createObject() method
with the initial rectangle.
The exceptions that may be thrown are explained in
Class.forName(java.lang.String) and Class.newInstance().
createBeanImpl in class ilog.views.util.cssbeans.IlvCSSBeansmodel - The CSS model.node - The model node against which the declarations were matched.required - Whether the caller expects a non-null return
value. If true, the method warns when a new bean cannot be
created due to missing declarations.decls - The declaration collection.status - An object telling which declarations among decls have been
applied so far.consumed - If non-null, will contain all the declarations used to create the
bean (that is, constructor parameters, if any).
null if it could not be
created.
ClassNotFoundException - The class name specified by the class
declaration cannot be found.
InstantiationException - The bean cannot be instantiated.
IllegalAccessException - The bean cannot be instantiated.
IOException - The bean cannot be instantiated.
InvocationTargetException - An error occurred during the invocation of the constructor.
IllegalArgumentException - The class declaration is not correct.
protected static void storeFactoryType(String factoryName,
Class created)
IlvGraphic the IlvRectangularObjectFactory
has generated. Obviously this assumes the factory always generates the same class of IlvGraphic.
factoryName - The name of the factory.created - The generated class.queryFactoryType(java.lang.String)protected static Class queryFactoryType(String factoryName)
IlvRectangularObjectFactory.
factoryName - The name of the factory.
storeFactoryType(java.lang.String, java.lang.Class)
protected boolean doCreate(ilog.views.util.css.IlvApplicableDeclarationCollection decls,
Object bean)
true if the bean class name is different from the class requested in
the CSS declaration. This method is called to resolve the '@+' construct. If the bean was created by a
factory, the factory class is taken instead of the bean class.
doCreate in class ilog.views.util.cssbeans.IlvCSSBeansdecls - The CSS declarations.bean - The existing bean (cannot be null).
true if the bean class name or its factory name is different from the "class" value.
protected boolean applyDeclarationsImpl(ilog.views.util.css.IlvCSSModel model,
Object node,
Object g,
ilog.views.util.css.IlvApplicableDeclarationCollection decls,
String[] pseudos,
ilog.views.util.cssbeans.IlvApplicableDeclarationsStatus status,
Collection<String> used)
applyDeclarations to customize BGO as well.
applyDeclarationsImpl in class ilog.views.util.cssbeans.IlvCSSBeansmodel - The model.node - The model object.g - The bean to customize.decls - The declarations to apply on the given bean, as
returned by IlvCSS.getDeclarations(IlvCSSModel, Object, Object,
String[]). Some of them may be marked "consumed"; this allows to avoid
setting properties that have already been specified as constructor
arguments.pseudos - The pseudos class currently defined (used for @# constructs).status - An object telling which declarations among decls have been
applied so far.used - if non null, the customization won't touch the
properties whose names are present in the collection. When the
method completes, the collection will be augmented with the
property names that were used to customize the bean.
This parameter is used to avoid replacing values that have been set
through the API in the jviews-table module.
true if something has changed.
protected Object copyExternalBean(Object prototype,
boolean in)
ilog.views.util.cssbeans.IlvCSSBeansThis methods is called also to make the prototype from the first instance created.
copyExternalBean in class ilog.views.util.cssbeans.IlvCSSBeansprototype - the symbolin - true if storing the prototype into the cache
protected void prepareExternalBean(Object symbol,
String symbolPath)
ilog.views.util.cssbeans.IlvCSSBeans
prepareExternalBean in class ilog.views.util.cssbeans.IlvCSSBeans
public IlvGraphic createLink(IlvGraphic from,
IlvGraphic to,
ilog.views.util.css.IlvApplicableDeclarationCollection decls)
throws ClassNotFoundException,
InstantiationException,
IllegalAccessException,
NoSuchMethodException,
InvocationTargetException
IlvLinkImage.
The constructor with two IlvGraphics and a boolean
(oriented property, false) as arguments will be used to create the link.
The exceptions that may be thrown are explained in
Class, methods forName(), getDeclaredConstructor(),
and newInstance()
from - The source graphic.to - The destination graphic.decls - the applicable declarations from the CSS.
ClassNotFoundException
InstantiationException
IllegalAccessException
NoSuchMethodException
InvocationTargetException
protected void cacheParamValuesAtExternalBean(Object bean,
Map params,
String symbolPath,
String symbolName,
String palette,
String symbol,
ClassLoader loader,
boolean created)
cacheParamValuesAtExternalBean in class ilog.views.util.cssbeans.IlvCSSBeansbean - The bean.params - The parameters. The parameter name are the keys.symbolPath - The path the the css file of the symbol.symbolName - The name of the CSS file of the symbol.palette - An identifier for the palette. Can be null.symbol - An identifier for the symbol. Can be null.loader - The class loader the found the definition of the symbol. Can
be null.created - true if the bean is just created. Otherwise, it is customized only.
protected boolean isExternalBean(Object bean,
String classDecl)
isExternalBean in class ilog.views.util.cssbeans.IlvCSSBeansbean - the bean if it exists already.classDecl - the class declaration
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||