KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > w3c > dom > stylesheets > StyleSheet


1 /*
2  * Copyright (c) 2000 World Wide Web Consortium,
3  * (Massachusetts Institute of Technology, Institut National de
4  * Recherche en Informatique et en Automatique, Keio University). All
5  * Rights Reserved. This program is distributed under the W3C's Software
6  * Intellectual Property License. This program is distributed in the
7  * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8  * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  * PURPOSE.
10  * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
11  */

12
13 package org.w3c.dom.stylesheets;
14
15 import org.w3c.dom.Node JavaDoc;
16
17 /**
18  * The <code>StyleSheet</code> interface is the abstract base interface for
19  * any type of style sheet. It represents a single style sheet associated
20  * with a structured document. In HTML, the StyleSheet interface represents
21  * either an external style sheet, included via the HTML LINK element, or
22  * an inline STYLE element. In XML, this interface represents an external
23  * style sheet, included via a style sheet processing instruction.
24  * <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>.
25  * @since DOM Level 2
26  */

27 public interface StyleSheet {
28     /**
29      * This specifies the style sheet language for this style sheet. The
30      * style sheet language is specified as a content type (e.g.
31      * "text/css"). The content type is often specified in the
32      * <code>ownerNode</code>. Also see the type attribute definition for
33      * the <code>LINK</code> element in HTML 4.0, and the type
34      * pseudo-attribute for the XML style sheet processing instruction.
35      */

36     public String JavaDoc getType();
37
38     /**
39      * <code>false</code> if the style sheet is applied to the document.
40      * <code>true</code> if it is not. Modifying this attribute may cause a
41      * new resolution of style for the document. A stylesheet only applies
42      * if both an appropriate medium definition is present and the disabled
43      * attribute is false. So, if the media doesn't apply to the current
44      * user agent, the <code>disabled</code> attribute is ignored.
45      */

46     public boolean getDisabled();
47     public void setDisabled(boolean disabled);
48
49     /**
50      * The node that associates this style sheet with the document. For HTML,
51      * this may be the corresponding <code>LINK</code> or <code>STYLE</code>
52      * element. For XML, it may be the linking processing instruction. For
53      * style sheets that are included by other style sheets, the value of
54      * this attribute is <code>null</code>.
55      */

56     public Node JavaDoc getOwnerNode();
57
58     /**
59      * For style sheet languages that support the concept of style sheet
60      * inclusion, this attribute represents the including style sheet, if
61      * one exists. If the style sheet is a top-level style sheet, or the
62      * style sheet language does not support inclusion, the value of this
63      * attribute is <code>null</code>.
64      */

65     public StyleSheet getParentStyleSheet();
66
67     /**
68      * If the style sheet is a linked style sheet, the value of its attribute
69      * is its location. For inline style sheets, the value of this attribute
70      * is <code>null</code>. See the href attribute definition for the
71      * <code>LINK</code> element in HTML 4.0, and the href pseudo-attribute
72      * for the XML style sheet processing instruction.
73      */

74     public String JavaDoc getHref();
75
76     /**
77      * The advisory title. The title is often specified in the
78      * <code>ownerNode</code>. See the title attribute definition for the
79      * <code>LINK</code> element in HTML 4.0, and the title pseudo-attribute
80      * for the XML style sheet processing instruction.
81      */

82     public String JavaDoc getTitle();
83
84     /**
85      * The intended destination media for style information. The media is
86      * often specified in the <code>ownerNode</code>. If no media has been
87      * specified, the <code>MediaList</code> will be empty. See the media
88      * attribute definition for the <code>LINK</code> element in HTML 4.0,
89      * and the media pseudo-attribute for the XML style sheet processing
90      * instruction . Modifying the media list may cause a change to the
91      * attribute <code>disabled</code>.
92      */

93     public MediaList getMedia();
94
95 }
96
Popular Tags