css2properties.java

来自「纯java操作系统jnode,安装简单和操作简单的个人使用的Java操作系统」· Java 代码 · 共 1,592 行 · 第 1/5 页

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

package org.w3c.dom.css;

import org.w3c.dom.DOMException;

/**
 *  The <code>CSS2Properties</code> interface represents a convenience 
 * mechanism for retrieving and setting properties within a 
 * <code>CSSStyleDeclaration</code>. The attributes of this interface 
 * correspond to all the properties specified in CSS2. Getting an attribute 
 * of this interface is equivalent to calling the 
 * <code>getPropertyValue</code> method of the 
 * <code>CSSStyleDeclaration</code> interface. Setting an attribute of this 
 * interface is equivalent to calling the <code>setProperty</code> method of 
 * the <code>CSSStyleDeclaration</code> interface. 
 * <p> A conformant implementation of the CSS module is not required to 
 * implement the <code>CSS2Properties</code> interface. If an implementation 
 * does implement this interface, the expectation is that language-specific 
 * methods can be used to cast from an instance of the 
 * <code>CSSStyleDeclaration</code> interface to the 
 * <code>CSS2Properties</code> interface. 
 * <p> If an implementation does implement this interface, it is expected to 
 * understand the specific syntax of the shorthand properties, and apply 
 * their semantics; when the <code>margin</code> property is set, for 
 * example, the <code>marginTop</code>, <code>marginRight</code>, 
 * <code>marginBottom</code> and <code>marginLeft</code> properties are 
 * actually being set by the underlying implementation. 
 * <p> When dealing with CSS "shorthand" properties, the shorthand properties 
 * should be decomposed into their component longhand properties as 
 * appropriate, and when querying for their value, the form returned should 
 * be the shortest form exactly equivalent to the declarations made in the 
 * ruleset. However, if there is no shorthand declaration that could be 
 * added to the ruleset without changing in any way the rules already 
 * declared in the ruleset (i.e., by adding longhand rules that were 
 * previously not declared in the ruleset), then the empty string should be 
 * returned for the shorthand property. 
 * <p> For example, querying for the <code>font</code> property should not 
 * return "normal normal normal 14pt/normal Arial, sans-serif", when "14pt 
 * Arial, sans-serif" suffices. (The normals are initial values, and are 
 * implied by use of the longhand property.) 
 * <p> If the values for all the longhand properties that compose a particular 
 * string are the initial values, then a string consisting of all the 
 * initial values should be returned (e.g. a <code>border-width</code> value 
 * of "medium" should be returned as such, not as ""). 
 * <p> For some shorthand properties that take missing values from other 
 * sides, such as the <code>margin</code>, <code>padding</code>, and 
 * <code>border-[width|style|color]</code> properties, the minimum number of 
 * sides possible should be used; i.e., "0px 10px" will be returned instead 
 * of "0px 10px 0px 10px". 
 * <p> If the value of a shorthand property can not be decomposed into its 
 * component longhand properties, as is the case for the <code>font</code> 
 * property with a value of "menu", querying for the values of the component 
 * longhand properties should return the empty string. 
 * <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>.
 * @since DOM Level 2
 */
public interface CSS2Properties {
    /**
     *  See the azimuth property definition in CSS2. 
     * @exception DOMException
     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
     *   unparsable.
     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
     */
    public String getAzimuth();
    /**
     *  See the azimuth property definition in CSS2. 
     * @exception DOMException
     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
     *   unparsable.
     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
     */
    public void setAzimuth(String azimuth)
                                             throws DOMException;

    /**
     *  See the background property definition in CSS2. 
     * @exception DOMException
     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
     *   unparsable.
     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
     */
    public String getBackground();
    /**
     *  See the background property definition in CSS2. 
     * @exception DOMException
     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
     *   unparsable.
     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
     */
    public void setBackground(String background)
                                             throws DOMException;

    /**
     *  See the background-attachment property definition in CSS2. 
     * @exception DOMException
     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
     *   unparsable.
     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
     */
    public String getBackgroundAttachment();
    /**
     *  See the background-attachment property definition in CSS2. 
     * @exception DOMException
     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
     *   unparsable.
     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
     */
    public void setBackgroundAttachment(String backgroundAttachment)
                                             throws DOMException;

