001/* Applet containing the Histogram class. 002 003 @Copyright (c) 1997-2014 The Regents of the University of California. 004 All rights reserved. 005 006 Permission is hereby granted, without written agreement and without 007 license or royalty fees, to use, copy, modify, and distribute this 008 software and its documentation for any purpose, provided that the 009 above copyright notice and the following two paragraphs appear in all 010 copies of this software. 011 012 IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY 013 FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 014 ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF 015 THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF 016 SUCH DAMAGE. 017 018 THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, 019 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 020 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE 021 PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF 022 CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, 023 ENHANCEMENTS, OR MODIFICATIONS. 024 025 PT_COPYRIGHT_VERSION_2 026 COPYRIGHTENDKEY 027 */ 028package ptolemy.plot.plotml; 029 030import ptolemy.plot.Histogram; 031import ptolemy.plot.PlotBox; 032 033/////////////////////////////////////////////////////////////////// 034//// HistogramMLApplet 035 036/** 037 This applet reads a URL giving a PlotML file that contains data. 038 It plots a histogram of that data. 039 040 @see Histogram 041 @author Edward A. Lee 042 @version $Id$ 043 @since Ptolemy II 0.4 044 @Pt.ProposedRating red (eal) 045 @Pt.AcceptedRating red (cxh) 046 */ 047@SuppressWarnings("serial") 048public class HistogramMLApplet extends PlotMLApplet { 049 /////////////////////////////////////////////////////////////////// 050 //// public methods //// 051 052 /** Return a string describing this applet. 053 */ 054 @Override 055 public String getAppletInfo() { 056 return "HistogramMLApplet " + PlotBox.PTPLOT_RELEASE 057 + ": A histogram plotter.\n" + "By: Edward A. Lee.\n" 058 + "($Id$)"; 059 } 060 061 /** Create a new Plot object for the applet. Derived classes can 062 * redefine this method to return a different type of plot object. 063 */ 064 @Override 065 public PlotBox newPlot() { 066 return new Histogram(); 067 } 068 069 /////////////////////////////////////////////////////////////////// 070 //// protected methods //// 071 072 /** Create a new parser object for the applet. 073 */ 074 @Override 075 protected PlotMLParser _newParser() { 076 return new HistogramMLParser((Histogram) plot()); 077 } 078}