author | mcimadamore |
Thu, 01 Dec 2011 18:34:23 +0000 | |
changeset 11120 | f8576c769572 |
parent 9035 | 1255eb81cc2f |
permissions | -rw-r--r-- |
2 | 1 |
/* |
9035
1255eb81cc2f
7033660: Update copyright year to 2011 on any files changed in 2011
ohair
parents:
8760
diff
changeset
|
2 |
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. |
2 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
5506 | 7 |
* published by the Free Software Foundation. Oracle designates this |
2 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
2 | 10 |
* |
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
5506 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
2 | 24 |
*/ |
25 |
||
26 |
package java.beans; |
|
27 |
||
28 |
/** |
|
29 |
* <p> |
|
30 |
* This interface is intended to be implemented by, or delegated from, instances |
|
31 |
* of java.beans.beancontext.BeanContext, in order to propagate to its nested hierarchy |
|
32 |
* of java.beans.beancontext.BeanContextChild instances, the current "designTime" property. |
|
33 |
* <p> |
|
8760
83843c0b84f7
7021517: java.beans code comments have issues with HTML4 compliance
malenkov
parents:
5506
diff
changeset
|
34 |
* The JavaBeans™ specification defines the notion of design time as is a |
2 | 35 |
* mode in which JavaBeans instances should function during their composition |
36 |
* and customization in a interactive design, composition or construction tool, |
|
37 |
* as opposed to runtime when the JavaBean is part of an applet, application, |
|
38 |
* or other live Java executable abstraction. |
|
39 |
* |
|
40 |
* @author Laurence P. G. Cable |
|
41 |
* @since 1.2 |
|
42 |
* |
|
43 |
* @see java.beans.beancontext.BeanContext |
|
44 |
* @see java.beans.beancontext.BeanContextChild |
|
45 |
* @see java.beans.beancontext.BeanContextMembershipListener |
|
46 |
* @see java.beans.PropertyChangeEvent |
|
47 |
*/ |
|
48 |
||
49 |
public interface DesignMode { |
|
50 |
||
51 |
/** |
|
52 |
* The standard value of the propertyName as fired from a BeanContext or |
|
53 |
* other source of PropertyChangeEvents. |
|
54 |
*/ |
|
55 |
||
56 |
static String PROPERTYNAME = "designTime"; |
|
57 |
||
58 |
/** |
|
59 |
* Sets the "value" of the "designTime" property. |
|
60 |
* <p> |
|
61 |
* If the implementing object is an instance of java.beans.beancontext.BeanContext, |
|
62 |
* or a subinterface thereof, then that BeanContext should fire a |
|
63 |
* PropertyChangeEvent, to its registered BeanContextMembershipListeners, with |
|
64 |
* parameters: |
|
65 |
* <ul> |
|
66 |
* <li><code>propertyName</code> - <code>java.beans.DesignMode.PROPERTYNAME</code> |
|
67 |
* <li><code>oldValue</code> - previous value of "designTime" |
|
68 |
* <li><code>newValue</code> - current value of "designTime" |
|
69 |
* </ul> |
|
70 |
* Note it is illegal for a BeanContextChild to invoke this method |
|
71 |
* associated with a BeanContext that it is nested within. |
|
72 |
* |
|
73 |
* @param designTime the current "value" of the "designTime" property |
|
74 |
* @see java.beans.beancontext.BeanContext |
|
75 |
* @see java.beans.beancontext.BeanContextMembershipListener |
|
76 |
* @see java.beans.PropertyChangeEvent |
|
77 |
*/ |
|
78 |
||
79 |
void setDesignTime(boolean designTime); |
|
80 |
||
81 |
/** |
|
82 |
* A value of true denotes that JavaBeans should behave in design time |
|
83 |
* mode, a value of false denotes runtime behavior. |
|
84 |
* |
|
85 |
* @return the current "value" of the "designTime" property. |
|
86 |
*/ |
|
87 |
||
88 |
boolean isDesignTime(); |
|
89 |
} |