This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gui] Patch: javax.swing.LookAndFeel


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi list,


I just commited the attached patch to add a new method to 
javax.swing.LookAndFeel.


Michael


2004-07-10  Michael Koch  <konqueror@gmx.de>

	* javax/swing/LookAndFeel.java
	(provideErrorFeedback): New method.
- -- 
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFA77FOWSOgCCdjSDsRAteAAJ4/mCXe8TXEoeiQ6U5l+wn1LN6LDACfcGI9
Z8PxQZG4TwxaXW90unJhveA=
=zABH
-----END PGP SIGNATURE-----
Index: javax/swing/LookAndFeel.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/LookAndFeel.java,v
retrieving revision 1.2.18.4
diff -u -b -B -r1.2.18.4 LookAndFeel.java
--- javax/swing/LookAndFeel.java	29 Jun 2004 11:30:49 -0000	1.2.18.4
+++ javax/swing/LookAndFeel.java	10 Jul 2004 09:01:32 -0000
@@ -37,6 +37,8 @@
 
 package javax.swing;
 
+import java.awt.Component;
+import java.awt.Toolkit;
 import javax.swing.text.JTextComponent;
 
 
@@ -155,6 +157,18 @@
   }
 
   /**
+   * Invoked when the user attempts an invalid operation. The default implement
+   * just beeps. Subclasses that wish to change this need to override this
+   * method.
+   *
+   * @param component the component the error occured in
+   */
+  public void provideErrorFeedback(Component component)
+  {
+    Toolkit.getDefaultToolkit().beep();
+  }
+
+  /**
    * Returns a string that displays and identifies this object's properties.
    *
    * @return the string "LookAndFeel"

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]