public class IlvCSSJViews
extends ilog.views.util.cssbeans.IlvCSSBeans
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.
Modifier and Type | Class and Description |
---|---|
static class |
IlvCSSJViews.ConvertWithBGO
Converter is improved with BGO specific processing
|
ilog.views.util.cssbeans.IlvCSSBeans.AppliedDeclarationHook, ilog.views.util.cssbeans.IlvCSSBeans.AttributeRuntimeAccess, ilog.views.util.cssbeans.IlvCSSBeans.CastFunction, ilog.views.util.cssbeans.IlvCSSBeans.Concat, ilog.views.util.cssbeans.IlvCSSBeans.DoubleExpr, ilog.views.util.cssbeans.IlvCSSBeans.FloatExpr, ilog.views.util.cssbeans.IlvCSSBeans.IntegerExpr, ilog.views.util.cssbeans.IlvCSSBeans.InvokeConstructorFunction, ilog.views.util.cssbeans.IlvCSSBeans.InvokeFunction, ilog.views.util.cssbeans.IlvCSSBeans.InvokeStaticFunction, ilog.views.util.cssbeans.IlvCSSBeans.LongExpr, ilog.views.util.cssbeans.IlvCSSBeans.SingletonModel
Modifier and Type | Field and Description |
---|---|
static int |
ACTUAL_LOCATION_MASK
Debug mask: shows node actual location (bbox centered).
|
__TypeRefersToCSSModel, _convert, BEAN_PARAMETER, CANCEL, CANCEL_PROP, CLASS_PARAMETER, CSS_COMPONENT_ORIENTATION, CSS_ID, CSS_LOCALE, 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_METAINFO_TYPE, SYMBOL_PARAMETER_TYPE, SYMBOL_RESOURCE, SYMBOL_RESOURCE_PREFIX, USE_COMPILED_SYMBOL, VALUE_PARAMETER, VARIABLES_RULE_NAME
_debug, _engineInitialized, _error, _lastPseudos, _matchCache, _recursive, OPTIMIZE_RESTYLING_MEMOIZING_DEPENDENCIES, supportUnicodeEscapesInStrings
MATCHING_DEFERRED, MATCHING_FAILED, MATCHING_OK
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 |
---|
IlvCSSJViews()
Constructor.
|
IlvCSSJViews(ilog.views.util.css.IlvCSSEngine engine)
Constructor.
|
IlvCSSJViews(Reader css,
URL baseURL)
Constructor.
|
IlvCSSJViews(Reader css,
URL baseURL,
URL[] urlPath)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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)
Deprecated.
Since JViews 8.8, this method is no longer called.
|
protected void |
cacheParamValuesAtExternalBean(Object externalModel,
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 |
convertExternalBeanParameterType(Object bean,
String parameter,
Object value)
Convert the symbol parameter (external bean parameter) to the correct type.
|
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 void |
registerExternalBeanSpecification(String symbolPath,
String symbolName,
String palette,
String symbol,
ClassLoader loader)
This method allows to remember the critical information about the
current symbol as early as possible, before the symbol is created.
|
protected static void |
storeFactoryType(String factoryName,
Class<?> created)
Records which class of
IlvGraphic the IlvRectangularObjectFactory
has generated. |
addExternalBeanClassLoader, addInit, applyDeclarations, applyDeclarations, callCSSFunction, callExpression, clear, clearShared, clearShared, collectSubobjectIds, collectUsedAttributeNames, collectUsedAttributeNames, computeAttributeNameValue, computeValue, convertDeclarationsForEvaluation, convertDeclarationsForPublic, convertExternalCSSParameterDefaultFromString, convertExternalCSSParameterDefaultToString, createBean, createBean, createBean, createBeanAndApplyDeclarations, createBeanAndApplyDeclarations, createBeanAndApplyDeclarations, createBeanAndApplyDeclarationsImpl, createDOMImplementation, createSingletonCSSModel, evaluateAttributeSelector, getAllFunctions, getAppliedDeclarationHook, getBeanClass, getBeanState, getClassLoader, getCssClassPropertyName, getDebugMask, getDeclarationValue, getDefaultFunctions, 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
addPropertyChangeListener, clear, createApplicableRuleList, debug, getBaseURL, getBaseURLPath, getCSSengine, getDebugDeclarations, getDebugHandler, getDebugRules, getDeclarations, getDeclarations, getDOMImplementation, getMatchedRules, getStyleSheet, getStyleSheetDebugMask, getStyleSheets, getStyleSheets, getUsedAttributeNames, getUsedAttributeNamesInHierarchicalSelectors, hasHierarchicalSelectors, isDebugging, printCSS, printCSS, removePropertyChangeListener, setBaseURLPath, setDebugHandler, setEmptyStyleSheet, setStyleSheet, setStyleSheetDebugMask, setStyleSheets, setStyleSheets, setStyleSheets, traceException
public static final int ACTUAL_LOCATION_MASK
public IlvCSSJViews()
public IlvCSSJViews(Reader css, URL baseURL) throws IlvStylingException
css
- A source that contains the CSS. It is consumed by this method,
but has to be closed by the caller.baseURL
- IlvStylingException
public IlvCSSJViews(Reader css, URL baseURL, URL[] urlPath) throws IlvStylingException
css
- A source that contains the CSS. It is consumed by this method,
but has to be closed by the caller.baseURL
- urlPath
- IlvStylingException
public IlvCSSJViews(ilog.views.util.css.IlvCSSEngine engine)
engine
- 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.IlvCSSBeans
model
- 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.IlvCSSBeans
decls
- 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.IlvCSSBeans
model
- 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.IlvCSSBeans
This methods is called also to make the prototype from the first instance created.
copyExternalBean
in class ilog.views.util.cssbeans.IlvCSSBeans
prototype
- the symbolin
- true if storing the prototype into the cacheprotected 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 IlvGraphic
s 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 registerExternalBeanSpecification(String symbolPath, String symbolName, String palette, String symbol, ClassLoader loader)
registerExternalBeanSpecification
in class ilog.views.util.cssbeans.IlvCSSBeans
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.
Since JViews 8.8.@Deprecated protected void cacheParamValuesAtExternalBean(Object bean, Map params, String symbolPath, String symbolName, String palette, String symbol, ClassLoader loader, boolean created)
bean
- 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 void cacheParamValuesAtExternalBean(Object externalModel, Object bean, Map params, String symbolPath, String symbolName, String palette, String symbol, ClassLoader loader, boolean created)
cacheParamValuesAtExternalBean
in class ilog.views.util.cssbeans.IlvCSSBeans
externalModel
- The CSS model representing the symbol.bean
- 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.IlvCSSBeans
bean
- the bean if it exists already.classDecl
- the class declarationprotected Object convertExternalBeanParameterType(Object bean, String parameter, Object value)
convertExternalBeanParameterType
in class ilog.views.util.cssbeans.IlvCSSBeans
bean
- The bean to be customizedparameter
- The symbol parametervalue
- The symbol value© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.