|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.steadystate.css.dom.CSSStyleSheetImpl
public class CSSStyleSheetImpl
TODO: Setting the media list
| Field Summary | |
|---|---|
static java.lang.String |
KEY_DISABLED_CHANGED
|
| Constructor Summary | |
|---|---|
CSSStyleSheetImpl()
|
|
| Method Summary | |
|---|---|
void |
deleteRule(int index)
Used to delete a rule from the style sheet. |
CSSRuleList |
getCssRules()
The list of all CSS rules contained within the style sheet. |
boolean |
getDisabled()
false if the style sheet is applied to the document. |
java.lang.String |
getHref()
If the style sheet is a linked style sheet, the value of its attribute is its location. |
MediaList |
getMedia()
The intended destination media for style information. |
org.w3c.dom.Node |
getOwnerNode()
The node that associates this style sheet with the document. |
CSSRule |
getOwnerRule()
If this style sheet comes from an @import rule, the
ownerRule attribute will contain the
CSSImportRule. |
StyleSheet |
getParentStyleSheet()
For style sheet languages that support the concept of style sheet inclusion, this attribute represents the including style sheet, if one exists. |
java.lang.String |
getTitle()
The advisory title. |
java.lang.String |
getType()
This specifies the style sheet language for this style sheet. |
int |
insertRule(java.lang.String rule,
int index)
Used to insert a new rule into the style sheet. |
boolean |
isReadOnly()
|
void |
setDisabled(boolean disabled)
We will need to respond more fully if a stylesheet is disabled, probably by generating an event for the main application. |
void |
setDisabledOnly(boolean disabled)
|
void |
setHref(java.lang.String href)
|
void |
setMedia(java.lang.String mediaText)
|
void |
setOwnerNode(org.w3c.dom.Node ownerNode)
|
void |
setOwnerRule(CSSRule ownerRule)
|
void |
setParentStyleSheet(StyleSheet parentStyleSheet)
|
void |
setReadOnly(boolean b)
|
void |
setRuleList(CSSRuleListImpl rules)
|
void |
setTitle(java.lang.String title)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String KEY_DISABLED_CHANGED
| Constructor Detail |
|---|
public CSSStyleSheetImpl()
| Method Detail |
|---|
public java.lang.String getType()
StyleSheetownerNode. Also see the type attribute definition for
the LINK element in HTML 4.0, and the type
pseudo-attribute for the XML style sheet processing instruction.
getType in interface StyleSheetpublic boolean getDisabled()
StyleSheetfalse if the style sheet is applied to the document.
true if it is not. Modifying this attribute may cause a
new resolution of style for the document. A stylesheet only applies
if both an appropriate medium definition is present and the disabled
attribute is false. So, if the media doesn't apply to the current
user agent, the disabled attribute is ignored.
getDisabled in interface StyleSheetpublic void setDisabled(boolean disabled)
setDisabled in interface StyleSheetpublic void setDisabledOnly(boolean disabled)
public org.w3c.dom.Node getOwnerNode()
StyleSheetLINK or STYLE
element. For XML, it may be the linking processing instruction. For
style sheets that are included by other style sheets, the value of
this attribute is null.
getOwnerNode in interface StyleSheetpublic StyleSheet getParentStyleSheet()
StyleSheetnull.
getParentStyleSheet in interface StyleSheetpublic java.lang.String getHref()
StyleSheetnull. See the href attribute definition for the
LINK element in HTML 4.0, and the href pseudo-attribute
for the XML style sheet processing instruction.
getHref in interface StyleSheetpublic java.lang.String getTitle()
StyleSheetownerNode. See the title attribute definition for the
LINK element in HTML 4.0, and the title pseudo-attribute
for the XML style sheet processing instruction.
getTitle in interface StyleSheetpublic MediaList getMedia()
StyleSheetownerNode. If no media has been
specified, the MediaList will be empty. See the media
attribute definition for the LINK element in HTML 4.0,
and the media pseudo-attribute for the XML style sheet processing
instruction . Modifying the media list may cause a change to the
attribute disabled.
getMedia in interface StyleSheetpublic CSSRule getOwnerRule()
CSSStyleSheet@import rule, the
ownerRule attribute will contain the
CSSImportRule. In that case, the ownerNode
attribute in the StyleSheet interface will be
null. If the style sheet comes from an element or a
processing instruction, the ownerRule attribute will be
null and the ownerNode attribute will
contain the Node.
getOwnerRule in interface CSSStyleSheetpublic CSSRuleList getCssRules()
CSSStyleSheet
getCssRules in interface CSSStyleSheet
public int insertRule(java.lang.String rule,
int index)
throws org.w3c.dom.DOMException
CSSStyleSheet
insertRule in interface CSSStyleSheetrule - The parsable text representing the rule. For rule sets
this contains both the selector and the style declaration. For
at-rules, this specifies both the at-identifier and the rule
content.index - The index within the style sheet's rule list of the rule
before which to insert the specified rule. If the specified index
is equal to the length of the style sheet's rule collection, the
rule will be added to the end of the style sheet.
org.w3c.dom.DOMException - HIERARCHY_REQUEST_ERR: Raised if the rule cannot be inserted at the
specified index e.g. if an @import rule is inserted
after a standard rule set or other at-rule.
public void deleteRule(int index)
throws org.w3c.dom.DOMException
CSSStyleSheet
deleteRule in interface CSSStyleSheetindex - The index within the style sheet's rule list of the rule
to remove.
org.w3c.dom.DOMException - INDEX_SIZE_ERR: Raised if the specified index does not correspond to
a rule in the style sheet's rule list.
public boolean isReadOnly()
public void setReadOnly(boolean b)
public void setOwnerNode(org.w3c.dom.Node ownerNode)
public void setParentStyleSheet(StyleSheet parentStyleSheet)
public void setHref(java.lang.String href)
public void setTitle(java.lang.String title)
public void setMedia(java.lang.String mediaText)
public void setOwnerRule(CSSRule ownerRule)
public void setRuleList(CSSRuleListImpl rules)
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||