2003-03-21 Michael Koch <konqueror@gmx.de>
authorMichael Koch <konqueror@gmx.de>
Fri, 21 Mar 2003 09:18:31 +0000 (09:18 +0000)
committerMichael Koch <mkoch@gcc.gnu.org>
Fri, 21 Mar 2003 09:18:31 +0000 (09:18 +0000)
* 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.

From-SVN: r64656

libjava/ChangeLog
libjava/javax/swing/Action.java
libjava/javax/swing/UnsupportedLookAndFeelException.java
libjava/javax/swing/WindowConstants.java
libjava/javax/swing/text/BadLocationException.java
libjava/javax/swing/text/Caret.java
libjava/javax/swing/text/Document.java

index 941f46b..aa39a61 100644 (file)
@@ -1,5 +1,24 @@
 2003-03-21  Michael Koch  <konqueror@gmx.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@gmx.de>
+
        * java/rmi/activation/Activatable.java
        (serialVersionUID): New member variable.
        * java/rmi/activation/ActivationGroup.java
index e9fbc76..c091a26 100644 (file)
@@ -78,6 +78,21 @@ public interface Action extends ActionListener {
         */
        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 1848864..2e032cd 100644 (file)
@@ -40,7 +40,7 @@ package javax.swing;
 
 public class UnsupportedLookAndFeelException extends Exception
 {
-    UnsupportedLookAndFeelException(String a)
+    public UnsupportedLookAndFeelException(String a)
     {
        super(a);
     }
index ca501c0..1eec7f6 100644 (file)
@@ -63,5 +63,10 @@ public interface WindowConstants {
         */
        public static final int DISPOSE_ON_CLOSE = 2;
 
+       /**
+        * EXIT_ON_CLOSE
+        */
+       public static final int EXIT_ON_CLOSE =3;
+
 
 } // WindowConstants
index 81e6cc8..d62ad54 100644 (file)
@@ -40,7 +40,25 @@ package javax.swing.text;
 
 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 c013937..f78f24e 100644 (file)
@@ -42,21 +42,37 @@ import javax.swing.event.*;
 
 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 398030f..fa7b1ce 100644 (file)
@@ -42,21 +42,25 @@ import javax.swing.event.*;
 
 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);
 }