diff options
Diffstat (limited to 'src/share/classes/javax/swing/text/JTextComponent.java')
-rw-r--r-- | src/share/classes/javax/swing/text/JTextComponent.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/share/classes/javax/swing/text/JTextComponent.java b/src/share/classes/javax/swing/text/JTextComponent.java index d340f281e..e45310035 100644 --- a/src/share/classes/javax/swing/text/JTextComponent.java +++ b/src/share/classes/javax/swing/text/JTextComponent.java @@ -1,5 +1,5 @@ /* - * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,6 +29,7 @@ import java.lang.reflect.Method; import java.security.AccessController; import java.security.PrivilegedAction; +import java.beans.Transient; import java.util.Collections; import java.util.HashMap; import java.util.Hashtable; @@ -571,6 +572,7 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A * * @return the caret */ + @Transient public Caret getCaret() { return caret; } @@ -1672,6 +1674,7 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A * @return the position of the text insertion caret for the * text component >= 0 */ + @Transient public int getCaretPosition() { return caret.getDot(); } @@ -1797,6 +1800,7 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A * * @return the start position >= 0 */ + @Transient public int getSelectionStart() { int start = Math.min(caret.getDot(), caret.getMark()); return start; @@ -1829,6 +1833,7 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A * * @return the end position >= 0 */ + @Transient public int getSelectionEnd() { int end = Math.max(caret.getDot(), caret.getMark()); return end; |