    /**
     *  See the background-color property definition in CSS2. 
     * @exception DOMException
     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
     *   unparsable.
     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
     */
    public String getBackgroundColor();
    /**
     *  See the background-color property definition in CSS2. 
     * @exception DOMException
     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
     *   unparsable.
     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
     */
    public void setBackgroundColor(String backgroundColor)
                                             throws DOMException;

    /**
     *  See the background-image property definition in CSS2. 
     * @exception DOMException
     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
     *   unparsable.
     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
     */
    public String getBackgroundImage();
    /**
     *  See the background-image property definition in CSS2. 
     * @exception DOMException
     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
     *   unparsable.
     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
     */
    public void setBackgroundImage(String backgroundImage)
                                             throws DOMException;

    /**
     *  See the background-position property definition in CSS2. 
     * @exception DOMException
     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
     *   unparsable.
     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
     */
    public String getBackgroundPosition();
    /**
     *  See the background-position property definition in CSS2. 
     * @exception DOMException
     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
     *   unparsable.
     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
     */
    public void setBackgroundPosition(String backgroundPosition)
                                             throws DOMException;

    /**
     *  See the background-repeat property definition in CSS2. 
     * @exception DOMException
     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
     *   unparsable.
     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
     */
    public String getBackgroundRepeat();
    /**
     *  See the background-repeat property definition in CSS2. 
     * @exception DOMException
     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
     *   unparsable.
     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
     */
    public void setBackgroundRepeat(String backgroundRepeat)
                                             throws DOMException;

    /**
     *  See the border property definition in CSS2. 
     * @exception DOMException
     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
     *   unparsable.
     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
     */
    public String getBorder();
    /**
     *  See the border property definition in CSS2. 
     * @exception DOMException
     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
     *   unparsable.
     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
     */
    public void setBorder(String border)
                                             throws DOMException;

    /**
     *  See the border-collapse property definition in CSS2. 
     * @exception DOMException
     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
     *   unparsable.
     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
     */
    public String getBorderCollapse();
    /**
     *  See the border-collapse property definition in CSS2. 
     * @exception DOMException
     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
     *   unparsable.
     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
     */
    public void setBorderCollapse(String borderCollapse)
                                             throws DOMException;

    /**
     *  See the border-color property definition in CSS2. 
     * @exception DOMException
     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
     *   unparsable.
     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
     */
    public String getBorderColor();
    /**
     *  See the border-color property definition in CSS2. 
     * @exception DOMException
     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
     *   unparsable.
     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
     */
    public void setBorderColor(String borderColor)
                                             throws DOMException;

    /**
     *  See the border-spacing property definition in CSS2. 
     * @exception DOMException
     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
     *   unparsable.
     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
     */
    public String getBorderSpacing();
    /**
     *  See the border-spacing property definition in CSS2. 
     * @exception DOMException
     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
     *   unparsable.
     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
     */
    public void setBorderSpacing(String borderSpacing)
                                             throws DOMException;

    /**
     *  See the border-style property definition in CSS2. 
     * @exception DOMException
     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
     *   unparsable.
     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
     */
    public String getBorderStyle();
    /**
     *  See the border-style property definition in CSS2. 
     * @exception DOMException
     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
     *   unparsable.
     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
     */
    public void setBorderStyle(String borderStyle)
                                             throws DOMException;

    /**
     *  See the border-top property definition in CSS2. 
     * @exception DOMException
     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
     *   unparsable.
     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
     */
    public String getBorderTop();
    /**
     *  See the border-top property definition in CSS2. 
     * @exception DOMException
     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
     *   unparsable.
     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
     */
    public void setBorderTop(String borderTop)
                                             throws DOMException;

    /**
     *  See the border-right property definition in CSS2. 
     * @exception DOMException
     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
     *   unparsable.
     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
     */
    public String getBorderRight();
    /**
     *  See the border-right property definition in CSS2. 
     * @exception DOMException
     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
     *   unparsable.
     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
     */
    public void setBorderRight(String borderRight)
                                             throws DOMException;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?