001: /*
002: * Copyright (c) 2000 World Wide Web Consortium,
003: * (Massachusetts Institute of Technology, Institut National de
004: * Recherche en Informatique et en Automatique, Keio University). All
005: * Rights Reserved. This program is distributed under the W3C's Software
006: * Intellectual Property License. This program is distributed in the
007: * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
008: * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
009: * PURPOSE.
010: * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
011: */
012:
013: package org.w3c.dom.stylesheets;
014:
015: import org.w3c.dom.Node;
016:
017: /**
018: * The <code>StyleSheet</code> interface is the abstract base interface for
019: * any type of style sheet. It represents a single style sheet associated
020: * with a structured document. In HTML, the StyleSheet interface represents
021: * either an external style sheet, included via the HTML LINK element, or
022: * an inline STYLE element. In XML, this interface represents an external
023: * style sheet, included via a style sheet processing instruction.
024: * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>.
025: * @since DOM Level 2
026: */
027: public interface StyleSheet {
028: /**
029: * This specifies the style sheet language for this style sheet. The
030: * style sheet language is specified as a content type (e.g.
031: * "text/css"). The content type is often specified in the
032: * <code>ownerNode</code>. Also see the type attribute definition for
033: * the <code>LINK</code> element in HTML 4.0, and the type
034: * pseudo-attribute for the XML style sheet processing instruction.
035: */
036: public String getType();
037:
038: /**
039: * <code>false</code> if the style sheet is applied to the document.
040: * <code>true</code> if it is not. Modifying this attribute may cause a
041: * new resolution of style for the document. A stylesheet only applies
042: * if both an appropriate medium definition is present and the disabled
043: * attribute is false. So, if the media doesn't apply to the current
044: * user agent, the <code>disabled</code> attribute is ignored.
045: */
046: public boolean getDisabled();
047:
048: /**
049: * <code>false</code> if the style sheet is applied to the document.
050: * <code>true</code> if it is not. Modifying this attribute may cause a
051: * new resolution of style for the document. A stylesheet only applies
052: * if both an appropriate medium definition is present and the disabled
053: * attribute is false. So, if the media doesn't apply to the current
054: * user agent, the <code>disabled</code> attribute is ignored.
055: */
056: public void setDisabled(boolean disabled);
057:
058: /**
059: * The node that associates this style sheet with the document. For HTML,
060: * this may be the corresponding <code>LINK</code> or <code>STYLE</code>
061: * element. For XML, it may be the linking processing instruction. For
062: * style sheets that are included by other style sheets, the value of
063: * this attribute is <code>null</code>.
064: */
065: public Node getOwnerNode();
066:
067: /**
068: * For style sheet languages that support the concept of style sheet
069: * inclusion, this attribute represents the including style sheet, if
070: * one exists. If the style sheet is a top-level style sheet, or the
071: * style sheet language does not support inclusion, the value of this
072: * attribute is <code>null</code>.
073: */
074: public StyleSheet getParentStyleSheet();
075:
076: /**
077: * If the style sheet is a linked style sheet, the value of its attribute
078: * is its location. For inline style sheets, the value of this attribute
079: * is <code>null</code>. See the href attribute definition for the
080: * <code>LINK</code> element in HTML 4.0, and the href pseudo-attribute
081: * for the XML style sheet processing instruction.
082: */
083: public String getHref();
084:
085: /**
086: * The advisory title. The title is often specified in the
087: * <code>ownerNode</code>. See the title attribute definition for the
088: * <code>LINK</code> element in HTML 4.0, and the title pseudo-attribute
089: * for the XML style sheet processing instruction.
090: */
091: public String getTitle();
092:
093: /**
094: * The intended destination media for style information. The media is
095: * often specified in the <code>ownerNode</code>. If no media has been
096: * specified, the <code>MediaList</code> will be empty. See the media
097: * attribute definition for the <code>LINK</code> element in HTML 4.0,
098: * and the media pseudo-attribute for the XML style sheet processing
099: * instruction . Modifying the media list may cause a change to the
100: * attribute <code>disabled</code>.
101: */
102: public MediaList getMedia();
103:
104: }
|