summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Koch <konqueror@gmx.de>2004-12-23 10:34:27 +0000
committerMichael Koch <konqueror@gmx.de>2004-12-23 10:34:27 +0000
commit2ebf5bf34f4e3c2ba34f4a639f46b4da099aedd2 (patch)
tree8987a6ec7989cf93d3f621fb66a749a922419ad2
parent1403f7ce7523e13190bd0c46fb7f4317eeb975f7 (diff)
downloadclasspath-2ebf5bf34f4e3c2ba34f4a639f46b4da099aedd2.tar.gz
2004-12-23 Michael Koch <konqueror@gmx.de>
* javax/swing/plaf/basic/BasicButtonListener.java (BasicButtonListener): New constructor. * javax/swing/plaf/basic/BasicButtonUI.java (createButtonListener): Usw new BasicButtonListener constructor.
-rw-r--r--ChangeLog7
-rw-r--r--javax/swing/plaf/basic/BasicButtonListener.java18
-rw-r--r--javax/swing/plaf/basic/BasicButtonUI.java2
3 files changed, 23 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 2ddcc134f..97487e93f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2004-12-23 Michael Koch <konqueror@gmx.de>
+ * javax/swing/plaf/basic/BasicButtonListener.java
+ (BasicButtonListener): New constructor.
+ * javax/swing/plaf/basic/BasicButtonUI.java
+ (createButtonListener): Usw new BasicButtonListener constructor.
+
+2004-12-23 Michael Koch <konqueror@gmx.de>
+
* java/awt/image/MemoryImageSource.java: Reformatted.
2004-12-23 Michael Koch <konqueror@gmx.de>
diff --git a/javax/swing/plaf/basic/BasicButtonListener.java b/javax/swing/plaf/basic/BasicButtonListener.java
index 2b4be6769..48451c237 100644
--- a/javax/swing/plaf/basic/BasicButtonListener.java
+++ b/javax/swing/plaf/basic/BasicButtonListener.java
@@ -1,4 +1,4 @@
-/* BasicButtonListener.java
+/* BasicButtonListener.java --
Copyright (C) 2004 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.plaf.basic;
import java.awt.event.ActionEvent;
@@ -58,12 +59,19 @@ public class BasicButtonListener
implements MouseListener, MouseMotionListener, FocusListener,
ChangeListener, PropertyChangeListener
{
+ public BasicButtonListener(AbstractButton b)
+ {
+ // Do nothing here.
+ }
+
public void propertyChange(PropertyChangeEvent e)
{
}
+
protected void checkOpacity(AbstractButton b)
{
}
+
public void focusGained(FocusEvent e)
{
if (e.getSource() instanceof AbstractButton)
@@ -86,6 +94,7 @@ public class BasicButtonListener
button.repaint();
}
}
+
public void installKeyboardActions(JComponent c)
{
c.getActionMap().put("pressed",
@@ -114,20 +123,25 @@ public class BasicButtonListener
}
});
}
+
public void uninstallKeyboardActions(JComponent c)
{
c.getActionMap().put("pressed", null);
c.getActionMap().put("released", null);
}
+
public void stateChanged(ChangeEvent e)
{
}
+
public void mouseMoved(MouseEvent e)
{
}
+
public void mouseDragged(MouseEvent e)
{
}
+
public void mouseClicked(MouseEvent e)
{
}
@@ -152,7 +166,6 @@ public class BasicButtonListener
}
}
-
/**
* Accept a mouse release event and set the button's
* "pressed" property to <code>true</code>, if the model
@@ -175,7 +188,6 @@ public class BasicButtonListener
}
}
-
/**
* Accept a mouse enter event and set the button's "rollover" property to
* <code>true</code>, if the button's "rolloverEnabled" property is
diff --git a/javax/swing/plaf/basic/BasicButtonUI.java b/javax/swing/plaf/basic/BasicButtonUI.java
index ed04d2812..f24fed974 100644
--- a/javax/swing/plaf/basic/BasicButtonUI.java
+++ b/javax/swing/plaf/basic/BasicButtonUI.java
@@ -133,7 +133,7 @@ public class BasicButtonUI extends ButtonUI
protected BasicButtonListener createButtonListener(AbstractButton b)
{
- return new BasicButtonListener();
+ return new BasicButtonListener(b);
}
public void installListeners(AbstractButton b)