summaryrefslogtreecommitdiff
path: root/libjava/javax
diff options
context:
space:
mode:
authormkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>2003-03-21 09:18:31 +0000
committermkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>2003-03-21 09:18:31 +0000
commita9768a06b3b09b597d06b038543d1dea3b35cf08 (patch)
treed95ec68bafbb0d8912496fa08e30ed162f0c53f0 /libjava/javax
parent7e291b5c009226fbfd7c156b20cb763d09b7db6c (diff)
downloadgcc-a9768a06b3b09b597d06b038543d1dea3b35cf08.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64656 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/javax')
-rw-r--r--libjava/javax/swing/Action.java15
-rw-r--r--libjava/javax/swing/UnsupportedLookAndFeelException.java2
-rw-r--r--libjava/javax/swing/WindowConstants.java5
-rw-r--r--libjava/javax/swing/text/BadLocationException.java24
-rw-r--r--libjava/javax/swing/text/Caret.java50
-rw-r--r--libjava/javax/swing/text/Document.java38
6 files changed, 96 insertions, 38 deletions
diff --git a/libjava/javax/swing/Action.java b/libjava/javax/swing/Action.java
index e9fbc762b1f..c091a261e15 100644
--- a/libjava/javax/swing/Action.java
+++ b/libjava/javax/swing/Action.java
@@ -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 ------------------------------------------
diff --git a/libjava/javax/swing/UnsupportedLookAndFeelException.java b/libjava/javax/swing/UnsupportedLookAndFeelException.java
index 18488648dea..2e032cd94fc 100644
--- a/libjava/javax/swing/UnsupportedLookAndFeelException.java
+++ b/libjava/javax/swing/UnsupportedLookAndFeelException.java
@@ -40,7 +40,7 @@ package javax.swing;
public class UnsupportedLookAndFeelException extends Exception
{
- UnsupportedLookAndFeelException(String a)
+ public UnsupportedLookAndFeelException(String a)
{
super(a);
}
diff --git a/libjava/javax/swing/WindowConstants.java b/libjava/javax/swing/WindowConstants.java
index ca501c0d6c4..1eec7f6bb0f 100644
--- a/libjava/javax/swing/WindowConstants.java
+++ b/libjava/javax/swing/WindowConstants.java
@@ -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
diff --git a/libjava/javax/swing/text/BadLocationException.java b/libjava/javax/swing/text/BadLocationException.java
index 81e6cc8dc03..d62ad5465f9 100644
--- a/libjava/javax/swing/text/BadLocationException.java
+++ b/libjava/javax/swing/text/BadLocationException.java
@@ -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;
+ }
}
diff --git a/libjava/javax/swing/text/Caret.java b/libjava/javax/swing/text/Caret.java
index c013937f00c..f78f24edf1d 100644
--- a/libjava/javax/swing/text/Caret.java
+++ b/libjava/javax/swing/text/Caret.java
@@ -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);
}
diff --git a/libjava/javax/swing/text/Document.java b/libjava/javax/swing/text/Document.java
index 398030f0849..fa7b1ce2817 100644
--- a/libjava/javax/swing/text/Document.java
+++ b/libjava/javax/swing/text/Document.java
@@ -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);
}