001/* Base class for displaying exceptions, warnings, and messages. 002 003 Copyright (c) 1999-2014 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 */ 027package ptolemy.gui; 028 029// ptolemy.gui.CancelException is deprecated, use ptolemy.util.CancelException. 030 031/////////////////////////////////////////////////////////////////// 032//// MessageHandler 033 034/** 035 This is a class that is used to report errors. It provides a 036 set of static methods that are called to report errors. However, the 037 actual reporting of the errors is deferred to an instance of this class 038 that is set using the setMessageHandler() method. Normally there 039 is only one instance, set up by the application, so the class is 040 a singleton. But this is not enforced. 041 <p> 042 This base class simply writes the errors to System.err. 043 When an applet or application starts up, it may wish to set a subclass 044 of this class as the message handler, to allow a nicer way of 045 reporting errors. For example, a swing application will probably 046 want to report errors in a dialog box, using for example 047 the derived class GraphicalMessageHandler. 048 @see GraphicalMessageHandler 049 050 @author Edward A. Lee, Steve Neuendorffer 051 @version $Id$ 052 @since Ptolemy II 1.0 053 @Pt.ProposedRating Yellow (eal) 054 @Pt.AcceptedRating Yellow (janneck) 055 @deprecated Use ptolemy.util.MessageHandler. 056 */ 057@Deprecated 058public class MessageHandler extends ptolemy.util.MessageHandler { 059 // The class body is empty so that callers use the static 060 // methods in the superclass. 061 // This class had duplicate code, which was confusing. 062}