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]

FYI: Patch: java.swing


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

Hi list,


I commited the attached patch to trunk to fix some java.swing issues.


Michael
- -- 
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+etlJWSOgCCdjSDsRAqPAAJ9Uu56rFQ8iRb7Th8lubyGPTidxiwCfVwVn
I6BMOak5cXi3nt0nvVHkkyg=
=cgpz
-----END PGP SIGNATURE-----
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/libjava/ChangeLog,v
retrieving revision 1.1798
diff -u -r1.1798 ChangeLog
--- ChangeLog	21 Mar 2003 09:00:28 -0000	1.1798
+++ ChangeLog	21 Mar 2003 09:17:55 -0000
@@ -1,5 +1,24 @@
 2003-03-21  Michael Koch  <konqueror at gmx dot de>
 
+	* javax/swing/Action.java
+	(ACCELERATOR_KEY): New constant.
+	(ACTION_COMMAND_KEY): Likewise.
+	(MNEMONIC_KEY): Likewise.
+	* javax/swing/UnsupportedLookAndFeelException.java
+	(UnsupportedLookAndFeelException): Must be public.
+	* javax/swing/WindowConstants.java
+	(EXIT_ON_CLOSE): New constant.
+	* javax/swing/text/BadLocationException.java
+	(offset): New member variable.
+	(BadLocationException): New implementation, documentation added.
+	(offsetRequested): New method.
+	* javax/swing/text/Caret.java:
+	Reformated.
+	* javax/swing/text/Document.java:
+	Reformated.
+
+2003-03-21  Michael Koch  <konqueror at gmx dot de>
+
 	* java/rmi/activation/Activatable.java
 	(serialVersionUID): New member variable.
 	* java/rmi/activation/ActivationGroup.java
Index: javax/swing/Action.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/Action.java,v
retrieving revision 1.1
diff -u -r1.1 Action.java
--- javax/swing/Action.java	9 Aug 2002 04:26:10 -0000	1.1
+++ javax/swing/Action.java	21 Mar 2003 09:17:55 -0000
@@ -78,6 +78,21 @@
 	 */
 	public static final	String	SMALL_ICON			= "SmallIcon";
 
+	/**
+	 * ACCELERATOR_KEY
+	 */
+	public static final String ACCELERATOR_KEY = "AcceleratorKey";
+
+	/**
+	 * ACTION_COMMAND_KEY
+	 */
+	public static final String ACTION_COMMAND_KEY = "ActionCommandKey";
+
+	/**
+	 * MNEMONIC_KEY
+	 */
+	public static final String MNEMONIC_KEY = "MnemonicKey";
+
 
 	//-------------------------------------------------------------
 	// Interface: Action ------------------------------------------
Index: javax/swing/UnsupportedLookAndFeelException.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/UnsupportedLookAndFeelException.java,v
retrieving revision 1.1
diff -u -r1.1 UnsupportedLookAndFeelException.java
--- javax/swing/UnsupportedLookAndFeelException.java	9 Aug 2002 04:26:10 -0000	1.1
+++ javax/swing/UnsupportedLookAndFeelException.java	21 Mar 2003 09:17:55 -0000
@@ -40,7 +40,7 @@
 
 public class UnsupportedLookAndFeelException extends Exception
 {
-    UnsupportedLookAndFeelException(String a)
+    public UnsupportedLookAndFeelException(String a)
     {
 	super(a);
     }
Index: javax/swing/WindowConstants.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/WindowConstants.java,v
retrieving revision 1.1
diff -u -r1.1 WindowConstants.java
--- javax/swing/WindowConstants.java	9 Aug 2002 04:26:10 -0000	1.1
+++ javax/swing/WindowConstants.java	21 Mar 2003 09:17:55 -0000
@@ -63,5 +63,10 @@
 	 */
 	public static final int DISPOSE_ON_CLOSE = 2;
 
+	/**
+	 * EXIT_ON_CLOSE
+	 */
+	public static final int EXIT_ON_CLOSE =3;
+
 
 } // WindowConstants
