001/* Parameter specifying the position into which to export HTML text. 002 003 Copyright (c) 2011-2012 The Regents of the University of California. 004 All rights reserved. 005 Permission is hereby granted, without written agreement and without 006 license or royalty fees, to use, copy, modify, and distribute this 007 software and its documentation for any purpose, provided that the above 008 copyright notice and the following two paragraphs appear in all copies 009 of this software. 010 011 IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY 012 FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 013 ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF 014 THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF 015 SUCH DAMAGE. 016 017 THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, 018 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 019 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE 020 PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF 021 CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, 022 ENHANCEMENTS, OR MODIFICATIONS. 023 024 PT_COPYRIGHT_VERSION_2 025 COPYRIGHTENDKEY 026 027 */ 028 029package ptolemy.vergil.basic.export.web; 030 031import ptolemy.data.expr.StringParameter; 032import ptolemy.kernel.util.IllegalActionException; 033import ptolemy.kernel.util.NameDuplicationException; 034import ptolemy.kernel.util.NamedObj; 035 036/////////////////////////////////////////////////////////////////// 037//// HTMLTextPosition 038/** 039 * Parameter specifying the position into which to export HTML text. 040 * The parameter offers the following possibilities: 041 * <ul> 042 * <li><b>end</b>: Put the text at the end of the HTML file. 043 * <li><b>head</b>: Put the text in the header section. 044 * <li><b>start</b>: Put the text at the start of the body section. 045 * <li><i>anything_else</i>: Put the text in a separate HTML file 046 * named <i>anything_else</i>. 047 * </ul> 048 * The default is "start". 049 * 050 * @author Edward A. Lee 051 * @version $Id$ 052 * @since Ptolemy II 10.0 053 * @Pt.ProposedRating Red (cxh) 054 * @Pt.AcceptedRating Red (cxh) 055 */ 056public class HTMLTextPosition extends StringParameter { 057 058 /** Create an instance of this parameter. 059 * @param container The container. 060 * @param name The name. 061 * @exception IllegalActionException If the superclass throws it. 062 * @exception NameDuplicationException If the superclass throws it. 063 */ 064 public HTMLTextPosition(NamedObj container, String name) 065 throws IllegalActionException, NameDuplicationException { 066 super(container, name); 067 068 addChoice("end"); 069 addChoice("head"); 070 addChoice("start"); 071 setExpression("start"); 072 } 073}