diff options
Diffstat (limited to 'libjava/javax/swing/text')
4 files changed, 18 insertions, 9 deletions
diff --git a/libjava/javax/swing/text/JTextComponent.java b/libjava/javax/swing/text/JTextComponent.java index fa0040b..6b464b5 100644 --- a/libjava/javax/swing/text/JTextComponent.java +++ b/libjava/javax/swing/text/JTextComponent.java @@ -883,7 +883,8 @@ public abstract class JTextComponent extends JComponent return getUI().getEditorKit(this).getActions(); } - private Document doc; + // This is package-private to avoid an accessor method. + Document doc; private Caret caret; private Highlighter highlighter; private Color caretColor; diff --git a/libjava/javax/swing/text/StringContent.java b/libjava/javax/swing/text/StringContent.java index c984bd8..c0e688a 100644 --- a/libjava/javax/swing/text/StringContent.java +++ b/libjava/javax/swing/text/StringContent.java @@ -56,7 +56,8 @@ import javax.swing.undo.UndoableEdit; */ public final class StringContent implements AbstractDocument.Content, Serializable { - private char[] content; + // This is package-private to avoid an accessor method. + char[] content; private int count; @@ -156,7 +157,8 @@ public final class StringContent implements AbstractDocument.Content, Serializab this.offset = offset; } - private void setOffset(int offset) + // This is package-private to avoid an accessor method. + void setOffset(int offset) { this.offset = this.offset >= 0 ? offset : -1; } @@ -290,7 +292,8 @@ public final class StringContent implements AbstractDocument.Content, Serializab } } - private void checkLocation(int where, int len) throws BadLocationException + // This is package-private to avoid an accessor method. + void checkLocation(int where, int len) throws BadLocationException { if (where < 0) throw new BadLocationException("Invalid location", 1); diff --git a/libjava/javax/swing/text/html/parser/DocumentParser.java b/libjava/javax/swing/text/html/parser/DocumentParser.java index 8f7d213..f210d4f 100644 --- a/libjava/javax/swing/text/html/parser/DocumentParser.java +++ b/libjava/javax/swing/text/html/parser/DocumentParser.java @@ -144,19 +144,22 @@ public class DocumentParser /** * This field is used to access the identically named * methods of the outer class. + * This is package-private to avoid an accessor method. */ - private DocumentParser parser = this; + DocumentParser parser = this; /** * The callback. + * This is package-private to avoid an accessor method. */ - private HTMLEditorKit.ParserCallback callBack; + HTMLEditorKit.ParserCallback callBack; /** * The reference to the working class of HTML parser that is * actually used to parse the document. + * This is package-private to avoid an accessor method. */ - private gnuParser gnu; + gnuParser gnu; /** * Creates a new parser that uses the given DTD to access data on the diff --git a/libjava/javax/swing/text/html/parser/ParserDelegator.java b/libjava/javax/swing/text/html/parser/ParserDelegator.java index 7981706..30f77ca 100644 --- a/libjava/javax/swing/text/html/parser/ParserDelegator.java +++ b/libjava/javax/swing/text/html/parser/ParserDelegator.java @@ -126,14 +126,16 @@ public class ParserDelegator /** * The callback. + * This is package-private to avoid an accessor method. */ - private HTMLEditorKit.ParserCallback callBack; + HTMLEditorKit.ParserCallback callBack; /** * The reference to the working class of HTML parser that is * actually used to parse the document. + * This is package-private to avoid an accessor method. */ - private gnuParser gnu; + gnuParser gnu; /** * Parses the HTML document, calling methods of the provided |