Index: javax/swing/text/BadLocationException.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/text/BadLocationException.java,v
retrieving revision 1.1
diff -u -r1.1 BadLocationException.java
--- javax/swing/text/BadLocationException.java	9 Aug 2002 04:26:12 -0000	1.1
+++ javax/swing/text/BadLocationException.java	21 Mar 2003 09:17:55 -0000
@@ -40,7 +40,25 @@
 
 public class BadLocationException extends Exception
 {    
-    BadLocationException()
-    {
-    }
+  int offset;
+  
+  /**
+   * Constructs a <code>BadLocationException</code>
+   *
+   * @param str A string indicating what was wrong with the arguments
+   * @param offset Offset within the document that was requested &gt;= 0
+   */
+  public BadLocationException (String str, int offset)
+  {
+    super (str);
+    this.offset = offset;
+  }
+
+  /**
+   * Returns the offset into the document that was not legal
+   */
+  public int offsetRequested ()
+  {
+    return offset;
+  }
 }
Index: javax/swing/text/Caret.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/text/Caret.java,v
retrieving revision 1.2
diff -u -r1.2 Caret.java
--- javax/swing/text/Caret.java	2 Mar 2003 19:45:52 -0000	1.2
+++ javax/swing/text/Caret.java	21 Mar 2003 09:17:55 -0000
@@ -42,21 +42,37 @@
 
 public interface Caret
 {
-    void addChangeListener(ChangeListener l);
-    void deinstall(JTextComponent c);
-    int getBlinkRate();
-    int getDot();
-    Point getMagicCaretPosition();
-    int getMark();
-    void install(JTextComponent c);
-    boolean isSelectionVisible();
-    boolean isVisible();
-    void moveDot(int dot);
-    void paint(Graphics g);
-    void removeChangeListener(ChangeListener l);
-    void setBlinkRate(int rate);
-    void setDot(int dot);
-    void setMagicCaretPosition(Point p);
-    void setSelectionVisible(boolean v);
-    void setVisible(boolean v);
+  void addChangeListener(ChangeListener l);
+  
+  void deinstall(JTextComponent c);
+  
+  int getBlinkRate();
+  
+  int getDot();
+  
+  Point getMagicCaretPosition();
+  
+  int getMark();
+  
+  void install(JTextComponent c);
+  
+  boolean isSelectionVisible();
+  
+  boolean isVisible();
+  
+  void moveDot(int dot);
+  
+  void paint(Graphics g);
+  
+  void removeChangeListener(ChangeListener l);
+  
+  void setBlinkRate(int rate);
+  
+  void setDot(int dot);
+  
+  void setMagicCaretPosition(Point p);
+  
+  void setSelectionVisible(boolean v);
+  
+  void setVisible(boolean v);
 }
Index: javax/swing/text/Document.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/text/Document.java,v
retrieving revision 1.1
diff -u -r1.1 Document.java
--- javax/swing/text/Document.java	9 Aug 2002 04:26:12 -0000	1.1
+++ javax/swing/text/Document.java	21 Mar 2003 09:17:55 -0000
@@ -42,21 +42,25 @@
 
 public interface Document
 { 
-    void addDocumentListener(DocumentListener listener);
-    void addUndoableEditListener(UndoableEditListener listener);
-    Position createPosition(int offs);
-    Element getDefaultRootElement();
-    Position getEndPosition();
-    int getLength();
-    Object getProperty(Object key);
-    Element[] getRootElements();
-    Position getStartPosition();
-    String getText(int offset, int length);
-    void getText(int offset, int length, Segment txt);
-    void insertString(int offset, String str, AttributeSet a);
-    void putProperty(Object key, Object value);
-    void remove(int offs, int len);
-    void removeDocumentListener(DocumentListener listener);
-    void removeUndoableEditListener(UndoableEditListener listener);
-    void render(Runnable r);
+  public static final String StreamDescriptionProperty = "stream";
+  
+  public static final String TitleProperty = "text";
+
+  void addDocumentListener(DocumentListener listener);
+  void addUndoableEditListener(UndoableEditListener listener);
+  Position createPosition(int offs);
+  Element getDefaultRootElement();
+  Position getEndPosition();
+  int getLength();
+  Object getProperty(Object key);
+  Element[] getRootElements();
+  Position getStartPosition();
+  String getText(int offset, int length);
+  void getText(int offset, int length, Segment txt);
+  void insertString(int offset, String str, AttributeSet a);
+  void putProperty(Object key, Object value);
+  void remove(int offs, int len);
+  void removeDocumentListener(DocumentListener listener);
+  void removeUndoableEditListener(UndoableEditListener listener);
+  void render(Runnable r);
 }

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