Source for 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;
  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 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:     /**
  48:      *  <code>false</code> if the style sheet is applied to the document. 
  49:      * <code>true</code> if it is not. Modifying this attribute may cause a 
  50:      * new resolution of style for the document. A stylesheet only applies 
  51:      * if both an appropriate medium definition is present and the disabled 
  52:      * attribute is false. So, if the media doesn't apply to the current 
  53:      * user agent, the <code>disabled</code> attribute is ignored. 
  54:      */
  55:     public void setDisabled(boolean disabled);
  56: 
  57:     /**
  58:      *  The node that associates this style sheet with the document. For HTML, 
  59:      * this may be the corresponding <code>LINK</code> or <code>STYLE</code> 
  60:      * element. For XML, it may be the linking processing instruction. For 
  61:      * style sheets that are included by other style sheets, the value of 
  62:      * this attribute is <code>null</code>. 
  63:      */
  64:     public Node getOwnerNode();
  65: 
  66:     /**
  67:      *  For style sheet languages that support the concept of style sheet 
  68:      * inclusion, this attribute represents the including style sheet, if 
  69:      * one exists. If the style sheet is a top-level style sheet, or the 
  70:      * style sheet language does not support inclusion, the value of this 
  71:      * attribute is <code>null</code>. 
  72:      */
  73:     public StyleSheet getParentStyleSheet();
  74: 
  75:     /**
  76:      *  If the style sheet is a linked style sheet, the value of its attribute 
  77:      * is its location. For inline style sheets, the value of this attribute 
  78:      * is <code>null</code>. See the href attribute definition for the 
  79:      * <code>LINK</code> element in HTML 4.0, and the href pseudo-attribute 
  80:      * for the XML style sheet processing instruction. 
  81:      */
  82:     public String getHref();
  83: 
  84:     /**
  85:      *  The advisory title. The title is often specified in the 
  86:      * <code>ownerNode</code>. See the title attribute definition for the 
  87:      * <code>LINK</code> element in HTML 4.0, and the title pseudo-attribute 
  88:      * for the XML style sheet processing instruction. 
  89:      */
  90:     public String getTitle();
  91: 
  92:     /**
  93:      *  The intended destination media for style information. The media is 
  94:      * often specified in the <code>ownerNode</code>. If no media has been 
  95:      * specified, the <code>MediaList</code> will be empty. See the media 
  96:      * attribute definition for the <code>LINK</code> element in HTML 4.0, 
  97:      * and the media pseudo-attribute for the XML style sheet processing 
  98:      * instruction . Modifying the media list may cause a change to the 
  99:      * attribute <code>disabled</code>. 
 100:      */
 101:     public MediaList getMedia();
 102: 
 103: }