[kaffe] CVS kaffe (robilad): Resynced with GNU classpath: swing
cleanups
Kaffe CVS
cvs-commits at kaffe.org
Thu Jan 27 06:14:40 PST 2005
PatchSet 5928
Date: 2005/01/27 14:07:07
Author: robilad
Branch: HEAD
Tag: (none)
Log:
Resynced with GNU classpath: swing cleanups
2005-01-27 Dalibor Topic <robilad at kaffe.org>
Resynced with GNU Classpath.
2005-01-27 Michael Koch <konqueror at gmx.de>
* javax/swing/AbstractAction.java
(ENABLED_PROPERTY): Removed.
(setEnabled): Replaced constant with real string.
* javax/swing/AbstractButton.java
(createActionPropertyChangeListener.propertyChange): Likewise.
* javax/swing/JComboBox.java
(DEFAULT_MAXIMUM_ROW_COUNT): Made private.
(EDITABLE_CHANGED_PROPERTY): Removed.
(MAXIMUM_ROW_COUNT_CHANGED_PROPERTY):Likewise.
(ENABLED_CHANGED_PROPERTY):Likewise.
(RENDERER_CHANGED_PROPERTY):Likewise.
(EDITOR_CHANGED_PROPERTY):Likewise.
(MODEL_CHANGED_PROPERTY):Likewise.
(uiClassID):Likewise.
(getUIClassID): Replaced constant with real string.
(setModel):Likewise.
(setEditable):Likewise.
(setMaximumRowCount):Likewise.
(setRenderer):Likewise.
(setEditor):Likewise.
(setEnabled):Likewise.
* javax/swing/JLabel.java
(DISABLED_ICON_CHANGED_PROPERTY): Removed.
(DISPLAYED_MNEMONIC_CHANGED_PROPERTY): Likewise.
(DISPLAYED_MNEMONIC_INDEX_CHANGED_PROPERTY): Likewise.
(HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY): Likewise.
(HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY): Likewise.
(ICON_CHANGED_PROPERTY): Likewise.
(ICON_TEXT_GAP_CHANGED_PROPERTY): Likewise.
(LABEL_FOR_CHANGED_PROPERTY): Likewise.
(TEXT_CHANGED_PROPERTY): Likewise.
(VERTICAL_ALIGNMENT_CHANGED_PROPERTY): Likewise.
(VERTICAL_TEXT_POSITION_CHANGED_PROPERTY): Likewise.
(setText): Replaced constant with real string.
(setIcon): Likewise.
(setDisabledIcon): Likewise.
(setDisplayedMnemonic): Likewise.
(setIconTextGap): Likewise.
(setVerticalAlignment): Likewise.
(setHorizontalAlignment): Likewise.
(setVerticalTextPosition): Likewise.
(setHorizontalTextPosition): Likewise.
(setLabelFor): Replaced constant with real string.
Fire property change event after property got changed.
* javax/swing/JList.java
(CELL_RENDERER_PROPERTY_CHANGED): Likewise.
(FIXED_CELL_HEIGHT_PROPERTY_CHANGED): Likewise.
(FIXED_CELL_WIDTH_PROPERTY_CHANGED): Likewise.
(LAYOUT_ORIENTATION_PROPERTY_CHANGED): Likewise.
(MODEL_PROPERTY_CHANGED): Likewise.
(PROTOTYPE_CELL_VALUE_PROPERTY_CHANGED): Likewise.
(SELECTION_BACKGROUND_PROPERTY_CHANGED): Likewise.
(SELECTION_FOREGROUND_PROPERTY_CHANGED): Likewise.
(SELECTION_MODEL_PROPERTY_CHANGED): Likewise.
(setFixedCellWidth): Reimplemented.
(setFixedCellHeight): Exit if new value is identical.
Replaced constant with real string.
(setSelectionBackground): Likewise.
(setSelectionForeground): Likewise.
(setPrototypeCellValue): Likewise.
(setCellRenderer): Replaced constant with real string.
(setModel): Likewise.
(setSelectionModel): Likewise.
* javax/swing/JMenuBar.java
(BORDER_PAINTED_CHANGED_PROPERTY): Removed.
(MODEL_CHANGED_PROPERTY): Likewise.
(MARGIN_CHANGED_PROPERTY): Likewise.
(setBorderPainted): Reimplemented.
(setMargin): Likewise.
(setSelectionModel): Replaced constant with real string.
* javax/swing/JPopupMenu.java
(LABEL_CHANGED_PROPERTY): Removed.
(VISIBLE_CHANGED_PROPERTY): Likewise.
(borderPainted): Likewise.
(setLabel): Replaced constant with real string.
(setVisible): Exit if new value is identical.
Replaced constant with real string.
* javax/swing/JProgressBar.java
(BORDER_PAINTED_CHANGED_PROPERTY): Removed.
(ORIENTATION_CHANGED_PROPERTY): Likewise.
(STRING_CHANGED_PROPERTY): Likewise.
(STRING_PAINTED_CHANGED_PROPERTY): Likewise.
(INDETERMINATE_CHANGED_PROPERTY): Likewise.
(setOrientation): Replaced constant with real string.
(setStringPainted): Likewise.
(setString): Likewise.
(setBorderPainted): Likewise.
(setIndeterminate): Likewise.
* javax/swing/JScrollBar.java
(BLOCK_INCREMENT_CHANGED_PROPERTY): Removed.
(MODEL_CHANGED_PROPERTY): Likewise.
(ORIENTATION_CHANGED_PROPERTY): Likewise.
(setOrientation): Replaced constant with real string.
(setModel): Likewise.
(setUnitIncrement): Likewise.
(setBlockIncrement): Likewise.
* javax/swing/JScrollPane.java
(COLUMN_HEADER_CHANGED_PROPERTY): Removed.
(COMPONENT_ORIENTATION_CHANGED_PROPERTY): Likewise.
(HORIZONTAL_SCROLLBAR_CHANGED_PROPERTY): Likewise.
(HORIZONTAL_SCROLLBAR_POLICY_CHANGED_PROPERTY): Likewise.
(LAYOUT_CHANGED_PROPERTY): Likewise.
(ROW_HEADER_CHANGED_PROPERTY): Likewise.
(VERTICAL_SCROLLBAR_CHANGED_PROPERTY): Likewise.
(VERTICAL_SCROLLBAR_POLICY_CHANGED_PROPERTY): Likewise.
(VIEWPORT_CHANGED_PROPERTY): Likewise.
(VIEWPORT_BORDER_CHANGED_PROPERTY): Likewise.
(WHEEL_SCROLLING_ENABLED_CHANGED_PROPERTY): Likewise.
(setComponentOrientation): Replaced constant with real string.
(setColumnHeader): Likewise.
(setHorizontalScrollBar): Likewise.
(setHorizontalScrollBarPolicy): Likewise.
(setRowHeader): Likewise.
(setVerticalScrollBar): Likewise.
(setVerticalScrollBarPolicy): Likewise.
(setWheelScrollingEnabled): Likewise.
(setViewport): Likewise.
(setViewportBorder): Likewise.
* javax/swing/JSlider.java
(INVERTED_CHANGED_PROPERTY): Removed.
(LABEL_TABLE_CHANGED_PROPERTY): Likewise.
(MAJOR_TICK_SPACING_CHANGED_PROPERTY): Likewise.
(MINOR_TICK_SPACING_CHANGED_PROPERTY): Likewise.
(MODEL_CHANGED_PROPERTY): Likewise.
(ORIENTATION_CHANGED_PROPERTY): Likewise.
(PAINT_LABELS_CHANGED_PROPERTY): Likewise.
(PAINT_TICKS_CHANGED_PROPERTY): Likewise.
(setModel): Replaced constant with real string.
(setOrientation): Likewise.
(setLabelTable): Likewise.
(setInverted): Likewise.
(setMajorTickSpacing): Likewise.
(setMinorTickSpacing): Likewise.
(setPaintTicks): Likewise.
(setPaintLabels): Likewise.
* javax/swing/JTabbedPane.java
(MODEL_CHANGED_PROPERTY): Removed.
(TAB_PLACEMENT_CHANGED_PROPERTY): Likewise.
(TAB_LAYOUT_POLICY_CHANGED_PROPERTY): Likewise.
(setModel): Replaced constant with real string.
(setTabPlacement): Likewise.
(setTabLayoutPolicy): Likewise.
* javax/swing/JToolBar.java
(ORIENTATION_CHANGED_PROPERTY): Removed.
(FLOATABLE_CHANGED_PROPERTY): Likewise.
(BORDER_PAINTED_CHANGED_PROPERTY): Likewise.
(MARGIN_CHANGED_PROPERTY): Likewise.
(ROLLOVER_CHANGED_PROPERTY): Likewise.
(setRollover): Replaced constant with real string.
(setMargin): Likewise.
(setBorderPainted): Likewise.
(setFloatable): Likewise.
(setOrientation): Likewise.
* javax/swing/plaf/basic/BasicComboBoxUI.java
(PropertyChangeHandler.propertyChange): Likewise.
* javax/swing/plaf/basic/BasicComboPopup.java
(PropertyChangeHandler.propertyChange): Likewise.
* javax/swing/plaf/basic/BasicMenuBarUI.java
(PropertyChangeHandler.propertyChange): Likewise.
* javax/swing/plaf/basic/BasicProgressBarUI.java
(PropertyChangeHandler.propertyChange): Likewise.
* javax/swing/plaf/basic/BasicScrollBarUI.java
(PropertyChangeHandler.propertyChange): Likewise.
* javax/swing/plaf/basic/BasicSliderUI.java
(PropertyChangeHandler.propertyChange): Likewise.
* javax/swing/plaf/basic/BasicTabbedPaneUI.java
(PropertyChangeHandler.propertyChange): Likewise.
* javax/swing/plaf/basic/BasicToolBarUI.java
(PropertyChangeHandler.propertyChange): Likewise.
Members:
ChangeLog:1.3467->1.3468
libraries/javalib/javax/swing/AbstractAction.java:1.3->1.4
libraries/javalib/javax/swing/AbstractButton.java:1.9->1.10
libraries/javalib/javax/swing/JComboBox.java:1.5->1.6
libraries/javalib/javax/swing/JLabel.java:1.7->1.8
libraries/javalib/javax/swing/JList.java:1.6->1.7
libraries/javalib/javax/swing/JMenuBar.java:1.5->1.6
libraries/javalib/javax/swing/JPopupMenu.java:1.6->1.7
libraries/javalib/javax/swing/JProgressBar.java:1.1->1.2
libraries/javalib/javax/swing/JScrollBar.java:1.3->1.4
libraries/javalib/javax/swing/JScrollPane.java:1.8->1.9
libraries/javalib/javax/swing/JSlider.java:1.2->1.3
libraries/javalib/javax/swing/JTabbedPane.java:1.4->1.5
libraries/javalib/javax/swing/JToolBar.java:1.4->1.5
libraries/javalib/javax/swing/plaf/basic/BasicComboBoxUI.java:1.4->1.5
libraries/javalib/javax/swing/plaf/basic/BasicComboPopup.java:1.4->1.5
libraries/javalib/javax/swing/plaf/basic/BasicMenuBarUI.java:1.3->1.4
libraries/javalib/javax/swing/plaf/basic/BasicProgressBarUI.java:1.3->1.4
libraries/javalib/javax/swing/plaf/basic/BasicScrollBarUI.java:1.7->1.8
libraries/javalib/javax/swing/plaf/basic/BasicSliderUI.java:1.7->1.8
libraries/javalib/javax/swing/plaf/basic/BasicTabbedPaneUI.java:1.7->1.8
libraries/javalib/javax/swing/plaf/basic/BasicToolBarUI.java:1.7->1.8
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3467 kaffe/ChangeLog:1.3468
--- kaffe/ChangeLog:1.3467 Thu Jan 27 14:02:32 2005
+++ kaffe/ChangeLog Thu Jan 27 14:07:07 2005
@@ -2,6 +2,182 @@
Resynced with GNU Classpath.
+ 2005-01-27 Michael Koch <konqueror at gmx.de>
+
+ * javax/swing/AbstractAction.java
+ (ENABLED_PROPERTY): Removed.
+ (setEnabled): Replaced constant with real string.
+ * javax/swing/AbstractButton.java
+ (createActionPropertyChangeListener.propertyChange): Likewise.
+ * javax/swing/JComboBox.java
+ (DEFAULT_MAXIMUM_ROW_COUNT): Made private.
+ (EDITABLE_CHANGED_PROPERTY): Removed.
+ (MAXIMUM_ROW_COUNT_CHANGED_PROPERTY):Likewise.
+ (ENABLED_CHANGED_PROPERTY):Likewise.
+ (RENDERER_CHANGED_PROPERTY):Likewise.
+ (EDITOR_CHANGED_PROPERTY):Likewise.
+ (MODEL_CHANGED_PROPERTY):Likewise.
+ (uiClassID):Likewise.
+ (getUIClassID): Replaced constant with real string.
+ (setModel):Likewise.
+ (setEditable):Likewise.
+ (setMaximumRowCount):Likewise.
+ (setRenderer):Likewise.
+ (setEditor):Likewise.
+ (setEnabled):Likewise.
+ * javax/swing/JLabel.java
+ (DISABLED_ICON_CHANGED_PROPERTY): Removed.
+ (DISPLAYED_MNEMONIC_CHANGED_PROPERTY): Likewise.
+ (DISPLAYED_MNEMONIC_INDEX_CHANGED_PROPERTY): Likewise.
+ (HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY): Likewise.
+ (HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY): Likewise.
+ (ICON_CHANGED_PROPERTY): Likewise.
+ (ICON_TEXT_GAP_CHANGED_PROPERTY): Likewise.
+ (LABEL_FOR_CHANGED_PROPERTY): Likewise.
+ (TEXT_CHANGED_PROPERTY): Likewise.
+ (VERTICAL_ALIGNMENT_CHANGED_PROPERTY): Likewise.
+ (VERTICAL_TEXT_POSITION_CHANGED_PROPERTY): Likewise.
+ (setText): Replaced constant with real string.
+ (setIcon): Likewise.
+ (setDisabledIcon): Likewise.
+ (setDisplayedMnemonic): Likewise.
+ (setIconTextGap): Likewise.
+ (setVerticalAlignment): Likewise.
+ (setHorizontalAlignment): Likewise.
+ (setVerticalTextPosition): Likewise.
+ (setHorizontalTextPosition): Likewise.
+ (setLabelFor): Replaced constant with real string.
+ Fire property change event after property got changed.
+ * javax/swing/JList.java
+ (CELL_RENDERER_PROPERTY_CHANGED): Likewise.
+ (FIXED_CELL_HEIGHT_PROPERTY_CHANGED): Likewise.
+ (FIXED_CELL_WIDTH_PROPERTY_CHANGED): Likewise.
+ (LAYOUT_ORIENTATION_PROPERTY_CHANGED): Likewise.
+ (MODEL_PROPERTY_CHANGED): Likewise.
+ (PROTOTYPE_CELL_VALUE_PROPERTY_CHANGED): Likewise.
+ (SELECTION_BACKGROUND_PROPERTY_CHANGED): Likewise.
+ (SELECTION_FOREGROUND_PROPERTY_CHANGED): Likewise.
+ (SELECTION_MODEL_PROPERTY_CHANGED): Likewise.
+ (setFixedCellWidth): Reimplemented.
+ (setFixedCellHeight): Exit if new value is identical.
+ Replaced constant with real string.
+ (setSelectionBackground): Likewise.
+ (setSelectionForeground): Likewise.
+ (setPrototypeCellValue): Likewise.
+ (setCellRenderer): Replaced constant with real string.
+ (setModel): Likewise.
+ (setSelectionModel): Likewise.
+ * javax/swing/JMenuBar.java
+ (BORDER_PAINTED_CHANGED_PROPERTY): Removed.
+ (MODEL_CHANGED_PROPERTY): Likewise.
+ (MARGIN_CHANGED_PROPERTY): Likewise.
+ (setBorderPainted): Reimplemented.
+ (setMargin): Likewise.
+ (setSelectionModel): Replaced constant with real string.
+ * javax/swing/JPopupMenu.java
+ (LABEL_CHANGED_PROPERTY): Removed.
+ (VISIBLE_CHANGED_PROPERTY): Likewise.
+ (borderPainted): Likewise.
+ (setLabel): Replaced constant with real string.
+ (setVisible): Exit if new value is identical.
+ Replaced constant with real string.
+ * javax/swing/JProgressBar.java
+ (BORDER_PAINTED_CHANGED_PROPERTY): Removed.
+ (ORIENTATION_CHANGED_PROPERTY): Likewise.
+ (STRING_CHANGED_PROPERTY): Likewise.
+ (STRING_PAINTED_CHANGED_PROPERTY): Likewise.
+ (INDETERMINATE_CHANGED_PROPERTY): Likewise.
+ (setOrientation): Replaced constant with real string.
+ (setStringPainted): Likewise.
+ (setString): Likewise.
+ (setBorderPainted): Likewise.
+ (setIndeterminate): Likewise.
+ * javax/swing/JScrollBar.java
+ (BLOCK_INCREMENT_CHANGED_PROPERTY): Removed.
+ (MODEL_CHANGED_PROPERTY): Likewise.
+ (ORIENTATION_CHANGED_PROPERTY): Likewise.
+ (setOrientation): Replaced constant with real string.
+ (setModel): Likewise.
+ (setUnitIncrement): Likewise.
+ (setBlockIncrement): Likewise.
+ * javax/swing/JScrollPane.java
+ (COLUMN_HEADER_CHANGED_PROPERTY): Removed.
+ (COMPONENT_ORIENTATION_CHANGED_PROPERTY): Likewise.
+ (HORIZONTAL_SCROLLBAR_CHANGED_PROPERTY): Likewise.
+ (HORIZONTAL_SCROLLBAR_POLICY_CHANGED_PROPERTY): Likewise.
+ (LAYOUT_CHANGED_PROPERTY): Likewise.
+ (ROW_HEADER_CHANGED_PROPERTY): Likewise.
+ (VERTICAL_SCROLLBAR_CHANGED_PROPERTY): Likewise.
+ (VERTICAL_SCROLLBAR_POLICY_CHANGED_PROPERTY): Likewise.
+ (VIEWPORT_CHANGED_PROPERTY): Likewise.
+ (VIEWPORT_BORDER_CHANGED_PROPERTY): Likewise.
+ (WHEEL_SCROLLING_ENABLED_CHANGED_PROPERTY): Likewise.
+ (setComponentOrientation): Replaced constant with real string.
+ (setColumnHeader): Likewise.
+ (setHorizontalScrollBar): Likewise.
+ (setHorizontalScrollBarPolicy): Likewise.
+ (setRowHeader): Likewise.
+ (setVerticalScrollBar): Likewise.
+ (setVerticalScrollBarPolicy): Likewise.
+ (setWheelScrollingEnabled): Likewise.
+ (setViewport): Likewise.
+ (setViewportBorder): Likewise.
+ * javax/swing/JSlider.java
+ (INVERTED_CHANGED_PROPERTY): Removed.
+ (LABEL_TABLE_CHANGED_PROPERTY): Likewise.
+ (MAJOR_TICK_SPACING_CHANGED_PROPERTY): Likewise.
+ (MINOR_TICK_SPACING_CHANGED_PROPERTY): Likewise.
+ (MODEL_CHANGED_PROPERTY): Likewise.
+ (ORIENTATION_CHANGED_PROPERTY): Likewise.
+ (PAINT_LABELS_CHANGED_PROPERTY): Likewise.
+ (PAINT_TICKS_CHANGED_PROPERTY): Likewise.
+ (setModel): Replaced constant with real string.
+ (setOrientation): Likewise.
+ (setLabelTable): Likewise.
+ (setInverted): Likewise.
+ (setMajorTickSpacing): Likewise.
+ (setMinorTickSpacing): Likewise.
+ (setPaintTicks): Likewise.
+ (setPaintLabels): Likewise.
+ * javax/swing/JTabbedPane.java
+ (MODEL_CHANGED_PROPERTY): Removed.
+ (TAB_PLACEMENT_CHANGED_PROPERTY): Likewise.
+ (TAB_LAYOUT_POLICY_CHANGED_PROPERTY): Likewise.
+ (setModel): Replaced constant with real string.
+ (setTabPlacement): Likewise.
+ (setTabLayoutPolicy): Likewise.
+ * javax/swing/JToolBar.java
+ (ORIENTATION_CHANGED_PROPERTY): Removed.
+ (FLOATABLE_CHANGED_PROPERTY): Likewise.
+ (BORDER_PAINTED_CHANGED_PROPERTY): Likewise.
+ (MARGIN_CHANGED_PROPERTY): Likewise.
+ (ROLLOVER_CHANGED_PROPERTY): Likewise.
+ (setRollover): Replaced constant with real string.
+ (setMargin): Likewise.
+ (setBorderPainted): Likewise.
+ (setFloatable): Likewise.
+ (setOrientation): Likewise.
+ * javax/swing/plaf/basic/BasicComboBoxUI.java
+ (PropertyChangeHandler.propertyChange): Likewise.
+ * javax/swing/plaf/basic/BasicComboPopup.java
+ (PropertyChangeHandler.propertyChange): Likewise.
+ * javax/swing/plaf/basic/BasicMenuBarUI.java
+ (PropertyChangeHandler.propertyChange): Likewise.
+ * javax/swing/plaf/basic/BasicProgressBarUI.java
+ (PropertyChangeHandler.propertyChange): Likewise.
+ * javax/swing/plaf/basic/BasicScrollBarUI.java
+ (PropertyChangeHandler.propertyChange): Likewise.
+ * javax/swing/plaf/basic/BasicSliderUI.java
+ (PropertyChangeHandler.propertyChange): Likewise.
+ * javax/swing/plaf/basic/BasicTabbedPaneUI.java
+ (PropertyChangeHandler.propertyChange): Likewise.
+ * javax/swing/plaf/basic/BasicToolBarUI.java
+ (PropertyChangeHandler.propertyChange): Likewise.
+
+2005-01-27 Dalibor Topic <robilad at kaffe.org>
+
+ Resynced with GNU Classpath.
+
2005-01-26 Michael Koch <konqueror at gmx.de>
* javax/swing/DefaultButtonModel.java
Index: kaffe/libraries/javalib/javax/swing/AbstractAction.java
diff -u kaffe/libraries/javalib/javax/swing/AbstractAction.java:1.3 kaffe/libraries/javalib/javax/swing/AbstractAction.java:1.4
--- kaffe/libraries/javalib/javax/swing/AbstractAction.java:1.3 Wed Jan 5 19:37:12 2005
+++ kaffe/libraries/javalib/javax/swing/AbstractAction.java Thu Jan 27 14:07:11 2005
@@ -1,5 +1,5 @@
/* AbstractAction.java --
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -62,8 +62,6 @@
*/
protected boolean enabled = true;
- public static final String ENABLED_PROPERTY = "enabled";
-
/**
* changeSupport
*/
@@ -193,7 +191,7 @@
if (enabled != this.enabled)
{
this.enabled = enabled;
- firePropertyChange(ENABLED_PROPERTY, !this.enabled, this.enabled);
+ firePropertyChange("enabled", !this.enabled, this.enabled);
}
}
Index: kaffe/libraries/javalib/javax/swing/AbstractButton.java
diff -u kaffe/libraries/javalib/javax/swing/AbstractButton.java:1.9 kaffe/libraries/javalib/javax/swing/AbstractButton.java:1.10
--- kaffe/libraries/javalib/javax/swing/AbstractButton.java:1.9 Wed Jan 26 13:40:05 2005
+++ kaffe/libraries/javalib/javax/swing/AbstractButton.java Thu Jan 27 14:07:11 2005
@@ -1509,7 +1509,7 @@
public void propertyChange(PropertyChangeEvent e)
{
Action act = (Action) (e.getSource());
- if (e.getPropertyName().equals(AbstractAction.ENABLED_PROPERTY))
+ if (e.getPropertyName().equals("enabled"))
setEnabled(act.isEnabled());
else if (e.getPropertyName().equals(Action.NAME))
setText((String)(act.getValue(Action.NAME)));
Index: kaffe/libraries/javalib/javax/swing/JComboBox.java
diff -u kaffe/libraries/javalib/javax/swing/JComboBox.java:1.5 kaffe/libraries/javalib/javax/swing/JComboBox.java:1.6
--- kaffe/libraries/javalib/javax/swing/JComboBox.java:1.5 Tue Dec 21 08:23:14 2004
+++ kaffe/libraries/javalib/javax/swing/JComboBox.java Thu Jan 27 14:07:11 2005
@@ -1,5 +1,5 @@
/* JComboBox.java --
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -92,43 +92,7 @@
* Maximum number of rows that should be visible by default in the
* JComboBox's popup
*/
- public static final int DEFAULT_MAXIMUM_ROW_COUNT = 8;
-
- /**
- * Fired in a PropertyChangeEvent when the 'editable' property changes.
- */
- public static final String EDITABLE_CHANGED_PROPERTY = "editable";
-
- /**
- * Fired in a PropertyChangeEvent when the 'maximumRowCount' property
- * changes.
- */
- public static final String MAXIMUM_ROW_COUNT_CHANGED_PROPERTY = "maximumRowCount";
-
- /**
- * Fired in a PropertyChangeEvent when the 'enabled' property changes.
- */
- public static final String ENABLED_CHANGED_PROPERTY = "enabled";
-
- /**
- * Fired in a PropertyChangeEvent when the 'renderer' property changes.
- */
- public static final String RENDERER_CHANGED_PROPERTY = "renderer";
-
- /**
- * Fired in a PropertyChangeEvent when the 'editor' property changes.
- */
- public static final String EDITOR_CHANGED_PROPERTY = "editor";
-
- /**
- * Fired in a PropertyChangeEvent when the 'dataModel' property changes.
- */
- public static final String MODEL_CHANGED_PROPERTY = "dataModel";
-
- /**
- * name for the UI delegate for this combo box.
- */
- private static final String uiClassID = "ComboBoxUI";
+ private static final int DEFAULT_MAXIMUM_ROW_COUNT = 8;
/**
* dataModel used by JComboBox to keep track of its list data and currently
@@ -298,7 +262,7 @@
*/
public String getUIClassID()
{
- return uiClassID;
+ return "ComboBoxUI";
}
/**
@@ -342,7 +306,7 @@
dataModel = newDataModel;
// Notifies the listeners of the model change.
- firePropertyChange(MODEL_CHANGED_PROPERTY, oldDataModel, dataModel);
+ firePropertyChange("model", oldDataModel, dataModel);
}
/**
@@ -397,7 +361,7 @@
if (isEditable != editable)
{
isEditable = editable;
- firePropertyChange(EDITABLE_CHANGED_PROPERTY, ! isEditable, isEditable);
+ firePropertyChange("editable", ! isEditable, isEditable);
}
}
@@ -415,7 +379,7 @@
{
int oldMaximumRowCount = maximumRowCount;
maximumRowCount = rowCount;
- firePropertyChange(MAXIMUM_ROW_COUNT_CHANGED_PROPERTY,
+ firePropertyChange("maximumRowCount",
oldMaximumRowCount, maximumRowCount);
}
}
@@ -447,7 +411,7 @@
{
ListCellRenderer oldRenderer = renderer;
renderer = aRenderer;
- firePropertyChange(RENDERER_CHANGED_PROPERTY, oldRenderer,
+ firePropertyChange("renderer", oldRenderer,
renderer);
}
}
@@ -483,7 +447,7 @@
if (editor != null)
editor.addActionListener(this);
- firePropertyChange(EDITOR_CHANGED_PROPERTY, oldEditor, editor);
+ firePropertyChange("editor", oldEditor, editor);
}
/**
@@ -967,8 +931,7 @@
if (enabled != oldEnabled)
{
super.setEnabled(enabled);
- firePropertyChange(ENABLED_CHANGED_PROPERTY, oldEnabled,
- (boolean) enabled);
+ firePropertyChange("enabled", oldEnabled, enabled);
}
}
Index: kaffe/libraries/javalib/javax/swing/JLabel.java
diff -u kaffe/libraries/javalib/javax/swing/JLabel.java:1.7 kaffe/libraries/javalib/javax/swing/JLabel.java:1.8
--- kaffe/libraries/javalib/javax/swing/JLabel.java:1.7 Thu Dec 23 01:13:36 2004
+++ kaffe/libraries/javalib/javax/swing/JLabel.java Thu Jan 27 14:07:11 2005
@@ -1,5 +1,5 @@
/* JLabel.java --
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -92,59 +92,6 @@
private transient int iconTextGap = 4;
/**
- * Fired in a PropertyChangeEvent when the "disabledIcon" property changes.
- */
- public static final String DISABLED_ICON_CHANGED_PROPERTY = "disabledIcon";
-
- /**
- * Fired in a PropertyChangeEvent when the "displayedMnemonic" property
- * changes.
- */
- public static final String DISPLAYED_MNEMONIC_CHANGED_PROPERTY = "displayedMnemonic";
-
- /**
- * Fired in a PropertyChangeEvent when the "displayedMnemonicIndex" property
- * changes.
- */
- public static final String DISPLAYED_MNEMONIC_INDEX_CHANGED_PROPERTY = "displayedMnemonicIndex";
-
- /**
- * Fired in a PropertyChangeEvent when the "horizontalAlignment" property
- * changes.
- */
- public static final String HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY = "horizontalAlignment";
-
- /**
- * Fired in a PropertyChangeEvent when the "horizontalTextPosition" property
- * changes.
- */
- public static final String HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY = "horizontalTextPosition";
-
- /** Fired in a PropertyChangeEvent when the "icon" property changes. */
- public static final String ICON_CHANGED_PROPERTY = "icon";
-
- /** Fired in a PropertyChangeEvent when the "iconTextGap" property changes. */
- public static final String ICON_TEXT_GAP_CHANGED_PROPERTY = "iconTextGap";
-
- /** Fired in a PropertyChangeEvent when the "labelFor" property changes. */
- public static final String LABEL_FOR_CHANGED_PROPERTY = "labelFor";
-
- /** Fired in a PropertyChangeEvent when the "text" property changes. */
- public static final String TEXT_CHANGED_PROPERTY = "text";
-
- /**
- * Fired in a PropertyChangeEvent when the "verticalAlignment" property
- * changes.
- */
- public static final String VERTICAL_ALIGNMENT_CHANGED_PROPERTY = "verticalAlignment";
-
- /**
- * Fired in a PropertyChangeEvent when the "verticalTextPosition" property
- * changes.
- */
- public static final String VERTICAL_TEXT_POSITION_CHANGED_PROPERTY = "verticalTextPosition";
-
- /**
* Creates a new horizontally and vertically centered JLabel object with no
* text and no icon.
*/
@@ -289,7 +236,7 @@
{
String oldText = text;
text = newText;
- firePropertyChange(TEXT_CHANGED_PROPERTY, oldText, newText);
+ firePropertyChange("text", oldText, newText);
if (text != null && text.length() <= displayedMnemonicIndex)
setDisplayedMnemonicIndex(text.length() - 1);
@@ -319,7 +266,7 @@
{
Icon oldIcon = icon;
icon = newIcon;
- firePropertyChange(ICON_CHANGED_PROPERTY, oldIcon, newIcon);
+ firePropertyChange("icon", oldIcon, newIcon);
}
}
@@ -352,7 +299,7 @@
{
Icon oldIcon = disabledIcon;
disabledIcon = newIcon;
- firePropertyChange(DISABLED_ICON_CHANGED_PROPERTY, oldIcon, newIcon);
+ firePropertyChange("disabledIcon", oldIcon, newIcon);
}
}
@@ -367,7 +314,7 @@
{
if (displayedMnemonic != mnemonic)
{
- firePropertyChange(DISPLAYED_MNEMONIC_CHANGED_PROPERTY,
+ firePropertyChange("displayedMnemonic",
displayedMnemonic, mnemonic);
displayedMnemonic = mnemonic;
@@ -424,7 +371,7 @@
{
int oldIndex = displayedMnemonicIndex;
displayedMnemonicIndex = newIndex;
- firePropertyChange(DISPLAYED_MNEMONIC_INDEX_CHANGED_PROPERTY,
+ firePropertyChange("displayedMnemonicIndex",
oldIndex, newIndex);
}
}
@@ -501,7 +448,7 @@
{
if (iconTextGap != newGap)
{
- firePropertyChange(ICON_TEXT_GAP_CHANGED_PROPERTY, iconTextGap, newGap);
+ firePropertyChange("iconTextGap", iconTextGap, newGap);
iconTextGap = newGap;
}
}
@@ -531,8 +478,7 @@
int oldAlignment = verticalAlignment;
verticalAlignment = checkVerticalKey(alignment, "verticalAlignment");
- firePropertyChange(VERTICAL_ALIGNMENT_CHANGED_PROPERTY,
- oldAlignment, verticalAlignment);
+ firePropertyChange("verticalAlignment", oldAlignment, verticalAlignment);
}
/**
@@ -558,7 +504,7 @@
int oldAlignment = horizontalAlignment;
horizontalAlignment = checkHorizontalKey(alignment, "horizontalAlignment");
- firePropertyChange(HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, oldAlignment,
+ firePropertyChange("horizontalAlignment", oldAlignment,
horizontalAlignment);
}
@@ -586,7 +532,7 @@
int oldPos = verticalTextPosition;
verticalTextPosition = checkVerticalKey(textPosition,
"verticalTextPosition");
- firePropertyChange(VERTICAL_TEXT_POSITION_CHANGED_PROPERTY, oldPos,
+ firePropertyChange("verticalTextPosition", oldPos,
verticalTextPosition);
}
}
@@ -615,7 +561,7 @@
int oldPos = horizontalTextPosition;
horizontalTextPosition = checkHorizontalKey(textPosition,
"horizontalTextPosition");
- firePropertyChange(HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, oldPos,
+ firePropertyChange("horizontalTextPosition", oldPos,
horizontalTextPosition);
}
}
@@ -671,8 +617,9 @@
{
if (c != labelFor)
{
- firePropertyChange(LABEL_FOR_CHANGED_PROPERTY, labelFor, c);
+ Component oldLabelFor = labelFor;
labelFor = c;
+ firePropertyChange("labelFor", oldLabelFor, labelFor);
}
}
Index: kaffe/libraries/javalib/javax/swing/JList.java
diff -u kaffe/libraries/javalib/javax/swing/JList.java:1.6 kaffe/libraries/javalib/javax/swing/JList.java:1.7
--- kaffe/libraries/javalib/javax/swing/JList.java:1.6 Mon Dec 6 19:06:51 2004
+++ kaffe/libraries/javalib/javax/swing/JList.java Thu Jan 27 14:07:11 2005
@@ -1,5 +1,5 @@
/* JList.java --
- Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -129,34 +129,6 @@
*/
public static final int HORIZONTAL_WRAP = 2;
- /** Fired in a PropertyChangeEvent when the "cellRenderer" property changes. */
- public static final String CELL_RENDERER_PROPERTY_CHANGED = "cellRenderer";
-
- /** Fired in a PropertyChangeEvent when the "fixedCellHeight" property changes. */
- public static final String FIXED_CELL_HEIGHT_PROPERTY_CHANGED = "fixedCellHeight";
-
- /** Fired in a PropertyChangeEvent when the "fixedCellWidth" property changes. */
- public static final String FIXED_CELL_WIDTH_PROPERTY_CHANGED = "fixedCellWidth";
-
- /** Fired in a PropertyChangeEvent when the "layoutOrientation" property changes. */
- public static final String LAYOUT_ORIENTATION_PROPERTY_CHANGED = "layoutOrientation";
-
- /** Fired in a PropertyChangeEvent when the "model" property changes. */
- public static final String MODEL_PROPERTY_CHANGED = "model";
-
- /** Fired in a PropertyChangeEvent when the "prototypeCellValue" property changes. */
- public static final String PROTOTYPE_CELL_VALUE_PROPERTY_CHANGED = "prototypeCellValue";
-
- /** Fired in a PropertyChangeEvent when the "selectionBackground" property changes. */
- public static final String SELECTION_BACKGROUND_PROPERTY_CHANGED = "selectionBackground";
-
- /** Fired in a PropertyChangeEvent when the "selectionForeground" property changes. */
- public static final String SELECTION_FOREGROUND_PROPERTY_CHANGED = "selectionForeground";
-
- /** Fired in a PropertyChangeEvent when the "selectionModel" property changes. */
- public static final String SELECTION_MODEL_PROPERTY_CHANGED = "selectionModel";
-
-
/**
* This property indicates whether "drag and drop" functions are enabled
* on the list.
@@ -187,7 +159,6 @@
* is one of the integer constants {@link #VERTICAL}, {@link
* #VERTICAL_WRAP}, or {@link #HORIZONTAL_WRAP}.
*/
-
int layoutOrientation;
/** This property holds the data elements displayed by the list. */
@@ -406,9 +377,12 @@
*/
public void setFixedCellHeight(int h)
{
+ if (fixedCellHeight == h)
+ return;
+
int old = fixedCellHeight;
fixedCellHeight = h;
- firePropertyChange(FIXED_CELL_WIDTH_PROPERTY_CHANGED, old, h);
+ firePropertyChange("fixedCellWidth", old, h);
}
@@ -435,17 +409,19 @@
* #prototypeCellValue} property is set, but setting it explicitly
* overrides the width computed from {@link #prototypeCellValue}.
*
- * @see #getFixedCellWidth
+ * @see #getFixedCellHeight
* @see #getPrototypeCellValue
*/
- public void setFixedCellWidth(int h)
+ public void setFixedCellWidth(int w)
{
- int old = fixedCellHeight;
- fixedCellHeight = h;
- firePropertyChange(FIXED_CELL_HEIGHT_PROPERTY_CHANGED, old, h);
+ if (fixedCellWidth == w)
+ return;
+
+ int old = fixedCellWidth;
+ fixedCellWidth = w;
+ firePropertyChange("fixedCellWidth", old, w);
}
-
/**
* Gets the value of the {@link #visibleRowCount} property.
*
@@ -735,9 +711,12 @@
*/
public void setSelectionBackground(Color c)
{
+ if (selectionBackground == c)
+ return;
+
Color old = selectionBackground;
selectionBackground = c;
- firePropertyChange(SELECTION_BACKGROUND_PROPERTY_CHANGED, old, c);
+ firePropertyChange("selectionBackground", old, c);
repaint();
}
@@ -758,9 +737,12 @@
*/
public void setSelectionForeground(Color c)
{
+ if (selectionForeground == c)
+ return;
+
Color old = selectionForeground;
selectionForeground = c;
- firePropertyChange(SELECTION_FOREGROUND_PROPERTY_CHANGED, old, c);
+ firePropertyChange("selectionForeground", old, c);
}
/**
@@ -871,7 +853,7 @@
ListCellRenderer old = cellRenderer;
cellRenderer = renderer;
- firePropertyChange(CELL_RENDERER_PROPERTY_CHANGED, old, renderer);
+ firePropertyChange("cellRenderer", old, renderer);
revalidate();
repaint();
}
@@ -907,7 +889,7 @@
if (this.model != null)
this.model.addListDataListener(listListener);
- firePropertyChange(MODEL_PROPERTY_CHANGED, old, model);
+ firePropertyChange("model", old, model);
revalidate();
repaint();
}
@@ -939,7 +921,7 @@
if (selectionModel != null)
selectionModel.addListSelectionListener(listListener);
- firePropertyChange(SELECTION_MODEL_PROPERTY_CHANGED, old, model);
+ firePropertyChange("selectionModel", old, model);
revalidate();
repaint();
}
@@ -1019,6 +1001,9 @@
*/
public void setPrototypeCellValue(Object obj)
{
+ if (prototypeCellValue == obj)
+ return;
+
Object old = prototypeCellValue;
Component comp = getCellRenderer()
.getListCellRendererComponent(this, obj, 0, false, false);
@@ -1026,7 +1011,7 @@
fixedCellWidth = d.width;
fixedCellHeight = d.height;
prototypeCellValue = obj;
- firePropertyChange(PROTOTYPE_CELL_VALUE_PROPERTY_CHANGED, old, obj);
+ firePropertyChange("prototypeCellValue", old, obj);
}
public AccessibleContext getAccessibleContext()
Index: kaffe/libraries/javalib/javax/swing/JMenuBar.java
diff -u kaffe/libraries/javalib/javax/swing/JMenuBar.java:1.5 kaffe/libraries/javalib/javax/swing/JMenuBar.java:1.6
--- kaffe/libraries/javalib/javax/swing/JMenuBar.java:1.5 Mon Oct 25 19:30:45 2004
+++ kaffe/libraries/javalib/javax/swing/JMenuBar.java Thu Jan 27 14:07:11 2005
@@ -1,5 +1,5 @@
/* JMenuBar.java --
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -49,7 +49,6 @@
import javax.swing.plaf.MenuBarUI;
/**
- * <p>
* JMenuBar is a container for menu's. For a menu bar to be seen on the
* screen, at least one menu should be added to it. Just like adding
* components to container, one can use add() to add menu's to the menu bar.
@@ -57,18 +56,9 @@
* The JMenuBar uses selectionModel to keep track of selected menu index.
* JMenuBar's selectionModel will fire ChangeEvents to its registered
* listeners when the selected index changes.
- * </p>
*/
public class JMenuBar extends JComponent implements Accessible, MenuElement
{
- /** Fired in a PropertyChangeEvent when the "borderPainted" property changes. */
- public static final String BORDER_PAINTED_CHANGED_PROPERTY = "borderPainted";
-
- /** Fired in a PropertyChangeEvent when the "model" changes. */
- public static final String MODEL_CHANGED_PROPERTY = "model";
-
- /** Fired in a PropertyChangeEvent when the "margin" changes. */
- public static final String MARGIN_CHANGED_PROPERTY = "margin";
private static final long serialVersionUID = -8191026883931977036L;
/** JMenuBar's model. It keeps track of selected menu's index */
@@ -374,11 +364,11 @@
*/
public void setBorderPainted(boolean b)
{
- boolean old = borderPainted;
- borderPainted = b;
- if (b != old)
+ if (b != borderPainted)
{
- firePropertyChange(BORDER_PAINTED_CHANGED_PROPERTY, old, b);
+ boolean old = borderPainted;
+ borderPainted = b;
+ firePropertyChange("borderPainted", old, b);
revalidate();
repaint();
}
@@ -404,14 +394,12 @@
*/
public void setMargin(Insets m)
{
- if (m.equals(this.margin))
+ if (m != margin)
{
- Insets oldMargin = this.margin;
- this.margin = m;
- firePropertyChange(MARGIN_CHANGED_PROPERTY, oldMargin, margin);
+ Insets oldMargin = margin;
+ margin = m;
+ firePropertyChange("margin", oldMargin, margin);
}
-
- this.margin = m;
}
/**
@@ -434,15 +422,11 @@
*/
public void setSelectionModel(SingleSelectionModel model)
{
- selectionModel = model;
if (selectionModel != model)
{
SingleSelectionModel oldModel = selectionModel;
-
selectionModel = model;
-
- firePropertyChange(MODEL_CHANGED_PROPERTY, oldModel,
- this.selectionModel);
+ firePropertyChange("model", oldModel, selectionModel);
}
}
Index: kaffe/libraries/javalib/javax/swing/JPopupMenu.java
diff -u kaffe/libraries/javalib/javax/swing/JPopupMenu.java:1.6 kaffe/libraries/javalib/javax/swing/JPopupMenu.java:1.7
--- kaffe/libraries/javalib/javax/swing/JPopupMenu.java:1.6 Sat Dec 4 02:38:18 2004
+++ kaffe/libraries/javalib/javax/swing/JPopupMenu.java Thu Jan 27 14:07:11 2005
@@ -1,5 +1,5 @@
-/* JPopupMenu.java
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+/* JPopupMenu.java --
+ Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
*** Patch too long, truncated ***
More information about the kaffe
mailing list