aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Koch <konqueror@gmx.de>2005-01-26 23:33:37 +0000
committerMichael Koch <konqueror@gmx.de>2005-01-26 23:33:37 +0000
commit6d8c958d404af439f87df9452b7b5f830fdbfe07 (patch)
treecfa52419554b2328c085d13b441b8a830d217f25
parent578a31314976a613e139904b4ee854bbb739f0cc (diff)
2005-01-27 Michael Koch <konqueror@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. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/java-gui-branch@94293 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libjava/ChangeLog172
-rw-r--r--libjava/javax/swing/AbstractAction.java6
-rw-r--r--libjava/javax/swing/AbstractButton.java2
-rw-r--r--libjava/javax/swing/JComboBox.java55
-rw-r--r--libjava/javax/swing/JLabel.java79
-rw-r--r--libjava/javax/swing/JList.java71
-rw-r--r--libjava/javax/swing/JMenuBar.java36
-rw-r--r--libjava/javax/swing/JPopupMenu.java31
-rw-r--r--libjava/javax/swing/JProgressBar.java31
-rw-r--r--libjava/javax/swing/JScrollBar.java20
-rw-r--r--libjava/javax/swing/JScrollPane.java65
-rw-r--r--libjava/javax/swing/JSlider.java54
-rw-r--r--libjava/javax/swing/JTabbedPane.java26
-rw-r--r--libjava/javax/swing/JToolBar.java28
-rw-r--r--libjava/javax/swing/plaf/basic/BasicComboBoxUI.java8
-rw-r--r--libjava/javax/swing/plaf/basic/BasicComboPopup.java6
-rw-r--r--libjava/javax/swing/plaf/basic/BasicMenuBarUI.java6
-rw-r--r--libjava/javax/swing/plaf/basic/BasicProgressBarUI.java2
-rw-r--r--libjava/javax/swing/plaf/basic/BasicScrollBarUI.java6
-rw-r--r--libjava/javax/swing/plaf/basic/BasicSliderUI.java6
-rw-r--r--libjava/javax/swing/plaf/basic/BasicTabbedPaneUI.java4
-rw-r--r--libjava/javax/swing/plaf/basic/BasicToolBarUI.java4
22 files changed, 336 insertions, 382 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index f344a7b2dd5..2cc4c5d9c7a 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,175 @@
+2005-01-27 Michael Koch <konqueror@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-26 Michael Koch <konqueror@gmx.de>
* javax/swing/DefaultButtonModel.java
diff --git a/libjava/javax/swing/AbstractAction.java b/libjava/javax/swing/AbstractAction.java
index 780af04ab93..c0ddf44ffa5 100644
--- a/libjava/javax/swing/AbstractAction.java
+++ b/libjava/javax/swing/AbstractAction.java
@@ -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 @@ public abstract class AbstractAction
*/
protected boolean enabled = true;
- public static final String ENABLED_PROPERTY = "enabled";
-
/**
* changeSupport
*/
@@ -193,7 +191,7 @@ public abstract class AbstractAction
if (enabled != this.enabled)
{
this.enabled = enabled;
- firePropertyChange(ENABLED_PROPERTY, !this.enabled, this.enabled);
+ firePropertyChange("enabled", !this.enabled, this.enabled);
}
}
diff --git a/libjava/javax/swing/AbstractButton.java b/libjava/javax/swing/AbstractButton.java
index c0ada386ad7..0d9dc118530 100644
--- a/libjava/javax/swing/AbstractButton.java
+++ b/libjava/javax/swing/AbstractButton.java
@@ -1509,7 +1509,7 @@ public abstract class AbstractButton extends JComponent
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)));
diff --git a/libjava/javax/swing/JComboBox.java b/libjava/javax/swing/JComboBox.java
index ca9d3f63acf..4e2a88110fc 100644
--- a/libjava/javax/swing/JComboBox.java
+++ b/libjava/javax/swing/JComboBox.java
@@ -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 @@ public class JComboBox extends JComponent implements ItemSelectable,
* 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 class JComboBox extends JComponent implements ItemSelectable,
*/
public String getUIClassID()
{
- return uiClassID;
+ return "ComboBoxUI";
}
/**
@@ -342,7 +306,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
dataModel = newDataModel;
// Notifies the listeners of the model change.
- firePropertyChange(MODEL_CHANGED_PROPERTY, oldDataModel, dataModel);
+ firePropertyChange("model", oldDataModel, dataModel);
}
/**
@@ -397,7 +361,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
if (isEditable != editable)
{
isEditable = editable;
- firePropertyChange(EDITABLE_CHANGED_PROPERTY, ! isEditable, isEditable);
+ firePropertyChange("editable", ! isEditable, isEditable);
}
}
@@ -415,7 +379,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
{
int oldMaximumRowCount = maximumRowCount;
maximumRowCount = rowCount;
- firePropertyChange(MAXIMUM_ROW_COUNT_CHANGED_PROPERTY,
+ firePropertyChange("maximumRowCount",
oldMaximumRowCount, maximumRowCount);
}
}
@@ -447,7 +411,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
{
ListCellRenderer oldRenderer = renderer;
renderer = aRenderer;
- firePropertyChange(RENDERER_CHANGED_PROPERTY, oldRenderer,
+ firePropertyChange("renderer", oldRenderer,
renderer);
}
}
@@ -483,7 +447,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
if (editor != null)
editor.addActionListener(this);
- firePropertyChange(EDITOR_CHANGED_PROPERTY, oldEditor, editor);
+ firePropertyChange("editor", oldEditor, editor);
}
/**
@@ -967,8 +931,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
if (enabled != oldEnabled)
{
super.setEnabled(enabled);
- firePropertyChange(ENABLED_CHANGED_PROPERTY, oldEnabled,
- (boolean) enabled);
+ firePropertyChange("enabled", oldEnabled, enabled);
}
}
diff --git a/libjava/javax/swing/JLabel.java b/libjava/javax/swing/JLabel.java
index 093d42835f5..c01d8110d9b 100644
--- a/libjava/javax/swing/JLabel.java
+++ b/libjava/javax/swing/JLabel.java
@@ -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 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
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 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
{
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 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
{
Icon oldIcon = icon;
icon = newIcon;
- firePropertyChange(ICON_CHANGED_PROPERTY, oldIcon, newIcon);
+ firePropertyChange("icon", oldIcon, newIcon);
}
}
@@ -352,7 +299,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
{
Icon oldIcon = disabledIcon;
disabledIcon = newIcon;
- firePropertyChange(DISABLED_ICON_CHANGED_PROPERTY, oldIcon, newIcon);
+ firePropertyChange("disabledIcon", oldIcon, newIcon);
}
}
@@ -367,7 +314,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
{
if (displayedMnemonic != mnemonic)
{
- firePropertyChange(DISPLAYED_MNEMONIC_CHANGED_PROPERTY,
+ firePropertyChange("displayedMnemonic",
displayedMnemonic, mnemonic);
displayedMnemonic = mnemonic;
@@ -424,7 +371,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
{
int oldIndex = displayedMnemonicIndex;
displayedMnemonicIndex = newIndex;
- firePropertyChange(DISPLAYED_MNEMONIC_INDEX_CHANGED_PROPERTY,
+ firePropertyChange("displayedMnemonicIndex",
oldIndex, newIndex);
}
}
@@ -501,7 +448,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
{
if (iconTextGap != newGap)
{
- firePropertyChange(ICON_TEXT_GAP_CHANGED_PROPERTY, iconTextGap, newGap);
+ firePropertyChange("iconTextGap", iconTextGap, newGap);
iconTextGap = newGap;
}
}
@@ -531,8 +478,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
int oldAlignment = verticalAlignment;
verticalAlignment = checkVerticalKey(alignment, "verticalAlignment");
- firePropertyChange(VERTICAL_ALIGNMENT_CHANGED_PROPERTY,
- oldAlignment, verticalAlignment);
+ firePropertyChange("verticalAlignment", oldAlignment, verticalAlignment);
}
/**
@@ -558,7 +504,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
int oldAlignment = horizontalAlignment;
horizontalAlignment = checkHorizontalKey(alignment, "horizontalAlignment");
- firePropertyChange(HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, oldAlignment,
+ firePropertyChange("horizontalAlignment", oldAlignment,
horizontalAlignment);
}
@@ -586,7 +532,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
int oldPos = verticalTextPosition;
verticalTextPosition = checkVerticalKey(textPosition,
"verticalTextPosition");
- firePropertyChange(VERTICAL_TEXT_POSITION_CHANGED_PROPERTY, oldPos,
+ firePropertyChange("verticalTextPosition", oldPos,
verticalTextPosition);
}
}
@@ -615,7 +561,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
int oldPos = horizontalTextPosition;
horizontalTextPosition = checkHorizontalKey(textPosition,
"horizontalTextPosition");
- firePropertyChange(HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, oldPos,
+ firePropertyChange("horizontalTextPosition", oldPos,
horizontalTextPosition);
}
}
@@ -671,8 +617,9 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
{
if (c != labelFor)
{
- firePropertyChange(LABEL_FOR_CHANGED_PROPERTY, labelFor, c);
+ Component oldLabelFor = labelFor;
labelFor = c;
+ firePropertyChange("labelFor", oldLabelFor, labelFor);
}
}
diff --git a/libjava/javax/swing/JList.java b/libjava/javax/swing/JList.java
index 73c1cb9f73c..f26fa8a0b2c 100644
--- a/libjava/javax/swing/JList.java
+++ b/libjava/javax/swing/JList.java
@@ -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 class JList extends JComponent implements Accessible, Scrollable
*/
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 @@ public class JList extends JComponent implements Accessible, Scrollable
* 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 class JList extends JComponent implements Accessible, Scrollable
*/
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 @@ public class JList extends JComponent implements Accessible, Scrollable
* #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 class JList extends JComponent implements Accessible, Scrollable
*/
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 class JList extends JComponent implements Accessible, Scrollable
*/
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 @@ public class JList extends JComponent implements Accessible, Scrollable
ListCellRenderer old = cellRenderer;
cellRenderer = renderer;
- firePropertyChange(CELL_RENDERER_PROPERTY_CHANGED, old, renderer);
+ firePropertyChange("cellRenderer", old, renderer);
revalidate();
repaint();
}
@@ -907,7 +889,7 @@ public class JList extends JComponent implements Accessible, Scrollable
if (this.model != null)
this.model.addListDataListener(listListener);
- firePropertyChange(MODEL_PROPERTY_CHANGED, old, model);
+ firePropertyChange("model", old, model);
revalidate();
repaint();
}
@@ -939,7 +921,7 @@ public class JList extends JComponent implements Accessible, Scrollable
if (selectionModel != null)
selectionModel.addListSelectionListener(listListener);
- firePropertyChange(SELECTION_MODEL_PROPERTY_CHANGED, old, model);
+ firePropertyChange("selectionModel", old, model);
revalidate();
repaint();
}
@@ -1019,6 +1001,9 @@ public class JList extends JComponent implements Accessible, Scrollable
*/
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 @@ public class JList extends JComponent implements Accessible, Scrollable
fixedCellWidth = d.width;
fixedCellHeight = d.height;
prototypeCellValue = obj;
- firePropertyChange(PROTOTYPE_CELL_VALUE_PROPERTY_CHANGED, old, obj);
+ firePropertyChange("prototypeCellValue", old, obj);
}
public AccessibleContext getAccessibleContext()
diff --git a/libjava/javax/swing/JMenuBar.java b/libjava/javax/swing/JMenuBar.java
index 2bcdd67acd0..11b134d6425 100644
--- a/libjava/javax/swing/JMenuBar.java
+++ b/libjava/javax/swing/JMenuBar.java
@@ -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.accessibility.AccessibleContext;
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 @@ import javax.swing.plaf.MenuBarUI;
* 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 class JMenuBar extends JComponent implements Accessible, MenuElement
*/
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 class JMenuBar extends JComponent implements Accessible, MenuElement
*/
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 class JMenuBar extends JComponent implements Accessible, MenuElement
*/
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);
}
}
diff --git a/libjava/javax/swing/JPopupMenu.java b/libjava/javax/swing/JPopupMenu.java
index 14e760ae965..704e8319e63 100644
--- a/libjava/javax/swing/JPopupMenu.java
+++ b/libjava/javax/swing/JPopupMenu.java
@@ -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.
@@ -95,9 +95,6 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement
/** name for the UI delegate for this menuItem. */
private static final String uiClassID = "PopupMenuUI";
- /** Fire a PropertyChangeEvent when the "borderPainted" property changes. */
- public static final String LABEL_CHANGED_PROPERTY = "label";
-
/* indicates if popup's menu border should be painted*/
private boolean borderPainted = true;
@@ -142,9 +139,6 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement
/* Field indicating if popup menu is visible or not */
private boolean visible = false;
- /* Bound Property indicating visibility of the popup menu*/
- public static final String VISIBLE_CHANGED_PROPERTY = "visible";
-
/**
* Creates a new JPopupMenu object.
*/
@@ -291,18 +285,6 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement
}
/**
- * Paints popup menu's border if borderPainted is true
- *
- * @param graphics graphics context used to paint this popup's menu border.
- */
- protected void borderPainted(Graphics graphics)
- {
- if (borderPainted)
- getBorder().paintBorder(this, graphics, 0, 0, getSize(null).width,
- getSize(null).height);
- }
-
- /**
* Returns flag indicating if newly created JPopupMenu will use
* heavyweight or lightweight container to display its menu items
*
@@ -449,7 +431,7 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement
/**
* Sets label for this popup menu. This method fires PropertyChangeEvent
* when the label property is changed. Please note that most
- * of the Look & Feel will ignore this property.
+ * of the Look &amp; Feel will ignore this property.
*
* @param label label for this popup menu
*/
@@ -459,7 +441,7 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement
{
String oldLabel = this.label;
this.label = label;
- firePropertyChange(LABEL_CHANGED_PROPERTY, oldLabel, label);
+ firePropertyChange("label", oldLabel, label);
}
}
@@ -571,11 +553,14 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement
*/
public void setVisible(boolean visible)
{
+ if (visible == isVisible())
+ return;
+
boolean old = isVisible();
this.visible = visible;
if (old != isVisible())
{
- firePropertyChange(VISIBLE_CHANGED_PROPERTY, old, (boolean) isVisible());
+ firePropertyChange("visible", old, isVisible());
if (visible)
{
firePopupMenuWillBecomeVisible();
diff --git a/libjava/javax/swing/JProgressBar.java b/libjava/javax/swing/JProgressBar.java
index 3c4084724f2..cf9334904d5 100644
--- a/libjava/javax/swing/JProgressBar.java
+++ b/libjava/javax/swing/JProgressBar.java
@@ -1,5 +1,5 @@
/* JProgressBar.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.
@@ -35,6 +35,7 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
+
package javax.swing;
import java.awt.Graphics;
@@ -48,14 +49,11 @@ import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import javax.swing.plaf.ProgressBarUI;
-
/**
- * <p>
* The ProgressBar is a widget that displays in two modes. In
* determinate mode, it displays fills a percentage of its bar
* based on its current value. In indeterminate mode, it creates
* box and bounces it between its bounds.
- * </p>
*
* <p>
* JProgressBars have the following properties:
@@ -171,21 +169,6 @@ public class JProgressBar extends JComponent implements SwingConstants,
private static final long serialVersionUID = 1980046021813598781L;
- /** Fired in a PropertyChangeEvent when the "borderPainted" property changes. */
- public static final String BORDER_PAINTED_CHANGED_PROPERTY = "borderPainted";
-
- /** Fired in a PropertyChangeEvent when the "orientation" property changes. */
- public static final String ORIENTATION_CHANGED_PROPERTY = "orientation";
-
- /** Fired in a PropertyChangeEvent when the "string" property changes. */
- public static final String STRING_CHANGED_PROPERTY = "string";
-
- /** Fired in a PropertyChangeEvent when the "stringPainted" property changes. */
- public static final String STRING_PAINTED_CHANGED_PROPERTY = "stringPainted";
-
- /** Fired in a PropertyChangeEvent when the "indeterminate" property changes. */
- public static final String INDETERMINATE_CHANGED_PROPERTY = "indeterminate";
-
/** Whether the ProgressBar is determinate. */
private transient boolean indeterminate = false;
@@ -331,7 +314,7 @@ public class JProgressBar extends JComponent implements SwingConstants,
{
int oldOrientation = this.orientation;
this.orientation = orientation;
- firePropertyChange(ORIENTATION_CHANGED_PROPERTY, oldOrientation,
+ firePropertyChange("orientation", oldOrientation,
this.orientation);
}
}
@@ -357,7 +340,7 @@ public class JProgressBar extends JComponent implements SwingConstants,
{
boolean oldPainted = paintString;
paintString = painted;
- firePropertyChange(STRING_PAINTED_CHANGED_PROPERTY, oldPainted,
+ firePropertyChange("stringPainted", oldPainted,
paintString);
}
}
@@ -394,7 +377,7 @@ public class JProgressBar extends JComponent implements SwingConstants,
{
String oldString = progressString;
progressString = string;
- firePropertyChange(STRING_CHANGED_PROPERTY, oldString, progressString);
+ firePropertyChange("string", oldString, progressString);
}
}
@@ -435,7 +418,7 @@ public class JProgressBar extends JComponent implements SwingConstants,
{
boolean oldPainted = paintBorder;
paintBorder = painted;
- firePropertyChange(BORDER_PAINTED_CHANGED_PROPERTY, oldPainted,
+ firePropertyChange("borderPainted", oldPainted,
paintBorder);
}
}
@@ -641,7 +624,7 @@ public class JProgressBar extends JComponent implements SwingConstants,
{
boolean olddeter = indeterminate;
indeterminate = newValue;
- firePropertyChange(INDETERMINATE_CHANGED_PROPERTY, olddeter,
+ firePropertyChange("indeterminate", olddeter,
indeterminate);
}
}
diff --git a/libjava/javax/swing/JScrollBar.java b/libjava/javax/swing/JScrollBar.java
index 5df6596d574..0ed7679e77f 100644
--- a/libjava/javax/swing/JScrollBar.java
+++ b/libjava/javax/swing/JScrollBar.java
@@ -152,18 +152,6 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
private static final long serialVersionUID = -8195169869225066566L;
- /** Fired in a PropertyChangeEvent when the "blockIncrement" changes. */
- public static final String BLOCK_INCREMENT_CHANGED_PROPERTY = "blockIncrement";
-
- /** Fired in a PropertyChangeEvent when the "model" changes. */
- public static final String MODEL_CHANGED_PROPERTY = "model";
-
- /** Fired in a PropertyChangeEvent when the "orientation" changes. */
- public static final String ORIENTATION_CHANGED_PROPERTY = "orientation";
-
- /** Fired in a PropertyChangeEvent when the "unitIncrement" changes. */
- public static final String UNIT_INCREMENT_CHANGED_PROPERTY = "unitIncrement";
-
/** How much the thumb moves when moving in a block. */
protected int blockIncrement = 10;
@@ -287,7 +275,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
{
int oldOrientation = this.orientation;
this.orientation = orientation;
- firePropertyChange(ORIENTATION_CHANGED_PROPERTY, oldOrientation,
+ firePropertyChange("orientation", oldOrientation,
this.orientation);
}
}
@@ -315,7 +303,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
{
BoundedRangeModel oldModel = model;
model = newModel;
- firePropertyChange(MODEL_CHANGED_PROPERTY, oldModel, model);
+ firePropertyChange("model", oldModel, model);
}
}
@@ -344,7 +332,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
{
int oldInc = this.unitIncrement;
this.unitIncrement = unitIncrement;
- firePropertyChange(UNIT_INCREMENT_CHANGED_PROPERTY, oldInc,
+ firePropertyChange("unitIncrement", oldInc,
this.unitIncrement);
}
}
@@ -374,7 +362,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
{
int oldInc = this.blockIncrement;
this.blockIncrement = blockIncrement;
- firePropertyChange(BLOCK_INCREMENT_CHANGED_PROPERTY, oldInc,
+ firePropertyChange("blockIncrement", oldInc,
this.blockIncrement);
}
}
diff --git a/libjava/javax/swing/JScrollPane.java b/libjava/javax/swing/JScrollPane.java
index 34e53ad30dd..dfe5a76b196 100644
--- a/libjava/javax/swing/JScrollPane.java
+++ b/libjava/javax/swing/JScrollPane.java
@@ -99,18 +99,6 @@ public class JScrollPane
boolean wheelScrollingEnabled;
ChangeListener scrollListener;
- public static final String COLUMN_HEADER_CHANGED_PROPERTY = "columnHeader";
- public static final String COMPONENT_ORIENTATION_CHANGED_PROPERTY = "componentOrientation";
- public static final String HORIZONTAL_SCROLLBAR_CHANGED_PROPERTY = "horizontalScrollBar";
- public static final String HORIZONTAL_SCROLLBAR_POLICY_CHANGED_PROPERTY = "horizontalScrollBarPolicy";
- public static final String LAYOUT_CHANGED_PROPERTY = "layout";
- public static final String ROW_HEADER_CHANGED_PROPERTY = "rowHeader";
- public static final String VERTICAL_SCROLLBAR_CHANGED_PROPERTY = "verticalScrollBar";
- public static final String VERTICAL_SCROLLBAR_POLICY_CHANGED_PROPERTY = "verticalScrollBarPolicy";
- public static final String VIEWPORT_CHANGED_PROPERTY = "viewport";
- public static final String VIEWPORT_BORDER_CHANGED_PROPERTY = "viewportBorder";
- public static final String WHEEL_SCROLLING_ENABLED_CHANGED_PROPERTY = "wheelScrollingEnabled";
-
public JViewport getColumnHeader()
{
return columnHeader;
@@ -247,17 +235,20 @@ public class JScrollPane
{
ComponentOrientation old = super.getComponentOrientation();
super.setComponentOrientation(co);
- firePropertyChange(COMPONENT_ORIENTATION_CHANGED_PROPERTY, old, co);
+ firePropertyChange("componentOrientation", old, co);
sync();
}
public void setColumnHeader(JViewport h)
{
+ if (columnHeader == h)
+ return;
+
JViewport old = columnHeader;
removeNonNull(old);
columnHeader = h;
addNonNull(h);
- firePropertyChange(COLUMN_HEADER_CHANGED_PROPERTY, old, h);
+ firePropertyChange("columnHeader", old, h);
sync();
}
@@ -327,11 +318,14 @@ public class JScrollPane
public void setHorizontalScrollBar(JScrollBar h)
{
+ if (horizontalScrollBar == h)
+ return;
+
JScrollBar old = horizontalScrollBar;
removeNonNull(old);
horizontalScrollBar = h;
addNonNull(h);
- firePropertyChange(HORIZONTAL_SCROLLBAR_CHANGED_PROPERTY, old, h);
+ firePropertyChange("horizontalScrollBar", old, h);
sync();
if (old != null)
@@ -349,14 +343,18 @@ public class JScrollPane
}
public void setHorizontalScrollBarPolicy(int h)
- {
+ {
+ if (horizontalScrollBarPolicy == h)
+ return;
+
if (h != HORIZONTAL_SCROLLBAR_AS_NEEDED
&& h != HORIZONTAL_SCROLLBAR_NEVER
&& h != HORIZONTAL_SCROLLBAR_ALWAYS)
throw new IllegalArgumentException("unknown horizontal scrollbar policy");
+
int old = horizontalScrollBarPolicy;
horizontalScrollBarPolicy = h;
- firePropertyChange(HORIZONTAL_SCROLLBAR_POLICY_CHANGED_PROPERTY, old, h);
+ firePropertyChange("horizontalScrollBarPolicy", old, h);
sync();
}
@@ -366,17 +364,20 @@ public class JScrollPane
ScrollPaneLayout tmp = (ScrollPaneLayout) l;
super.setLayout(l);
tmp.syncWithScrollPane(this);
- firePropertyChange(LAYOUT_CHANGED_PROPERTY, old, l);
+ firePropertyChange("layout", old, l);
sync();
}
public void setRowHeader(JViewport v)
{
+ if (rowHeader == v)
+ return;
+
JViewport old = rowHeader;
removeNonNull(old);
rowHeader = v;
addNonNull(v);
- firePropertyChange(ROW_HEADER_CHANGED_PROPERTY, old, v);
+ firePropertyChange("rowHeader", old, v);
sync();
}
@@ -390,11 +391,14 @@ public class JScrollPane
public void setVerticalScrollBar(JScrollBar v)
{
+ if (verticalScrollBar == v)
+ return;
+
JScrollBar old = verticalScrollBar;
removeNonNull(old);
verticalScrollBar = v;
addNonNull(v);
- firePropertyChange(VERTICAL_SCROLLBAR_CHANGED_PROPERTY, old, v);
+ firePropertyChange("verticalScrollBar", old, v);
sync();
if (old != null)
@@ -413,26 +417,36 @@ public class JScrollPane
public void setVerticalScrollBarPolicy(int v)
{
+ if (verticalScrollBarPolicy == v)
+ return;
+
if (v != VERTICAL_SCROLLBAR_AS_NEEDED
&& v != VERTICAL_SCROLLBAR_NEVER
&& v != VERTICAL_SCROLLBAR_ALWAYS)
throw new IllegalArgumentException("unknown vertical scrollbar policy");
+
int old = verticalScrollBarPolicy;
verticalScrollBarPolicy = v;
- firePropertyChange(VERTICAL_SCROLLBAR_POLICY_CHANGED_PROPERTY, old, v);
+ firePropertyChange("verticalScrollBarPolicy", old, v);
sync();
}
public void setWheelScrollingEnabled(boolean b)
{
+ if (wheelScrollingEnabled == b)
+ return;
+
boolean old = wheelScrollingEnabled;
wheelScrollingEnabled = b;
- firePropertyChange(WHEEL_SCROLLING_ENABLED_CHANGED_PROPERTY, old, b);
+ firePropertyChange("wheelScrollingEnabled", old, b);
sync();
}
public void setViewport(JViewport v)
{
+ if (viewport == v)
+ return;
+
JViewport old = viewport;
removeNonNull(old);
if (old != null)
@@ -443,15 +457,18 @@ public class JScrollPane
addNonNull(v);
revalidate();
repaint();
- firePropertyChange(VIEWPORT_CHANGED_PROPERTY, old, v);
+ firePropertyChange("viewport", old, v);
sync();
}
public void setViewportBorder(Border b)
{
+ if (viewportBorder == b)
+ return;
+
Border old = viewportBorder;
viewportBorder = b;
- firePropertyChange(VIEWPORT_BORDER_CHANGED_PROPERTY, old, b);
+ firePropertyChange("viewportBorder", old, b);
sync();
}
diff --git a/libjava/javax/swing/JSlider.java b/libjava/javax/swing/JSlider.java
index 6c7b19a8e5d..cfe7880df65 100644
--- a/libjava/javax/swing/JSlider.java
+++ b/libjava/javax/swing/JSlider.java
@@ -1,5 +1,5 @@
/* JSlider.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.
@@ -35,6 +35,7 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
+
package javax.swing;
import java.awt.Dimension;
@@ -54,14 +55,11 @@ import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import javax.swing.plaf.SliderUI;
-
/**
- * <p>
* The JSlider is a Swing component that allows selection of a value within a
* range by adjusting a thumb in a track. The values for the minimum,
* maximum, extent and value are stored in a {@link
* DefaultBoundedRangeModel}.
- * </p>
*
* <p>
* JSliders have the following properties:
@@ -206,36 +204,6 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
}
- /** Fired in a PropertyChangeEvent when the "inverted" property changes. */
- public static final String INVERTED_CHANGED_PROPERTY = "inverted";
-
- /** Fired in a PropertyChangeEvent when the "labelTable" property changes. */
- public static final String LABEL_TABLE_CHANGED_PROPERTY = "labelTable";
-
- /**
- * Fired in a PropertyChangeEvent when the "majorTickSpacing" property
- * changes.
- */
- public static final String MAJOR_TICK_SPACING_CHANGED_PROPERTY = "majorTickSpacing";
-
- /**
- * Fired in a PropertyChangeEvent when the "minorTickSpacing" property
- * changes.
- */
- public static final String MINOR_TICK_SPACING_CHANGED_PROPERTY = "minorTickSpacing";
-
- /** Fired in a PropertyChangeEvent when the "model" property changes. */
- public static final String MODEL_CHANGED_PROPERTY = "model";
-
- /** Fired in a PropertyChangeEvent when the "orientation" property changes. */
- public static final String ORIENTATION_CHANGED_PROPERTY = "orientation";
-
- /** Fired in a PropertyChangeEvent when the "paintLabels" property changes. */
- public static final String PAINT_LABELS_CHANGED_PROPERTY = "paintLabels";
-
- /** Fired in a PropertyChangeEvent when the "paintTicks" property changes. */
- public static final String PAINT_TICKS_CHANGED_PROPERTY = "paintTicks";
-
/** Whether or not this slider paints its ticks. */
private transient boolean paintTicks = false;
@@ -515,7 +483,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
sliderModel = model;
oldModel.removeChangeListener(changeListener);
sliderModel.addChangeListener(changeListener);
- firePropertyChange(MODEL_CHANGED_PROPERTY, oldModel, sliderModel);
+ firePropertyChange("model", oldModel, sliderModel);
}
}
@@ -624,7 +592,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
{
int oldOrientation = this.orientation;
this.orientation = orientation;
- firePropertyChange(ORIENTATION_CHANGED_PROPERTY, oldOrientation,
+ firePropertyChange("orientation", oldOrientation,
this.orientation);
}
}
@@ -650,7 +618,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
{
Dictionary oldTable = labelTable;
labelTable = table;
- firePropertyChange(LABEL_TABLE_CHANGED_PROPERTY, oldTable, labelTable);
+ firePropertyChange("labelTable", oldTable, labelTable);
}
}
@@ -751,7 +719,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
{
boolean oldInverted = isInverted;
isInverted = inverted;
- firePropertyChange(INVERTED_CHANGED_PROPERTY, oldInverted, isInverted);
+ firePropertyChange("inverted", oldInverted, isInverted);
}
}
@@ -777,7 +745,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
{
int oldSpacing = majorTickSpacing;
majorTickSpacing = spacing;
- firePropertyChange(MAJOR_TICK_SPACING_CHANGED_PROPERTY, oldSpacing,
+ firePropertyChange("majorTickSpacing", oldSpacing,
majorTickSpacing);
}
}
@@ -804,7 +772,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
{
int oldSpacing = minorTickSpacing;
minorTickSpacing = spacing;
- firePropertyChange(MINOR_TICK_SPACING_CHANGED_PROPERTY, oldSpacing,
+ firePropertyChange("minorTickSpacing", oldSpacing,
minorTickSpacing);
}
}
@@ -864,8 +832,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
{
boolean oldPaintTicks = paintTicks;
paintTicks = paint;
- firePropertyChange(PAINT_TICKS_CHANGED_PROPERTY, oldPaintTicks,
- paintTicks);
+ firePropertyChange("paintTicks", oldPaintTicks, paintTicks);
}
}
@@ -910,8 +877,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
{
boolean oldPaintLabels = paintLabels;
paintLabels = paint;
- firePropertyChange(PAINT_LABELS_CHANGED_PROPERTY, oldPaintLabels,
- paintLabels);
+ firePropertyChange("paintLabels", oldPaintLabels, paintLabels);
}
}
diff --git a/libjava/javax/swing/JTabbedPane.java b/libjava/javax/swing/JTabbedPane.java
index 25733df4a79..1111d5820d0 100644
--- a/libjava/javax/swing/JTabbedPane.java
+++ b/libjava/javax/swing/JTabbedPane.java
@@ -1,5 +1,5 @@
/* JTabbedPane.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.
@@ -56,10 +56,8 @@ import javax.swing.plaf.TabbedPaneUI;
import javax.swing.plaf.UIResource;
/**
- * <p>
* This is a container for components. One component is displayed at a time.
* Users can switch between components by clicking on tabs.
- * </p>
*
* <p>
* Tabs can be oriented in several ways. They can be above, below, left and
@@ -532,20 +530,6 @@ public class JTabbedPane extends JComponent implements Serializable,
}
}
- /** Fired in a PropertyChangeEvent when the "model" property changes. */
- public static final String MODEL_CHANGED_PROPERTY = "model";
-
- /**
- * Fired in a PropertyChangeEvent when the "tabPlacement" property changes.
- */
- public static final String TAB_PLACEMENT_CHANGED_PROPERTY = "tabPlacement";
-
- /**
- * Fired in a PropertyChangeEvent when the "tabLayoutPolicy" property
- * changes.
- */
- public static final String TAB_LAYOUT_POLICY_CHANGED_PROPERTY = "tabLayoutPolicy";
-
/** The changeEvent used to fire changes to listeners. */
protected ChangeEvent changeEvent;
@@ -739,7 +723,7 @@ public class JTabbedPane extends JComponent implements Serializable,
this.model.removeChangeListener(changeListener);
this.model = model;
this.model.addChangeListener(changeListener);
- firePropertyChange(MODEL_CHANGED_PROPERTY, oldModel, this.model);
+ firePropertyChange("model", oldModel, this.model);
}
}
@@ -770,8 +754,7 @@ public class JTabbedPane extends JComponent implements Serializable,
{
int oldPlacement = this.tabPlacement;
this.tabPlacement = tabPlacement;
- firePropertyChange(TAB_PLACEMENT_CHANGED_PROPERTY, oldPlacement,
- this.tabPlacement);
+ firePropertyChange("tabPlacement", oldPlacement, this.tabPlacement);
}
}
@@ -802,8 +785,7 @@ public class JTabbedPane extends JComponent implements Serializable,
{
int oldPolicy = layoutPolicy;
layoutPolicy = tabLayoutPolicy;
- firePropertyChange(TAB_LAYOUT_POLICY_CHANGED_PROPERTY, oldPolicy,
- layoutPolicy);
+ firePropertyChange("tabLayoutPolicy", oldPolicy, layoutPolicy);
}
}
diff --git a/libjava/javax/swing/JToolBar.java b/libjava/javax/swing/JToolBar.java
index 38f3ed87198..55f4c155f80 100644
--- a/libjava/javax/swing/JToolBar.java
+++ b/libjava/javax/swing/JToolBar.java
@@ -1,5 +1,5 @@
/* JToolBar.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.
@@ -378,21 +378,6 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible
/** The orientation of the JToolBar. */
private int orientation = HORIZONTAL;
- /** Fired in a PropertyChangeEvent when the orientation property changes. */
- public static final String ORIENTATION_CHANGED_PROPERTY = "orientation";
-
- /** Fired in a PropertyChangeEvent when the floatable property changes. */
- public static final String FLOATABLE_CHANGED_PROPERTY = "floatable";
-
- /** Fired in a PropertyChangeEvent when the borderPainted property changes. */
- public static final String BORDER_PAINTED_CHANGED_PROPERTY = "borderPainted";
-
- /** Fired in a PropertyChangeEvent when the margin property changes. */
- public static final String MARGIN_CHANGED_PROPERTY = "margin";
-
- /** Fired in a PropertyChangeEvent when the rollover property changes. */
- public static final String ROLLOVER_CHANGED_PROPERTY = "rollover";
-
/**
* This method creates a new JToolBar object with horizontal orientation
* and no name.
@@ -519,7 +504,7 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible
if (b != rollover)
{
rollover = b;
- firePropertyChange(ROLLOVER_CHANGED_PROPERTY, ! rollover, rollover);
+ firePropertyChange("rollover", ! rollover, rollover);
revalidate();
repaint();
}
@@ -595,7 +580,7 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible
{
Insets oldMargin = this.margin;
this.margin = margin;
- firePropertyChange(MARGIN_CHANGED_PROPERTY, oldMargin, this.margin);
+ firePropertyChange("margin", oldMargin, this.margin);
revalidate();
repaint();
}
@@ -622,7 +607,7 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible
if (painted != paintBorder)
{
paintBorder = painted;
- firePropertyChange(BORDER_PAINTED_CHANGED_PROPERTY, ! paintBorder,
+ firePropertyChange("borderPainted", ! paintBorder,
paintBorder);
repaint();
}
@@ -649,7 +634,7 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible
if (floatable != this.floatable)
{
this.floatable = floatable;
- firePropertyChange(FLOATABLE_CHANGED_PROPERTY, ! floatable, floatable);
+ firePropertyChange("floatable", ! floatable, floatable);
}
} // setFloatable()
@@ -692,8 +677,7 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible
{
int oldOrientation = this.orientation;
this.orientation = orientation;
- firePropertyChange(ORIENTATION_CHANGED_PROPERTY, oldOrientation,
- this.orientation);
+ firePropertyChange("orientation", oldOrientation, this.orientation);
revalidate();
repaint();
}
diff --git a/libjava/javax/swing/plaf/basic/BasicComboBoxUI.java b/libjava/javax/swing/plaf/basic/BasicComboBoxUI.java
index abde078926a..9044ed76c86 100644
--- a/libjava/javax/swing/plaf/basic/BasicComboBoxUI.java
+++ b/libjava/javax/swing/plaf/basic/BasicComboBoxUI.java
@@ -1,5 +1,5 @@
/* BasicComboBoxUI.java --
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -1146,7 +1146,7 @@ public class BasicComboBoxUI extends ComboBoxUI
*/
public void propertyChange(PropertyChangeEvent e)
{
- if (e.getPropertyName().equals(JComboBox.ENABLED_CHANGED_PROPERTY))
+ if (e.getPropertyName().equals("enabled"))
{
arrowButton.setEnabled(comboBox.isEnabled());
@@ -1154,7 +1154,7 @@ public class BasicComboBoxUI extends ComboBoxUI
comboBox.getEditor().getEditorComponent().setEnabled(comboBox
.isEnabled());
}
- else if (e.getPropertyName().equals(JComboBox.EDITABLE_CHANGED_PROPERTY))
+ else if (e.getPropertyName().equals("editable"))
{
if (comboBox.isEditable())
{
@@ -1170,7 +1170,7 @@ public class BasicComboBoxUI extends ComboBoxUI
comboBox.revalidate();
comboBox.repaint();
}
- else if (e.getPropertyName().equals(JComboBox.MODEL_CHANGED_PROPERTY))
+ else if (e.getPropertyName().equals("dataModel"))
{
// remove ListDataListener from old model and add it to new model
ComboBoxModel oldModel = (ComboBoxModel) e.getOldValue();
diff --git a/libjava/javax/swing/plaf/basic/BasicComboPopup.java b/libjava/javax/swing/plaf/basic/BasicComboPopup.java
index bec7f058f9d..2acc21fa7d4 100644
--- a/libjava/javax/swing/plaf/basic/BasicComboPopup.java
+++ b/libjava/javax/swing/plaf/basic/BasicComboPopup.java
@@ -1,5 +1,5 @@
/* BasicComboPopup.java --
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -938,13 +938,13 @@ public class BasicComboPopup extends JPopupMenu implements ComboPopup
public void propertyChange(PropertyChangeEvent e)
{
- if (e.getPropertyName().equals(JComboBox.RENDERER_CHANGED_PROPERTY))
+ if (e.getPropertyName().equals("renderer"))
{
list.setCellRenderer((ListCellRenderer) e.getNewValue());
revalidate();
repaint();
}
- if (e.getPropertyName().equals(JComboBox.MODEL_CHANGED_PROPERTY))
+ if (e.getPropertyName().equals("dataModel"))
{
list.setModel((ComboBoxModel) e.getNewValue());
revalidate();
diff --git a/libjava/javax/swing/plaf/basic/BasicMenuBarUI.java b/libjava/javax/swing/plaf/basic/BasicMenuBarUI.java
index a1920fb5e31..bed2d051cc3 100644
--- a/libjava/javax/swing/plaf/basic/BasicMenuBarUI.java
+++ b/libjava/javax/swing/plaf/basic/BasicMenuBarUI.java
@@ -1,5 +1,5 @@
/* BasicMenuBarUI.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.
@@ -294,9 +294,9 @@ public class BasicMenuBarUI extends MenuBarUI
*/
public void propertyChange(PropertyChangeEvent e)
{
- if (e.getPropertyName().equals(JMenuBar.BORDER_PAINTED_CHANGED_PROPERTY))
+ if (e.getPropertyName().equals("borderPainted"))
menuBar.repaint();
- if (e.getPropertyName().equals(JMenuBar.MARGIN_CHANGED_PROPERTY))
+ if (e.getPropertyName().equals("margin"))
menuBar.repaint();
}
}
diff --git a/libjava/javax/swing/plaf/basic/BasicProgressBarUI.java b/libjava/javax/swing/plaf/basic/BasicProgressBarUI.java
index 720c97e1243..1feb2c4ce45 100644
--- a/libjava/javax/swing/plaf/basic/BasicProgressBarUI.java
+++ b/libjava/javax/swing/plaf/basic/BasicProgressBarUI.java
@@ -103,7 +103,7 @@ public class BasicProgressBarUI extends ProgressBarUI
{
// Only need to listen for indeterminate changes.
// All other things are done on a repaint.
- if (e.getPropertyName().equals(JProgressBar.INDETERMINATE_CHANGED_PROPERTY))
+ if (e.getPropertyName().equals("inderterminate"))
if (((Boolean) e.getNewValue()).booleanValue())
startAnimationTimer();
else
diff --git a/libjava/javax/swing/plaf/basic/BasicScrollBarUI.java b/libjava/javax/swing/plaf/basic/BasicScrollBarUI.java
index 446726e8bf8..36939b21da0 100644
--- a/libjava/javax/swing/plaf/basic/BasicScrollBarUI.java
+++ b/libjava/javax/swing/plaf/basic/BasicScrollBarUI.java
@@ -1,5 +1,5 @@
/* BasicScrollBarUI.java --
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -142,13 +142,13 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
*/
public void propertyChange(PropertyChangeEvent e)
{
- if (e.getPropertyName().equals(JScrollBar.MODEL_CHANGED_PROPERTY))
+ if (e.getPropertyName().equals("model"))
{
((BoundedRangeModel) e.getOldValue()).removeChangeListener(modelListener);
scrollbar.getModel().addChangeListener(modelListener);
getThumbBounds();
}
- else if (e.getPropertyName().equals(JScrollBar.ORIENTATION_CHANGED_PROPERTY))
+ else if (e.getPropertyName().equals("orientation"))
{
incrButton.removeMouseListener(buttonListener);
decrButton.removeMouseListener(buttonListener);
diff --git a/libjava/javax/swing/plaf/basic/BasicSliderUI.java b/libjava/javax/swing/plaf/basic/BasicSliderUI.java
index 5d3cb38774b..a08acc9bdad 100644
--- a/libjava/javax/swing/plaf/basic/BasicSliderUI.java
+++ b/libjava/javax/swing/plaf/basic/BasicSliderUI.java
@@ -1,5 +1,5 @@
/* BasicSliderUI.java --
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -222,9 +222,9 @@ public class BasicSliderUI extends SliderUI
public void propertyChange(PropertyChangeEvent e)
{
// Check for orientation changes.
- if (e.getPropertyName().equals(JSlider.ORIENTATION_CHANGED_PROPERTY))
+ if (e.getPropertyName().equals("orientation"))
recalculateIfOrientationChanged();
- else if (e.getPropertyName().equals(JSlider.MODEL_CHANGED_PROPERTY))
+ else if (e.getPropertyName().equals("model"))
{
BoundedRangeModel oldModel = (BoundedRangeModel) e.getOldValue();
oldModel.removeChangeListener(changeListener);
diff --git a/libjava/javax/swing/plaf/basic/BasicTabbedPaneUI.java b/libjava/javax/swing/plaf/basic/BasicTabbedPaneUI.java
index 0ec20255fb6..4d7f8dcfb09 100644
--- a/libjava/javax/swing/plaf/basic/BasicTabbedPaneUI.java
+++ b/libjava/javax/swing/plaf/basic/BasicTabbedPaneUI.java
@@ -184,13 +184,13 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
*/
public void propertyChange(PropertyChangeEvent e)
{
- if (e.getPropertyName().equals(JTabbedPane.TAB_LAYOUT_POLICY_CHANGED_PROPERTY))
+ if (e.getPropertyName().equals("tabLayoutPolicy"))
{
layoutManager = createLayoutManager();
tabPane.setLayout(layoutManager);
}
- else if (e.getPropertyName().equals(JTabbedPane.TAB_PLACEMENT_CHANGED_PROPERTY)
+ else if (e.getPropertyName().equals("tabPlacement")
&& tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT)
{
incrButton = createIncreaseButton();
diff --git a/libjava/javax/swing/plaf/basic/BasicToolBarUI.java b/libjava/javax/swing/plaf/basic/BasicToolBarUI.java
index 2fe8c315fd0..fad0108e096 100644
--- a/libjava/javax/swing/plaf/basic/BasicToolBarUI.java
+++ b/libjava/javax/swing/plaf/basic/BasicToolBarUI.java
@@ -1,5 +1,5 @@
/* BasicToolBarUI.java --
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -1218,7 +1218,7 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
public void propertyChange(PropertyChangeEvent e)
{
// FIXME: need name properties so can change floatFrame title.
- if (e.getPropertyName().equals(JToolBar.ROLLOVER_CHANGED_PROPERTY))
+ if (e.getPropertyName().equals("rollover"))
setRolloverBorders(toolBar.isRollover());
}
}