home *** CD-ROM | disk | FTP | other *** search
/ Java 1.2 How-To / JavaHowTo.iso / 3rdParty / jbuilder / unsupported / JDK1.2beta3 / SOURCE / SRC.ZIP / java / beans / DesignMode.java < prev    next >
Encoding:
Java Source  |  1998-03-20  |  2.7 KB  |  89 lines

  1. /*
  2.  * @(#)DesignMode.java    1.4 98/03/18
  3.  *
  4.  * Copyright 1997 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  *
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. package java.beans;
  16.  
  17. /**
  18.  * <p>
  19.  * This interface is intended to be implemented by, or delegated from, instances
  20.  * of java.beans.BeanContext, in order to propagate to its nested hierarchy of
  21.  * java.beans.BeanContextChild instances, the current "designTime" property.
  22.  * </p>
  23.  *
  24.  * <p>
  25.  * The JavaBeans specification defines the notion of design time as is a 
  26.  * mode in which JavaBeans instances should function during their composition
  27.  * and customization in a interactive design, composition or construction tool,
  28.  * as opposed to runtime when the JavaBean is part of an applet, application,
  29.  * or other live Java executable abstraction.
  30.  * </p>
  31.  *
  32.  * @author Laurence P. G. Cable
  33.  * @version 1.4
  34.  * @since JDK1.2
  35.  *
  36.  * @see java.beans.BeanContext
  37.  * @see java.beans.BeanContextChild
  38.  * @see java.beans.BeanContextListener
  39.  * @see java.beans.PropertyChangeEvent
  40.  */
  41.  
  42. public interface DesignMode {
  43.  
  44.     /**
  45.      * <p>
  46.      * the standard value of the propertyName as fired from a BeanContext or
  47.      * other source of PropertyChangeEvents.
  48.      * </p>
  49.      */
  50.  
  51.     static String PROPERTYNAME = "designTime";
  52.  
  53.     /**
  54.      * @param designTime sets the current "value" of the "designTime" property.
  55.      * <p>
  56.      * If the implementing object is an instance of java.beans.BeanContext, or
  57.      * a subinterface thereof, then that BeanContext should fire a
  58.      * PropertyChangeEvent, to its registered BeanContextListeners, with
  59.      * parameters:
  60.      *
  61.      * @param    propertyName    java.beans.DesignMode.PROPERTYNAME
  62.      * @param   oldValue    previous value of "designTime"
  63.      * @param   newValue    current value of "designTime"
  64.      * </p>
  65.      *
  66.      * <p>
  67.      * Note it is illegal for a BeanContextChild to invoke this method
  68.      * associated with a BeanContext that it is nested within.
  69.      * </p>
  70.      *
  71.      * @see java.beans.BeanContext
  72.      * @see java.beans.BeanContextListener
  73.      * @see java.beans.PropertyChangeEvent
  74.      */
  75.  
  76.     void setDesignTime(boolean designTime);
  77.  
  78.     /**
  79.      * <p>
  80.      * A value of true denotes that JavaBeans should behave in design time
  81.      * mode, a value of false denotes runtime behavior.
  82.      * </p>
  83.      *
  84.      * @return the current "value" of the "designTime" property.
  85.      */
  86.  
  87.     boolean isDesignTime();
  88. }
  89.