public class Style extends SimpleScriptable implements Cloneable
Modifier and Type | Field and Description |
---|---|
static short |
WRITE_MODE_DO_NOT_UPDATE_ELEMENT
Write mode which indicates that changes to this object are allowed, but should not write
through to the element to which it belongs.
|
static short |
WRITE_MODE_NOT_WRITEABLE
Write mode which indicates that changes to this object are not allowed.
|
static short |
WRITE_MODE_UPDATE_ELEMENT
Write mode which indicates that all changes to this object write through to the element to
which it belongs.
|
Constructor and Description |
---|
Style()
Create an instance.
|
Modifier and Type | Method and Description |
---|---|
protected String |
getStyleAttribute(String name,
boolean camelCase)
Returns the named style attribute value.
|
protected Object |
getWithPreemption(String name)
Called by
SimpleScriptable.get(String, Scriptable) to allow retrieval of the property before the prototype
chain is searched. |
String |
jsxFunction_getPropertyValue(String name)
Gets the value of the specified property of the style.
|
boolean |
jsxFunction_removeExpression(String propertyName)
Removes the expression from the specified property.
|
void |
jsxFunction_setExpression(String propertyName,
String expression,
String language)
Sets an expression for the specified Style.
|
String |
jsxGet_behavior()
Gets the object's behavior (IE only).
|
String |
jsxGet_filter()
Gets the object's filter (IE only).
|
void |
jsxSet_behavior(String behavior)
Sets the object's behavior (IE only).
|
void |
jsxSet_filter(String filter)
Sets the object's filter (IE only).
|
void |
put(String name,
org.mozilla.javascript.Scriptable start,
Object newValue)
Set the specified property.
|
protected void |
setStyleAttribute(String name,
String newValue)
Sets the specified style attribute.
|
get, getBooleanArg, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getIntArg, getLog, getObjectArg, getPrototype, getScriptableFor, getStartingScope, getStringArg, getTransformerScriptableFor, getWindow, getWindow, makeScriptableFor, setDomNode, setDomNode, setHtmlElement
associateValue, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, equivalentValues, get, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, has, has, hasInstance, hasProperty, hasProperty, isConst, isSealed, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype
public static final short WRITE_MODE_UPDATE_ELEMENT
public static final short WRITE_MODE_DO_NOT_UPDATE_ELEMENT
public static final short WRITE_MODE_NOT_WRITEABLE
public Style()
protected Object getWithPreemption(String name)
Called by SimpleScriptable.get(String, Scriptable)
to allow retrieval of the property before the prototype
chain is searched.
IMPORTANT: This method is invoked *very* often by Rhino. If you override this method, the implementation needs to be as fast as possible!
getWithPreemption
in class SimpleScriptable
name
- the property nameScriptable.NOT_FOUND
if not foundprotected String getStyleAttribute(String name, boolean camelCase)
name
- the style attribute namecamelCase
- whether or not the name is expected to be in camel casepublic void put(String name, org.mozilla.javascript.Scriptable start, Object newValue)
put
in interface org.mozilla.javascript.Scriptable
put
in class org.mozilla.javascript.ScriptableObject
name
- The name of the propertystart
- The scriptable object that was originally invoked for this propertynewValue
- The new valueprotected void setStyleAttribute(String name, String newValue)
name
- the attribute namenewValue
- the attribute valuepublic String jsxGet_behavior()
public void jsxSet_behavior(String behavior)
behavior
- the new behaviorpublic String jsxGet_filter()
public void jsxSet_filter(String filter)
filter
- the new filterpublic String jsxFunction_getPropertyValue(String name)
name
- the style property namepublic void jsxFunction_setExpression(String propertyName, String expression, String language)
propertyName
- Specifies the name of the property to which expression is added.expression
- specifies any valid script statement without quotations or semicolons.
This string can include references to other properties on the current page.
Array references are not allowed on object properties included in this script.language
- specified the language used.public boolean jsxFunction_removeExpression(String propertyName)
propertyName
- Specifies the name of the property from which to remove an expression.Copyright © 2002-2012 Gargoyle Software Inc.. All Rights Reserved.