summaryrefslogtreecommitdiffstats
path: root/libjava/java/beans/beancontext
diff options
context:
space:
mode:
authormkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>2003-03-17 15:21:45 +0000
committermkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>2003-03-17 15:21:45 +0000
commit89d77399ee7926ffb01dbbd2ace7d3da90363b68 (patch)
tree6acf6da5e934be029c688434eef17c49b3b73840 /libjava/java/beans/beancontext
parentfa405edeaba4da430cc4036ecca8e38028098cd5 (diff)
downloadppe42-gcc-89d77399ee7926ffb01dbbd2ace7d3da90363b68.tar.gz
ppe42-gcc-89d77399ee7926ffb01dbbd2ace7d3da90363b68.zip
2003-03-17 Michael Koch <konqueror@gmx.de>
* java/beans/Beans.java: Explicitely import classes not packages. * java/beans/FeatureDescriptor.java (preferred): New member variable. (isPreferred): New method. (setPreferred): New method. * java/beans/PropertyEditorManager.java: Explicitely import used classes. * java/beans/beancontext/BeanContextChild.java: Added line wrapping. * java/beans/beancontext/BeanContextChildSupport.java: Reindented. * java/beans/beancontext/BeanContextEvent.java: Reindented. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64486 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/beans/beancontext')
-rw-r--r--libjava/java/beans/beancontext/BeanContextChild.java3
-rw-r--r--libjava/java/beans/beancontext/BeanContextChildSupport.java79
-rw-r--r--libjava/java/beans/beancontext/BeanContextEvent.java3
3 files changed, 49 insertions, 36 deletions
diff --git a/libjava/java/beans/beancontext/BeanContextChild.java b/libjava/java/beans/beancontext/BeanContextChild.java
index c3f4f003fed..ef2b7b34976 100644
--- a/libjava/java/beans/beancontext/BeanContextChild.java
+++ b/libjava/java/beans/beancontext/BeanContextChild.java
@@ -43,7 +43,8 @@ import java.beans.VetoableChangeListener;
import java.beans.PropertyVetoException;
/**
- * Beans implement this to get information about the execution environment and its services and to be placed in the hierarchy.
+ * Beans implement this to get information about the execution environment and
+ * its services and to be placed in the hierarchy.
* <P>
*
* The difference between a <code>BeanContext</code> and a
diff --git a/libjava/java/beans/beancontext/BeanContextChildSupport.java b/libjava/java/beans/beancontext/BeanContextChildSupport.java
index 270854b2576..ea48cf2ae50 100644
--- a/libjava/java/beans/beancontext/BeanContextChildSupport.java
+++ b/libjava/java/beans/beancontext/BeanContextChildSupport.java
@@ -56,7 +56,7 @@ import java.io.Serializable;
* behavior. If there are problems, let me know.
*
* @author John Keiser
- * @since JDK1.2
+ * @since 1.2
* @see java.beans.beancontext.BeanContextChild
*/
@@ -97,14 +97,14 @@ public class BeanContextChildSupport
*/
protected VetoableChangeSupport vcSupport;
-
/**
* Create a new <code>BeanContextChildSupport</code> with itself as the peer.
* This is meant to be used when you subclass
* <code>BeanContextChildSupport</code> to create your child.
*/
- public BeanContextChildSupport() {
- this(null);
+ public BeanContextChildSupport()
+ {
+ this (null);
};
/**
@@ -112,14 +112,16 @@ public class BeanContextChildSupport
* @param peer the peer to use, or <code>null</code> to specify
* <code>this</code>.
*/
- public BeanContextChildSupport(BeanContextChild peer) {
- if(peer == null) {
- peer = this;
- }
+ public BeanContextChildSupport (BeanContextChild peer)
+ {
+ if (peer == null)
+ {
+ peer = this;
+ }
beanContextChildPeer = peer;
- pcSupport = new PropertyChangeSupport(peer);
- vcSupport = new VetoableChangeSupport(peer);
+ pcSupport = new PropertyChangeSupport (peer);
+ vcSupport = new VetoableChangeSupport (peer);
}
/**
@@ -178,34 +180,42 @@ public class BeanContextChildSupport
* <code>BeanContextChild</code> implementor does not
* wish to have its parent changed.
*/
- public void setBeanContext(BeanContext newBeanContext)
- throws PropertyVetoException {
- synchronized(beanContextChildPeer) {
- if(newBeanContext == beanContext)
- return;
-
- if(!rejectedSetBCOnce) {
- if(!validatePendingSetBeanContext(newBeanContext)) {
- rejectedSetBCOnce = true;
- throw new PropertyVetoException("validatePendingSetBeanContext() rejected change",
- new PropertyChangeEvent(beanContextChildPeer, "beanContext", beanContext, newBeanContext));
- }
- try {
- fireVetoableChange("beanContext", beanContext, newBeanContext);
- } catch(PropertyVetoException e) {
- rejectedSetBCOnce = true;
- throw e;
- }
- }
-
- releaseBeanContextResources();
+ public void setBeanContext(BeanContext newBeanContext)
+ throws PropertyVetoException
+ {
+ synchronized (beanContextChildPeer)
+ {
+ if (newBeanContext == beanContext)
+ return;
+
+ if (!rejectedSetBCOnce)
+ {
+ if (!validatePendingSetBeanContext (newBeanContext))
+ {
+ rejectedSetBCOnce = true;
+ throw new PropertyVetoException ("validatePendingSetBeanContext() rejected change",
+ new PropertyChangeEvent(beanContextChildPeer, "beanContext", beanContext, newBeanContext));
+ }
+
+ try
+ {
+ fireVetoableChange ("beanContext", beanContext, newBeanContext);
+ }
+ catch (PropertyVetoException e)
+ {
+ rejectedSetBCOnce = true;
+ throw e;
+ }
+ }
+
+ releaseBeanContextResources ();
beanContext = newBeanContext;
rejectedSetBCOnce = false;
- firePropertyChange("beanContext", beanContext, newBeanContext);
+ firePropertyChange ("beanContext", beanContext, newBeanContext);
- initializeBeanContextResources();
+ initializeBeanContextResources ();
}
}
@@ -213,7 +223,8 @@ public class BeanContextChildSupport
* Get the parent <code>BeanContext</code>.
* @return the parent <code>BeanContext</code>.
*/
- public BeanContext getBeanContext() {
+ public BeanContext getBeanContext()
+ {
return beanContext;
}
diff --git a/libjava/java/beans/beancontext/BeanContextEvent.java b/libjava/java/beans/beancontext/BeanContextEvent.java
index e6d8cb23f82..f93d3fe148f 100644
--- a/libjava/java/beans/beancontext/BeanContextEvent.java
+++ b/libjava/java/beans/beancontext/BeanContextEvent.java
@@ -47,7 +47,8 @@ import java.util.EventObject;
* @since JDK1.2
*/
-public abstract class BeanContextEvent extends EventObject {
+public abstract class BeanContextEvent extends EventObject
+{
/**
* The <code>BeanContext</code> that most recently passed this
* event on.
OpenPOWER on IntegriCloud