|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Style
The style component used to specify CSS styles for the owner desktop.
Note: a style component can appear anywhere in a ZUML page, but it affects all components in the same desktop.
Note: If isDynamic()
is false, the HTML STYLE or LINK tag is generated
to represent this component. Due to IE's limitation, there is no effect if
the style component is added or removed dynamically and if isDynamic()
is false.
If isDynamic()
is true, this component can be added and removed
dynamically and the rules will be attached and detached accordingly. Note: in
this case, the link is generated when this component is initialized at the
client, so the style will be loaded to the client after all components are
initialized.
There are three formats when used in a ZUML page:
Method 1: Specify the URL of the CSS file
<code><style src="my.css"/> </code>
Method 2: Specify the CSS directly
<code><style> .mycls { border: 1px outset #777; } </style> </code>
Method 3: Specify the CSS by use of the content property (setContent(java.lang.String)
).
<code><style> <attribute name="content"> .mycls { border: 1px outset #777; } </attribute> </style> </code>
Note: if the src and content properties are both set, the content property is ignored.
Method Summary | |
---|---|
java.lang.String |
getContent()
Returns the content of the style element. |
java.lang.String |
getSrc()
Returns the URI of an external style sheet. |
boolean |
isDynamic()
Returns whether to load an external Style Sheet dynamically. |
void |
setContent(java.lang.String content)
Sets the content of the style element. |
void |
setDynamic(boolean dynamic)
Sets whether to load an external Style Sheet dynamically. |
void |
setSrc(java.lang.String src)
Sets the URI of an external style sheet. |
Method Detail |
---|
void setDynamic(boolean dynamic)
Default: false.
isDynamic()
boolean isDynamic()
Due to IE's limitation, there is no effect if the style component is
added or removed dynamically and if isDynamic()
is false.
If isDynamic()
is true, this component can be added and removed
dynamically and the rules will be attached and detached accordingly.
Note: in this case, the HTML LINK tag is generated when this component is
initialized at the client, so the style will be loaded to the client
after all components are initialized.
Default: false.
java.lang.String getSrc()
Default: null.
void setSrc(java.lang.String src)
Calling this method implies setContent(null). In other words, the last
invocation of setSrc(java.lang.String)
overrides the previous setContent(java.lang.String)
,
if any.
src
- the URI of an external style sheetsetContent(java.lang.String)
java.lang.String getContent()
Default: null.
void setContent(java.lang.String content)
Calling this method implies setSrc(null). In other words, the last
invocation of setContent(java.lang.String)
overrides the previous setSrc(java.lang.String)
,
if any.
setSrc(java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |