From a9768a06b3b09b597d06b038543d1dea3b35cf08 Mon Sep 17 00:00:00 2001 From: mkoch Date: Fri, 21 Mar 2003 09:18:31 +0000 Subject: 2003-03-21 Michael Koch * 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 --- libjava/javax/swing/text/BadLocationException.java | 24 +++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'libjava/javax/swing/text/BadLocationException.java') 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 BadLocationException + * + * @param str A string indicating what was wrong with the arguments + * @param offset Offset within the document that was requested >= 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; + } } -- cgit v1.2.3