echopointng.command
Class CssStyleApplyTo
java.lang.Object
echopointng.command.CssStyleApplyTo
- All Implemented Interfaces:
- Command
public class CssStyleApplyTo
- extends java.lang.Object
- implements Command
CssStyleApplyTo is used to apply a given CSS className
to the XHTML of a specified targetComponent.
You must add the CSS style declaration to the application instance first
using something like a CssStyleAdd or
CssStyleSheetAdd command.
For example:
ContainerEx containerEx = new ContainerEx();
parent.add(containerEx);
...
...
appInstance.enqueueCommand(
new CssStyleAdd(" div.whizoStyle { color : red; } "));
appInstance.enqueueCommand(
new CssStyleApplyTo("whizoStyle",containerEx);
|
Constructor Summary |
CssStyleApplyTo(java.lang.String className,
Component targetComponent)
Constructs a CssStyleApplyTo Command that will
apply a the given className to the components top level XHTML. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CssStyleApplyTo
public CssStyleApplyTo(java.lang.String className,
Component targetComponent)
- Constructs a
CssStyleApplyTo Command that will
apply a the given className to the components top level XHTML.
The className setting is appended to the client elements' current className
(its not replaced).
So if the specified className is "whizoStyle" and the current className
on the component XHTML is "swishoStyle" you will end up with a combined
class name of "whizoStyle swishoStyle".
- Parameters:
className - -
the CSS className to usetargetComponent - -
the targetComponent to apply this to on the client
getClassName
public java.lang.String getClassName()
- Returns:
- Returns the className.
getTargetComponent
public Component getTargetComponent()
- Returns:
- Returns the targetComponent.