Path: blob/aarch64-shenandoah-jdk8u272-b10/jaxp/src/org/w3c/dom/stylesheets/StyleSheet.java
86410 views
/*1* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.2*3* This code is free software; you can redistribute it and/or modify it4* under the terms of the GNU General Public License version 2 only, as5* published by the Free Software Foundation. Oracle designates this6* particular file as subject to the "Classpath" exception as provided7* by Oracle in the LICENSE file that accompanied this code.8*9* This code is distributed in the hope that it will be useful, but WITHOUT10* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or11* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License12* version 2 for more details (a copy is included in the LICENSE file that13* accompanied this code).14*15* You should have received a copy of the GNU General Public License version16* 2 along with this work; if not, write to the Free Software Foundation,17* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.18*19* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA20* or visit www.oracle.com if you need additional information or have any21* questions.22*/2324/*25* This file is available under and governed by the GNU General Public26* License version 2 only, as published by the Free Software Foundation.27* However, the following notice accompanied the original version of this28* file and, per its terms, should not be removed:29*30* Copyright (c) 2000 World Wide Web Consortium,31* (Massachusetts Institute of Technology, Institut National de32* Recherche en Informatique et en Automatique, Keio University). All33* Rights Reserved. This program is distributed under the W3C's Software34* Intellectual Property License. This program is distributed in the35* hope that it will be useful, but WITHOUT ANY WARRANTY; without even36* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR37* PURPOSE.38* See W3C License http://www.w3.org/Consortium/Legal/ for more details.39*/4041package org.w3c.dom.stylesheets;4243import org.w3c.dom.Node;4445/**46* The <code>StyleSheet</code> interface is the abstract base interface for47* any type of style sheet. It represents a single style sheet associated48* with a structured document. In HTML, the StyleSheet interface represents49* either an external style sheet, included via the HTML LINK element, or50* an inline STYLE element. In XML, this interface represents an external51* style sheet, included via a style sheet processing instruction.52* <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>.53* @since DOM Level 254*/55public interface StyleSheet {56/**57* This specifies the style sheet language for this style sheet. The58* style sheet language is specified as a content type (e.g.59* "text/css"). The content type is often specified in the60* <code>ownerNode</code>. Also see the type attribute definition for61* the <code>LINK</code> element in HTML 4.0, and the type62* pseudo-attribute for the XML style sheet processing instruction.63*/64public String getType();6566/**67* <code>false</code> if the style sheet is applied to the document.68* <code>true</code> if it is not. Modifying this attribute may cause a69* new resolution of style for the document. A stylesheet only applies70* if both an appropriate medium definition is present and the disabled71* attribute is false. So, if the media doesn't apply to the current72* user agent, the <code>disabled</code> attribute is ignored.73*/74public boolean getDisabled();75/**76* <code>false</code> if the style sheet is applied to the document.77* <code>true</code> if it is not. Modifying this attribute may cause a78* new resolution of style for the document. A stylesheet only applies79* if both an appropriate medium definition is present and the disabled80* attribute is false. So, if the media doesn't apply to the current81* user agent, the <code>disabled</code> attribute is ignored.82*/83public void setDisabled(boolean disabled);8485/**86* The node that associates this style sheet with the document. For HTML,87* this may be the corresponding <code>LINK</code> or <code>STYLE</code>88* element. For XML, it may be the linking processing instruction. For89* style sheets that are included by other style sheets, the value of90* this attribute is <code>null</code>.91*/92public Node getOwnerNode();9394/**95* For style sheet languages that support the concept of style sheet96* inclusion, this attribute represents the including style sheet, if97* one exists. If the style sheet is a top-level style sheet, or the98* style sheet language does not support inclusion, the value of this99* attribute is <code>null</code>.100*/101public StyleSheet getParentStyleSheet();102103/**104* If the style sheet is a linked style sheet, the value of its attribute105* is its location. For inline style sheets, the value of this attribute106* is <code>null</code>. See the href attribute definition for the107* <code>LINK</code> element in HTML 4.0, and the href pseudo-attribute108* for the XML style sheet processing instruction.109*/110public String getHref();111112/**113* The advisory title. The title is often specified in the114* <code>ownerNode</code>. See the title attribute definition for the115* <code>LINK</code> element in HTML 4.0, and the title pseudo-attribute116* for the XML style sheet processing instruction.117*/118public String getTitle();119120/**121* The intended destination media for style information. The media is122* often specified in the <code>ownerNode</code>. If no media has been123* specified, the <code>MediaList</code> will be empty. See the media124* attribute definition for the <code>LINK</code> element in HTML 4.0,125* and the media pseudo-attribute for the XML style sheet processing126* instruction . Modifying the media list may cause a change to the127* attribute <code>disabled</code>.128*/129public MediaList getMedia();130131}132133134