286N/A/*
286N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
286N/A *
286N/A * This code is free software; you can redistribute it and/or modify it
286N/A * under the terms of the GNU General Public License version 2 only, as
286N/A * published by the Free Software Foundation. Oracle designates this
286N/A * particular file as subject to the "Classpath" exception as provided
286N/A * by Oracle in the LICENSE file that accompanied this code.
286N/A *
286N/A * This code is distributed in the hope that it will be useful, but WITHOUT
286N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
286N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
286N/A * version 2 for more details (a copy is included in the LICENSE file that
286N/A * accompanied this code).
286N/A *
286N/A * You should have received a copy of the GNU General Public License version
286N/A * 2 along with this work; if not, write to the Free Software Foundation,
286N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
286N/A *
286N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
286N/A * or visit www.oracle.com if you need additional information or have any
286N/A * questions.
286N/A */
286N/A
286N/A/*
286N/A * This file is available under and governed by the GNU General Public
286N/A * License version 2 only, as published by the Free Software Foundation.
286N/A * However, the following notice accompanied the original version of this
286N/A * file and, per its terms, should not be removed:
286N/A *
286N/A * Copyright (c) 2000 World Wide Web Consortium,
286N/A * (Massachusetts Institute of Technology, Institut National de
286N/A * Recherche en Informatique et en Automatique, Keio University). All
286N/A * Rights Reserved. This program is distributed under the W3C's Software
286N/A * Intellectual Property License. This program is distributed in the
286N/A * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
286N/A * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
286N/A * PURPOSE.
286N/A * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
286N/A */
286N/A
286N/Apackage org.w3c.dom.stylesheets;
286N/A
286N/Aimport org.w3c.dom.DOMException;
286N/A
286N/A/**
286N/A * The <code>MediaList</code> interface provides the abstraction of an
286N/A * ordered collection of media, without defining or constraining how this
286N/A * collection is implemented. An empty list is the same as a list that
286N/A * contains the medium <code>"all"</code>.
286N/A * <p> The items in the <code>MediaList</code> are accessible via an integral
286N/A * index, starting from 0.
286N/A * <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>.
286N/A * @since DOM Level 2
286N/A */
286N/Apublic interface MediaList {
286N/A /**
286N/A * The parsable textual representation of the media list. This is a
286N/A * comma-separated list of media.
286N/A */
286N/A public String getMediaText();
286N/A /**
286N/A * The parsable textual representation of the media list. This is a
286N/A * comma-separated list of media.
286N/A * @exception DOMException
286N/A * SYNTAX_ERR: Raised if the specified string value has a syntax error
286N/A * and is unparsable.
286N/A * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this media list is
286N/A * readonly.
286N/A */
286N/A public void setMediaText(String mediaText)
286N/A throws DOMException;
286N/A
286N/A /**
286N/A * The number of media in the list. The range of valid media is
286N/A * <code>0</code> to <code>length-1</code> inclusive.
286N/A */
286N/A public int getLength();
286N/A
286N/A /**
286N/A * Returns the <code>index</code>th in the list. If <code>index</code> is
286N/A * greater than or equal to the number of media in the list, this
286N/A * returns <code>null</code>.
286N/A * @param index Index into the collection.
286N/A * @return The medium at the <code>index</code>th position in the
286N/A * <code>MediaList</code>, or <code>null</code> if that is not a valid
286N/A * index.
286N/A */
286N/A public String item(int index);
286N/A
286N/A /**
286N/A * Deletes the medium indicated by <code>oldMedium</code> from the list.
286N/A * @param oldMedium The medium to delete in the media list.
286N/A * @exception DOMException
286N/A * NO_MODIFICATION_ALLOWED_ERR: Raised if this list is readonly.
286N/A * <br> NOT_FOUND_ERR: Raised if <code>oldMedium</code> is not in the
286N/A * list.
286N/A */
286N/A public void deleteMedium(String oldMedium)
286N/A throws DOMException;
286N/A
286N/A /**
286N/A * Adds the medium <code>newMedium</code> to the end of the list. If the
286N/A * <code>newMedium</code> is already used, it is first removed.
286N/A * @param newMedium The new medium to add.
286N/A * @exception DOMException
286N/A * INVALID_CHARACTER_ERR: If the medium contains characters that are
286N/A * invalid in the underlying style language.
286N/A * <br> NO_MODIFICATION_ALLOWED_ERR: Raised if this list is readonly.
286N/A */
286N/A public void appendMedium(String newMedium)
286N/A throws DOMException;
286N/A
286N/A}