home *** CD-ROM | disk | FTP | other *** search
/ BUG 15 / BUGCD1998_06.ISO / aplic / jbuilder / jsamples.z / NameArea.java < prev    next >
Text File  |  1997-07-30  |  3KB  |  69 lines

  1. // $Header: z:/admin/metro_examples/java/demo/ImageMap/rcs/NameArea.java 1.1 1997/02/06 00:30:06 IPGIntel-2 Exp $ 
  2. /*
  3.  * @(#)NameArea.java    1.6 96/12/06
  4.  *
  5.  * Copyright (c) 1994-1996 Sun Microsystems, Inc. All Rights Reserved.
  6.  *
  7.  * Sun grants you ("Licensee") a non-exclusive, royalty free, license to use,
  8.  * modify and redistribute this software in source and binary code form,
  9.  * provided that i) this copyright notice and license appear on all copies of
  10.  * the software; and ii) Licensee does not utilize the software in a manner
  11.  * which is disparaging to Sun.
  12.  *
  13.  * This software is provided "AS IS," without a warranty of any kind. ALL
  14.  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
  15.  * IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
  16.  * NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE
  17.  * LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
  18.  * OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS
  19.  * LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT,
  20.  * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
  21.  * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF
  22.  * OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE
  23.  * POSSIBILITY OF SUCH DAMAGES.
  24.  *
  25.  * This software is not designed or intended for use in on-line control of
  26.  * aircraft, air traffic, aircraft navigation or aircraft communications; or in
  27.  * the design, construction, operation or maintenance of any nuclear
  28.  * facility. Licensee represents and warrants that it will not use or
  29.  * redistribute the Software for such purposes.
  30.  */
  31.  
  32. import java.awt.Graphics;
  33.  
  34. /**
  35.  * A message feedback ImageArea class.
  36.  * This class extends the basic ImageArea Class to show the a given
  37.  * message in the status message area when the user enters this area.
  38.  *
  39.  * @author     Jim Graham
  40.  * @version     1.6, 12/06/96
  41.  */
  42. class NameArea extends ImageMapArea {
  43.     /** The string to be shown in the status message area. */
  44.     String name;
  45.  
  46.     /**
  47.      * The argument is the string to be displayed in the status message
  48.      * area.
  49.      */
  50.     public void handleArg(String arg) {
  51.     name = arg;
  52.     }
  53.  
  54.     /**
  55.      * The enter method displays the message in the status bar.
  56.      */
  57.     public void enter() {
  58.     showStatus(name);
  59.     }
  60.  
  61.     /**
  62.      * The exit method clears the status bar.
  63.      */
  64.     public void exit() {
  65.     showStatus(null);
  66.     }
  67. }
  68.  
  69.