Hiyo, > Roman> 1. All PropertyChangeEvent methods have been removed. > > According to JAPI, two of the firePropertyChange methods were public > in this class, but are protected in the superclass. So, this part of > the change should be reverted. > > Roman> (firePropertyChange(String,boolean,boolean)): Likewise. > Roman> (firePropertyChange(String,int,int)): Likewise. > > These are the ones...
Indeed. Stupid API ;-) Fixed by the attached patch.
2006-06-26 Roman Kennke <[EMAIL PROTECTED]>
* javax/swing/JComponent.java
(firePropertyChange(String,int,int)): New method. Overrides
Component method and makes it public.
(firePropertyChange(String,boolean,boolean)): Likewise.
/Roman
--
“Improvement makes straight roads, but the crooked roads, without
Improvement, are roads of Genius.” - William Blake
Index: javax/swing/JComponent.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JComponent.java,v
retrieving revision 1.130
diff -u -2 -0 -r1.130 JComponent.java
--- javax/swing/JComponent.java 22 Jun 2006 21:00:22 -0000 1.130
+++ javax/swing/JComponent.java 26 Jun 2006 09:38:50 -0000
@@ -966,40 +966,76 @@
* registered to listen to a given property. Any method which changes
* the specified property of this component should call this method.
*
* @param propertyName The property which changed
* @param oldValue The old value of the property
* @param newValue The new value of the property
*
* @throws PropertyVetoException if the change was vetoed by a listener
*
* @see #addVetoableChangeListener
* @see #removeVetoableChangeListener
*/
protected void fireVetoableChange(String propertyName, Object oldValue,
Object newValue)
throws PropertyVetoException
{
if (vetoableChangeSupport != null)
vetoableChangeSupport.fireVetoableChange(propertyName, oldValue, newValue);
}
+
+ /**
+ * Fires a property change for a primitive integer property.
+ *
+ * @param property the name of the property
+ * @param oldValue the old value of the property
+ * @param newValue the new value of the property
+ *
+ * @specnote This method is implemented in
+ * [EMAIL PROTECTED] Component#firePropertyChange(String, int, int)}. It is
+ * only here because it is specified to be public, whereas the
+ * Component method is protected.
+ */
+ public void firePropertyChange(String property, int oldValue, int newValue)
+ {
+ super.firePropertyChange(property, oldValue, newValue);
+ }
+
+ /**
+ * Fires a property change for a primitive boolean property.
+ *
+ * @param property the name of the property
+ * @param oldValue the old value of the property
+ * @param newValue the new value of the property
+ *
+ * @specnote This method is implemented in
+ * [EMAIL PROTECTED] Component#firePropertyChange(String, boolean, boolean)}.
+ * It is only here because it is specified to be public, whereas
+ * the Component method is protected.
+ */
+ public void firePropertyChange(String property, boolean oldValue,
+ boolean newValue)
+ {
+ super.firePropertyChange(property, oldValue, newValue);
+ }
+
/**
* Get the value of the accessibleContext property for this component.
*
* @return the current value of the property
*/
public AccessibleContext getAccessibleContext()
{
return null;
}
/**
* Get the value of the [EMAIL PROTECTED] #alignmentX} property.
*
* @return The current value of the property.
*
* @see #setAlignmentX
* @see #alignmentY
*/
public float getAlignmentX()
{
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
