This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: FYI: avoid accessor methods in AWT and Swing


I'm checking this in to Classpath and libgcj.

This removes all the accessor methods from AWT, Swing, and beans.

This patch is a bit ugly in that it is completely ad hoc, so you will
see classes where some members are private and some are
package-private, depending solely on whether the member is used by a
nested class.

Right now the only way to detect whether a patch reintroduces an
accessor method is to compile with the appropriate settings in
Eclipse, or to use gcjx's -Wenclosing-access flag.  On irc Michael
mentioned the idea of using jcf-dump to try to detect them after the
build (though one reason I wrote this is because gcj generally, and
incorrectly, fails to emit these accessors...).

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>
	* javax/swing/text/html/parser/ParserDelegator.java (callBack,
	gnu): Now package-private.
	* javax/swing/text/html/parser/DocumentParser.java (parser,
	callBack, gnu): Now package-private.
	* javax/swing/text/StringContent.java (content, setOffset,
	checkLocation): Now package-private.
	* javax/swing/text/JTextComponent.java (doc): Now
	package-private.
	* javax/swing/plaf/basic/BasicToolBarUI.java (owner,
	lastGoodOrientation, origParent, borders, cachedBounds,
	cachedOrientation, DragWindow): Now package-private.
	* javax/swing/plaf/basic/BasicTabbedPaneUI.java (incrButton,
	decrButton, viewport, panel, currentScrollLocation, layoutManager,
	tabAreaRect, contentRect, createIncreaseButton,
	createDecreaseButton, findPointForIndex): Now package-private.
	* javax/swing/plaf/basic/BasicSplitPaneDivider.java
	(currentDividerLocation, moveDividerTo): Now package-private.
	* javax/swing/plaf/basic/BasicSliderUI.java (findClosestTick): Now
	package-private.
	* javax/swing/plaf/basic/BasicScrollBarUI.java
	(calculatePreferredSize, valueForYPosition, valueForXPosition):
	Now package-private.
	* javax/swing/plaf/basic/BasicPopupMenuUI.java
	(topWindowListener): Now package-private.
	* javax/swing/plaf/basic/BasicOptionPaneUI.java (iconSize,
	OK_STRING, YES_STRING, NO_STRING, CANCEL_STRING): Now constants.
	(messageAreaContainer, buttonContainer, resetSelectedValue): Now
	package-private.
	* javax/swing/plaf/basic/BasicListUI.java (damageLayout): Now
	package-private.
	* javax/swing/plaf/basic/BasicInternalFrameTitlePane.java (title):
	Now package-private.
	* javax/swing/plaf/basic/BasicDesktopIconUI.java (button): Now
	package-private.
	* javax/swing/plaf/basic/BasicComboBoxUI.java (largestItemSize,
	borderInsets): Now package-private.
	(arrowButtonWidth): Likewise.  Now a constant.
	* javax/swing/plaf/basic/BasicColorChooserUI.java (chooser, pane,
	makeTabs, updatePreviewPanel): Now package-private.
	* javax/swing/plaf/basic/BasicArrowButton.java (shadow,
	darkShadow, highlight): Now package-private.
	* javax/swing/colorchooser/DefaultSwatchChooserPanel.java
	(addColorToQueue): Now package-private.
	* javax/swing/colorchooser/DefaultRGBChooserPanel.java
	(spinnerChange, sliderChange, updateChange, R, G, B, RSpinner,
	GSpinner, BSpinner): Now package-private.
	* javax/swing/colorchooser/DefaultHSBChooserPanel.java
	(gradientImage, trackImage, slider, hRadio, sRadio, bRadio,
	hSpinner, sSpinner, bSpinner, gradientPoint, internalChange,
	spinnerTrigger, locked, handlingMouse, updateImage, updateSlider,
	updateTrack): Now package-private.
	* javax/swing/TransferHandler.java (clipboard): Now
	package-private.
	* javax/swing/ToolTipManager.java (showTip, hideTip): Now
	package-private.
	* javax/swing/Timer.java (drainEvents, queueEvent): Now
	package-private.
	* javax/swing/RepaintManager.java (globalManager): Now
	package-private.
	* javax/swing/JFormattedTextField.java (editValid): Now
	package-private.
	* javax/swing/JColorChooser.java (makeModal): Now
	package-private.
	* java/awt/geom/GeneralPath.java (rule, types, xpoints, ypoints,
	index, path): Now package-private.
	* java/awt/geom/Area.java (solids, holes, cubicCubicIntersect,
	lineQuadIntersect, lineCubicIntersect, linesIntersect,
	pointEquals): Now package-private.
	* java/awt/geom/Arc2D.java (type): Now package-private.
	* java/awt/Window.java (windowFocusOwner): Now package-private.
	* java/awt/TextComponent.java (editable, selectionStart,
	selectionEnd, text, getIndexAtPoint, getCharacterBounds): Now
	package-private.
	* java/awt/MenuItem.java (actionCommand, enabled, label): Now
	package-private.
	* java/awt/MenuComponent.java (focusListener): Now
	package-private.
	* java/awt/Frame.java (state): Now package-private.
	* java/awt/Choice.java (pItems): Now package-private.
	* java/awt/Checkbox.java (state): Now package-private.
	* java/awt/Button.java (actionCommand, label): Now
	package-private.
	* gnu/javax/swing/text/html/parser/support/Parser.java
	(attributes, _handleEndTag_remaining, _handleStartTag): Now
	package-private.
	* gnu/java/beans/decoder/PersistenceParser.java (javaHandler): Now
	package-private.
	* gnu/java/awt/peer/gtk/GdkGraphics2D.java (paint, stroke, fg, bg,
	clip, transform, font, comp): Now package-private.

Index: gnu/java/awt/peer/gtk/GdkGraphics2D.java
===================================================================
RCS file: /cvsroot/classpath/classpath/gnu/java/awt/peer/gtk/GdkGraphics2D.java,v
retrieving revision 1.33
diff -u -r1.33 GdkGraphics2D.java
--- gnu/java/awt/peer/gtk/GdkGraphics2D.java 16 Feb 2005 13:59:03 -0000 1.33
+++ gnu/java/awt/peer/gtk/GdkGraphics2D.java 26 Apr 2005 18:33:50 -0000
@@ -114,19 +114,22 @@
   
   private final int native_state = GtkGenericPeer.getUniqueInteger();  
 
-  private Paint paint;
-  private Stroke stroke;
-  private Color fg;
-  private Color bg;
-  private Shape clip;
-  private AffineTransform transform;
+  // These are package-private to avoid accessor methods.
+  Paint paint;
+  Stroke stroke;
+  Color fg;
+  Color bg;
+  Shape clip;
+  AffineTransform transform;
   private GtkComponentPeer component;
-  private Font font;
+  // This is package-private to avoid an accessor method.
+  Font font;
   private RenderingHints hints;
   private BufferedImage bimage;
   private boolean pixelConversionRequired;
   private int[] pixelBuffer;
-  private Composite comp;
+  // This is package-private to avoid an accessor method.
+  Composite comp;
   private Stack stateStack;
 
   private native void initState(GtkComponentPeer component);
Index: gnu/java/beans/decoder/PersistenceParser.java
===================================================================
RCS file: /cvsroot/classpath/classpath/gnu/java/beans/decoder/PersistenceParser.java,v
retrieving revision 1.1
diff -u -r1.1 PersistenceParser.java
--- gnu/java/beans/decoder/PersistenceParser.java 2 Jan 2005 23:53:42 -0000 1.1
+++ gnu/java/beans/decoder/PersistenceParser.java 26 Apr 2005 18:33:50 -0000
@@ -1,5 +1,5 @@
 /* gnu.java.beans.PersistenceParser
-   Copyright (C) 2004 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -83,8 +83,9 @@
 	private ElementHandler currentHandler;
 
 	/** The real root element that stores all objects created during parsing.
+	 * Package-private to avoid an accessor method.
 	 */
-	private JavaHandler javaHandler;
+	JavaHandler javaHandler;
 
 	/** Stores the decoded objects. */
 	private List objects = new LinkedList();
Index: gnu/javax/swing/text/html/parser/support/Parser.java
===================================================================
RCS file: /cvsroot/classpath/classpath/gnu/javax/swing/text/html/parser/support/Parser.java,v
retrieving revision 1.1
diff -u -r1.1 Parser.java
--- gnu/javax/swing/text/html/parser/support/Parser.java 10 Mar 2005 12:10:38 -0000 1.1
+++ gnu/javax/swing/text/html/parser/support/Parser.java 26 Apr 2005 18:33:51 -0000
@@ -157,8 +157,9 @@
 
   /**
    * The attributes of the current HTML element.
+   * Package-private to avoid an accessor method.
    */
-  private htmlAttributeSet attributes =
+  htmlAttributeSet attributes =
     htmlAttributeSet.EMPTY_HTML_ATTRIBUTE_SET;
 
   /**
@@ -1154,9 +1155,10 @@
 
   /**
    * Actions that are also required if the closing action was
-   * intiated by the tag validator.
+   * initiated by the tag validator.
+   * Package-private to avoid an accessor method.
    */
-  private void _handleEndTag_remaining(TagElement tag)
+  void _handleEndTag_remaining(TagElement tag)
   {
     HTML.Tag h = tag.getHTMLTag();
 
@@ -1183,9 +1185,10 @@
    * A hooks for operations, preceeding call to handleStartTag().
    * The method is called when the HTML opening tag ((like &lt;table&gt;)
    * is found.
+   * Package-private to avoid an accessor method.
    * @param The tag
    */
-  private void _handleStartTag(TagElement tag)
+  void _handleStartTag(TagElement tag)
   {
     validator.openTag(tag, attributes);
     startingTag(tag);
Index: java/awt/Button.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/Button.java,v
retrieving revision 1.21
diff -u -r1.21 Button.java
--- java/awt/Button.java 21 Feb 2005 16:11:48 -0000 1.21
+++ java/awt/Button.java 26 Apr 2005 18:33:51 -0000
@@ -77,13 +77,15 @@
 
 /**
   * @serial The action command name for this button.
+  * This is package-private to avoid an accessor method.
   */
-private String actionCommand;
+String actionCommand;
 
 /**
   * @serial The label for this button.
+  * This is package-private to avoid an accessor method.
   */
-private String label;
+String label;
 
 // List of ActionListeners for this class.
 private transient ActionListener action_listeners;
Index: java/awt/Checkbox.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/Checkbox.java,v
retrieving revision 1.16
diff -u -r1.16 Checkbox.java
--- java/awt/Checkbox.java 21 Feb 2005 21:40:56 -0000 1.16
+++ java/awt/Checkbox.java 26 Apr 2005 18:33:51 -0000
@@ -89,8 +89,9 @@
 
 /**
   * @serial The state of this checkbox.
+  * This is package-private to avoid an accessor method.
   */
-private boolean state;
+boolean state;
 
 // The list of listeners for this object.
 private transient ItemListener item_listeners;
Index: java/awt/Choice.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/Choice.java,v
retrieving revision 1.20
diff -u -r1.20 Choice.java
--- java/awt/Choice.java 22 Jan 2005 01:48:27 -0000 1.20
+++ java/awt/Choice.java 26 Apr 2005 18:33:51 -0000
@@ -74,8 +74,9 @@
 
 /**
   * @serial A list of items for the choice box, which can be <code>null</code>.
+  * This is package-private to avoid an accessor method.
   */
-private Vector pItems = new Vector();
+Vector pItems = new Vector();
 
 /**
   * @serial The index of the selected item in the choice box.
Index: java/awt/Frame.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/Frame.java,v
retrieving revision 1.29
diff -u -r1.29 Frame.java
--- java/awt/Frame.java 21 Feb 2005 16:11:48 -0000 1.29
+++ java/awt/Frame.java 26 Apr 2005 18:33:51 -0000
@@ -186,8 +186,9 @@
 /**
   * @serial The state of this frame.
   * // FIXME: What are the values here?
+  * This is package-private to avoid an accessor method.
   */
-private int state;
+int state;
 
 /**
   * @serial The title of the frame.
Index: java/awt/MenuComponent.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/MenuComponent.java,v
retrieving revision 1.20
diff -u -r1.20 MenuComponent.java
--- java/awt/MenuComponent.java 16 Feb 2005 10:39:26 -0000 1.20
+++ java/awt/MenuComponent.java 26 Apr 2005 18:33:52 -0000
@@ -161,8 +161,9 @@
    *
    * @see AccessibleAWTMenuComponent#addFocusListener(java.awt.event.FocusListener)
    * @serial ignored.
+   * This is package-private to avoid an accessor method.
    */
-  private transient FocusListener focusListener;
+  transient FocusListener focusListener;
 
 /*************************************************************************/
 
Index: java/awt/MenuItem.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/MenuItem.java,v
retrieving revision 1.21
diff -u -r1.21 MenuItem.java
--- java/awt/MenuItem.java 11 Feb 2005 22:22:55 -0000 1.21
+++ java/awt/MenuItem.java 26 Apr 2005 18:33:52 -0000
@@ -75,13 +75,15 @@
 
 /**
   * @serial The name of the action command generated by this item.
+  * This is package-private to avoid an accessor method.
   */
-private String actionCommand;
+String actionCommand;
 
 /**
   * @serial Indicates whether or not this menu item is enabled.
+  * This is package-private to avoid an accessor method.
   */
-private boolean enabled = true;
+boolean enabled = true;
 
 /**
   * @serial The mask of events that are enabled for this menu item.
@@ -90,8 +92,9 @@
 
 /**
   * @serial This menu item's label
+  * This is package-private to avoid an accessor method.
   */
-private String label;
+String label;
 
 /**
   * @serial The shortcut for this menu item, if any
Index: java/awt/TextComponent.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/TextComponent.java,v
retrieving revision 1.17
diff -u -r1.17 TextComponent.java
--- java/awt/TextComponent.java 30 Dec 2004 19:02:06 -0000 1.17
+++ java/awt/TextComponent.java 26 Apr 2005 18:33:52 -0000
@@ -76,23 +76,27 @@
 
 /**
   * @serial Indicates whether or not this component is editable.
+  * This is package-private to avoid an accessor method.
   */
-private boolean editable;
+boolean editable;
 
 /**
   * @serial The starting position of the selected text region.
+  * This is package-private to avoid an accessor method.
   */
-private int selectionStart;
+int selectionStart;
 
 /**
   * @serial The ending position of the selected text region.
+  * This is package-private to avoid an accessor method.
   */
-private int selectionEnd;
+int selectionEnd;
 
 /**
   * @serial The text in the component
+  * This is package-private to avoid an accessor method.
   */
-private String text;
+String text;
 
 /**
   * A list of listeners that will receive events from this object.
@@ -708,8 +712,9 @@
   
   /*******************************/
   // Provide AccessibleAWTTextComponent access to several peer functions that
-  // aren't publicly exposed.
-  private synchronized int
+  // aren't publicly exposed.  This is package-private to avoid an accessor
+  // method.
+  synchronized int
   getIndexAtPoint(Point p)
   {
     TextComponentPeer tcp = (TextComponentPeer)getPeer();
@@ -718,7 +723,7 @@
     return -1;
   }
   
-  private synchronized Rectangle
+  synchronized Rectangle
   getCharacterBounds(int i)
   {
     TextComponentPeer tcp = (TextComponentPeer)getPeer();
Index: java/awt/Window.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/Window.java,v
retrieving revision 1.45
diff -u -r1.45 Window.java
--- java/awt/Window.java 21 Feb 2005 21:40:56 -0000 1.45
+++ java/awt/Window.java 26 Apr 2005 18:33:52 -0000
@@ -90,7 +90,8 @@
 
   private transient boolean shown;
 
-  private transient Component windowFocusOwner;
+  // This is package-private to avoid an accessor method.
+  transient Component windowFocusOwner;
   
   /*
    * The number used to generate the name returned by getName.
Index: java/awt/geom/Arc2D.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/geom/Arc2D.java,v
retrieving revision 1.10
diff -u -r1.10 Arc2D.java
--- java/awt/geom/Arc2D.java 17 Nov 2004 01:18:27 -0000 1.10
+++ java/awt/geom/Arc2D.java 26 Apr 2005 18:33:53 -0000
@@ -73,8 +73,9 @@
    */
   public static final int PIE = 2;
 
-  /** The closure type of this arc. */
-  private int type;
+  /** The closure type of this arc.  This is package-private to avoid an
+   * accessor method.  */
+  int type;
 
   /**
    * Create a new arc, with the specified closure type.
Index: java/awt/geom/Area.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/geom/Area.java,v
retrieving revision 1.6
diff -u -r1.6 Area.java
--- java/awt/geom/Area.java 1 Dec 2004 20:44:09 -0000 1.6
+++ java/awt/geom/Area.java 26 Apr 2005 18:33:53 -0000
@@ -89,13 +89,15 @@
 
   /**
    * Segment vectors containing solid areas and holes
+   * This is package-private to avoid an accessor method.
    */
-  private Vector solids;
+  Vector solids;
 
   /**
    * Segment vectors containing solid areas and holes
+   * This is package-private to avoid an accessor method.
    */
-  private Vector holes;
+  Vector holes;
 
   /**
    * Vector (temporary) storing curve-curve intersections
@@ -1315,9 +1317,10 @@
    * This is a reasonably accurate method, although the recursion depth
    * is typically around 20, the bounding-box tests allow for significant
    * pruning of the subdivision tree.
+   * 
+   * This is package-private to avoid an accessor method.
    */
-  private Intersection[] cubicCubicIntersect(CubicSegment curve1,
-                                             CubicSegment curve2)
+  Intersection[] cubicCubicIntersect(CubicSegment curve1, CubicSegment curve2)
   {
     Rectangle2D r1 = curve1.getBounds();
     Rectangle2D r2 = curve2.getBounds();
@@ -1349,8 +1352,9 @@
    * Or null if no intersections are found1
    * This is done through combining the line's equation with the
    * parametric form of the Bezier and solving the resulting quadratic.
+   * This is package-private to avoid an accessor method.
    */
-  private Intersection[] lineQuadIntersect(LineSegment l, QuadSegment c)
+  Intersection[] lineQuadIntersect(LineSegment l, QuadSegment c)
   {
     double[] y = new double[3];
     double[] x = new double[3];
@@ -1453,8 +1457,9 @@
    * Returns the intersections between a line and a cubic segment
    * This is done through combining the line's equation with the
    * parametric form of the Bezier and solving the resulting quadratic.
+   * This is package-private to avoid an accessor method. 
    */
-  private Intersection[] lineCubicIntersect(LineSegment l, CubicSegment c)
+  Intersection[] lineCubicIntersect(LineSegment l, CubicSegment c)
   {
     double[] y = new double[4];
     double[] x = new double[4];
@@ -1560,8 +1565,9 @@
   /**
    * Returns the intersection between two lines, or null if there is no
    * intersection.
+   * This is package-private to avoid an accessor method.
    */
-  private Intersection linesIntersect(LineSegment a, LineSegment b)
+  Intersection linesIntersect(LineSegment a, LineSegment b)
   {
     Point2D P1 = a.P1;
     Point2D P2 = a.P2;
@@ -1605,8 +1611,9 @@
   /**
    * Determines if two points are equal, within an error margin
    * 'snap distance'
+   * This is package-private to avoid an accessor method.
    */
-  private boolean pointEquals(Point2D a, Point2D b)
+  boolean pointEquals(Point2D a, Point2D b)
   {
     return (a.equals(b) || a.distance(b) < PE_EPSILON);
   }
Index: java/awt/geom/GeneralPath.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/geom/GeneralPath.java,v
retrieving revision 1.11
diff -u -r1.11 GeneralPath.java
--- java/awt/geom/GeneralPath.java 7 Nov 2004 17:18:07 -0000 1.11
+++ java/awt/geom/GeneralPath.java 26 Apr 2005 18:33:53 -0000
@@ -88,15 +88,18 @@
   /** A big number, but not so big it can't survive a few float operations */
   private static final double BIG_VALUE = java.lang.Double.MAX_VALUE / 10.0;
 
-  /** The winding rule. */
-  private int rule;
+  /** The winding rule.
+   * This is package-private to avoid an accessor method.
+   */
+  int rule;
 
   /**
    * The path type in points. Note that xpoints[index] and ypoints[index] maps
    * to types[index]; the control points of quad and cubic paths map as
    * well but are ignored.
+   * This is package-private to avoid an accessor method.
    */
-  private byte[] types;
+  byte[] types;
 
   /**
    * The list of all points seen. Since you can only append floats, it makes
@@ -104,15 +107,18 @@
    * allow a general path of double precision points.
    * Note: Storing x and y coords seperately makes for a slower transforms,
    * But it speeds up and simplifies box-intersection checking a lot.
+   * These are package-private to avoid accessor methods.
    */
-  private float[] xpoints;
-  private float[] ypoints;
+  float[] xpoints;
+  float[] ypoints;
 
   /** The index of the most recent moveto point, or null. */
   private int subpath = -1;
 
-  /** The next available index into points. */
-  private int index;
+  /** The next available index into points.
+   * This is package-private to avoid an accessor method.
+   */
+  int index;
 
   /**
    * Constructs a GeneralPath with the default (NON_ZERO)
@@ -534,8 +540,9 @@
 
     /**
      * The GeneralPath whose segments are being iterated.
+     * This is package-private to avoid an accessor method.
      */
-    private final GeneralPath path;
+    final GeneralPath path;
 
     /**
      * The affine transformation used to transform coordinates.
Index: javax/swing/JColorChooser.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JColorChooser.java,v
retrieving revision 1.5
diff -u -r1.5 JColorChooser.java
--- javax/swing/JColorChooser.java 22 Oct 2004 12:43:59 -0000 1.5
+++ javax/swing/JColorChooser.java 26 Apr 2005 18:33:54 -0000
@@ -229,11 +229,11 @@
 
   /**
    * This is a helper method to make the given JDialog block until it is
-   * hidden.
+   * hidden.  This is package-private to avoid an accessor method.
    *
    * @param dialog The JDialog to block.
    */
-  private static void makeModal(JDialog dialog)
+  static void makeModal(JDialog dialog)
   {
     try
       {
Index: javax/swing/JFormattedTextField.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JFormattedTextField.java,v
retrieving revision 1.11
diff -u -r1.11 JFormattedTextField.java
--- javax/swing/JFormattedTextField.java 30 Dec 2004 09:37:04 -0000 1.11
+++ javax/swing/JFormattedTextField.java 26 Apr 2005 18:33:54 -0000
@@ -155,7 +155,8 @@
   private Object value;
   private int focusLostBehavior = COMMIT_OR_REVERT;
   private AbstractFormatterFactory formatterFactory;
-  private boolean editValid = true;
+  // Package-private to avoid an accessor method.
+  boolean editValid = true;
   
   public JFormattedTextField ()
   {
Index: javax/swing/RepaintManager.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/RepaintManager.java,v
retrieving revision 1.9
diff -u -r1.9 RepaintManager.java
--- javax/swing/RepaintManager.java 11 Nov 2004 17:22:52 -0000 1.9
+++ javax/swing/RepaintManager.java 26 Apr 2005 18:33:55 -0000
@@ -176,12 +176,13 @@
 
   /**
    * The global, shared RepaintManager instance. This is reused for all
-   * components in all windows.
+   * components in all windows.  This is package-private to avoid an accessor
+   * method.
    *
    * @see #currentManager
    * @see #setCurrentManager
    */
-  private static RepaintManager globalManager;
+  static RepaintManager globalManager;
 
   /**
    * Create a new RepaintManager object.
Index: javax/swing/Timer.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/Timer.java,v
retrieving revision 1.18
diff -u -r1.18 Timer.java
--- javax/swing/Timer.java 26 Feb 2005 20:42:59 -0000 1.18
+++ javax/swing/Timer.java 26 Apr 2005 18:33:55 -0000
@@ -446,8 +446,9 @@
    * In the coalescing mode, a single event is fired as a replacement
    * for all queued events. In non coalescing mode, a series of
    * all queued events is fired.
+   * This is package-private to avoid an accessor method.
    */
-  private void drainEvents()
+  void drainEvents()
   {
     synchronized (queueLock)
       {
@@ -470,8 +471,9 @@
 
   /**
   * Post a scheduled event to the event queue.
+  * Package-private to avoid an accessor method.
   */
-  private void queueEvent()
+  void queueEvent()
   {
     synchronized (queueLock)
       {
Index: javax/swing/ToolTipManager.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/ToolTipManager.java,v
retrieving revision 1.9
diff -u -r1.9 ToolTipManager.java
--- javax/swing/ToolTipManager.java 14 Nov 2004 16:31:20 -0000 1.9
+++ javax/swing/ToolTipManager.java 26 Apr 2005 18:33:55 -0000
@@ -466,9 +466,9 @@
   /**
    * This method displays the ToolTip. It can figure out the method needed to
    * show it as well (whether to display it in heavyweight/lightweight panel
-   * or a window.)
+   * or a window.)  This is package-private to avoid an accessor method.
    */
-  private void showTip()
+  void showTip()
   {
     if (! enabled || currentComponent == null)
       return;
@@ -535,8 +535,9 @@
 
   /**
    * This method hides the ToolTip.
+   * This is package-private to avoid an accessor method.
    */
-  private void hideTip()
+  void hideTip()
   {
     if (currentTip == null || ! currentTip.isVisible() || ! enabled)
       return;
Index: javax/swing/TransferHandler.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/TransferHandler.java,v
retrieving revision 1.6
diff -u -r1.6 TransferHandler.java
--- javax/swing/TransferHandler.java 26 Jan 2005 20:57:45 -0000 1.6
+++ javax/swing/TransferHandler.java 26 Apr 2005 18:33:55 -0000
@@ -119,8 +119,9 @@
   
   /**
    * Clipboard if system clipboard may not be used.
+   * Package-private to avoid an accessor method.
    */
-  private static Clipboard clipboard;
+  static Clipboard clipboard;
   
   private int sourceActions;
   private Icon visualRepresentation;
Index: javax/swing/colorchooser/DefaultHSBChooserPanel.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/colorchooser/DefaultHSBChooserPanel.java,v
retrieving revision 1.3
diff -u -r1.3 DefaultHSBChooserPanel.java
--- javax/swing/colorchooser/DefaultHSBChooserPanel.java 22 Oct 2004 12:44:00 -0000 1.3
+++ javax/swing/colorchooser/DefaultHSBChooserPanel.java 26 Apr 2005 18:33:55 -0000
@@ -1,5 +1,5 @@
 /* DefaultHSBChooserPanel.java --
-   Copyright (C) 2004 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -70,38 +70,47 @@
  */
 class DefaultHSBChooserPanel extends AbstractColorChooserPanel
 {
-  /** The gradient image displayed. */
-  private transient Image gradientImage;
+  /** The gradient image displayed.
+   * This is package-private to avoid an accessor method.  */
+  transient Image gradientImage;
 
   /** The Panel that holds the gradient image. */
   private transient JPanel gradientPanel;
 
-  /** The track gradient image. */
-  private transient Image trackImage;
+  /** The track gradient image.
+   * This is package-private to avoid an accessor method.  */
+  transient Image trackImage;
 
   /** The panel that holds the track. */
   private transient JPanel trackPanel;
 
-  /** The slider for the locked HSB value. */
-  private transient JSlider slider;
-
-  /** The RadioButton that controls the Hue. */
-  private transient JRadioButton hRadio;
-
-  /** The RadioButton that controls the Saturation. */
-  private transient JRadioButton sRadio;
-
-  /** The RadioButton that controls the Brightness. */
-  private transient JRadioButton bRadio;
-
-  /** The JSpinner that controls the Hue. */
-  private transient JSpinner hSpinner;
-
-  /** The JSpinner that controls the Saturation. */
-  private transient JSpinner sSpinner;
-
-  /** The JSpinner that controls the Brightness. */
-  private transient JSpinner bSpinner;
+  /** The slider for the locked HSB value.
+   * This is package-private to avoid an accessor method.  */
+  transient JSlider slider;
+
+  /** The RadioButton that controls the Hue.
+   * This is package-private to avoid an accessor method.  */
+  transient JRadioButton hRadio;
+
+  /** The RadioButton that controls the Saturation.
+   * This is package-private to avoid an accessor method.  */
+  transient JRadioButton sRadio;
+
+  /** The RadioButton that controls the Brightness.
+   * This is package-private to avoid an accessor method.  */
+  transient JRadioButton bRadio;
+
+  /** The JSpinner that controls the Hue.
+   * This is package-private to avoid an accessor method.  */
+  transient JSpinner hSpinner;
+
+  /** The JSpinner that controls the Saturation.
+   * This is package-private to avoid an accessor method.  */
+  transient JSpinner sSpinner;
+
+  /** The JSpinner that controls the Brightness.
+   * This is package-private to avoid an accessor method.  */
+  transient JSpinner bSpinner;
 
   /** The default width of the gradient image. */
   private static final int imgWidth = 200;
@@ -132,20 +141,26 @@
   /** The JLabel that displays the value of Blue. */
   private transient JLabel bFull;
 
-  /** The point that is displayed in the gradient image. */
-  private transient Point gradientPoint = new Point();
+  /** The point that is displayed in the gradient image.
+   * Package-private to avoid an accessor method.
+   */
+  transient Point gradientPoint = new Point();
 
   /**
    * This indicates that the change to the slider or point is triggered
    * internally.
+   * This is package-private to avoid an accessor method.
    */
-  private transient boolean internalChange = false;
+  transient boolean internalChange = false;
 
-  /** This indicates that the change to the spinner is triggered internally. */
-  private transient boolean spinnerTrigger = false;
+  /** This indicates that the change to the spinner is triggered
+   * internally.
+   * This is package-private to avoid an accessor method.  */
+  transient boolean spinnerTrigger = false;
 
-  /** This int identifies which spinner is currently locked. */
-  private transient int locked = -1;
+  /** This int identifies which spinner is currently locked.
+   * This is package-private to avoid an accessor method.  */
+  transient int locked = -1;
 
   /** This value indicates that the Hue spinner is locked. */
   static final int HLOCKED = 0;
@@ -159,8 +174,9 @@
   /**
    * This method indicates that the mouse event is in the process of being
    * handled.
+   * This is package-private to avoid an accessor method.
    */
-  private transient boolean handlingMouse;
+  transient boolean handlingMouse;
 
   /**
    * This helper class handles mouse events on the gradient image.
@@ -716,8 +732,9 @@
   /**
    * This method calls the appropriate method to update the gradient image
    * depending on which HSB value is constant.
+   * This is package-private to avoid an accessor method.
    */
-  private void updateImage()
+  void updateImage()
   {
     switch (locked)
       {
@@ -750,8 +767,9 @@
   /**
    * This method updates the slider in response to making a different HSB
    * property the constant.
+   * This is package-private to avoid an accessor method.
    */
-  private void updateSlider()
+  void updateSlider()
   {
     if (slider == null)
       return;
@@ -779,8 +797,9 @@
   /**
    * This method updates the track gradient image depending on which HSB
    * property is constant.
+   * This is package-private to avoid an accessor method.
    */
-  private void updateTrack()
+  void updateTrack()
   {
     switch (locked)
       {
Index: javax/swing/colorchooser/DefaultRGBChooserPanel.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/colorchooser/DefaultRGBChooserPanel.java,v
retrieving revision 1.4
diff -u -r1.4 DefaultRGBChooserPanel.java
--- javax/swing/colorchooser/DefaultRGBChooserPanel.java 28 Jan 2005 09:41:40 -0000 1.4
+++ javax/swing/colorchooser/DefaultRGBChooserPanel.java 26 Apr 2005 18:33:55 -0000
@@ -109,17 +109,20 @@
     }
   }
 
-  /** Whether the color change was initiated by the spinners. */
-  private transient boolean spinnerChange = false;
-
-  /** Whether the color change was initiated by the sliders. */
-  private transient boolean sliderChange = false;
+  /** Whether the color change was initiated by the spinners.
+   * This is package-private to avoid an accessor method.  */
+  transient boolean spinnerChange = false;
+
+  /** Whether the color change was initiated by the sliders.
+   * This is package-private to avoid an accessor method.  */
+  transient boolean sliderChange = false;
 
   /**
    * Whether the change was forced by the chooser (meaning the color has
    * already been changed).
+   * This is package-private to avoid an accessor method.
    */
-  private transient boolean updateChange = false;
+  transient boolean updateChange = false;
 
   /** The ChangeListener for the sliders. */
   private transient ChangeListener colorChanger;
@@ -127,14 +130,17 @@
   /** The ChangeListener for the spinners. */
   private transient ChangeListener spinnerHandler;
 
-  /** The slider that handles the red values. */
-  private transient JSlider R;
-
-  /** The slider that handles the green values. */
-  private transient JSlider G;
-
-  /** The slider that handles the blue values. */
-  private transient JSlider B;
+  /** The slider that handles the red values.
+   * This is package-private to avoid an accessor method.  */
+  transient JSlider R;
+
+  /** The slider that handles the green values.
+   * This is package-private to avoid an accessor method.  */
+  transient JSlider G;
+
+  /** The slider that handles the blue values.
+   * This is package-private to avoid an accessor method.  */
+  transient JSlider B;
 
   /** The label for the red slider. */
   private transient JLabel RLabel;
@@ -145,14 +151,17 @@
   /** The label for the blue slider. */
   private transient JLabel BLabel;
 
-  /** The spinner that handles the red values. */
-  private transient JSpinner RSpinner;
-
-  /** The spinner that handles the green values. */
-  private transient JSpinner GSpinner;
-
-  /** The spinner that handles the blue values. */
-  private transient JSpinner BSpinner;
+  /** The spinner that handles the red values.
+   * This is package-private to avoid an accessor method.  */
+  transient JSpinner RSpinner;
+
+  /** The spinner that handles the green values.
+   * This is package-private to avoid an accessor method.  */
+  transient JSpinner GSpinner;
+
+  /** The spinner that handles the blue values.
+   * This is package-private to avoid an accessor method.  */
+  transient JSpinner BSpinner;
 
   /**
    * Creates a new DefaultRGBChooserPanel object.
Index: javax/swing/colorchooser/DefaultSwatchChooserPanel.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/colorchooser/DefaultSwatchChooserPanel.java,v
retrieving revision 1.3
diff -u -r1.3 DefaultSwatchChooserPanel.java
--- javax/swing/colorchooser/DefaultSwatchChooserPanel.java 28 Jan 2005 09:41:40 -0000 1.3
+++ javax/swing/colorchooser/DefaultSwatchChooserPanel.java 26 Apr 2005 18:33:55 -0000
@@ -501,10 +501,11 @@
 
     /**
      * This method adds the given color to the beginning of the swatch panel.
+     * Package-private to avoid an accessor method.
      *
      * @param c The color to add.
      */
-    private void addColorToQueue(Color c)
+    void addColorToQueue(Color c)
     {
       if (--start == -1)
 	start = numRows * numCols - 1;
Index: javax/swing/plaf/basic/BasicArrowButton.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicArrowButton.java,v
retrieving revision 1.9
diff -u -r1.9 BasicArrowButton.java
--- javax/swing/plaf/basic/BasicArrowButton.java 22 Oct 2004 12:44:00 -0000 1.9
+++ javax/swing/plaf/basic/BasicArrowButton.java 26 Apr 2005 18:33:56 -0000
@@ -1,5 +1,5 @@
 /* BasicArrowButton.java --
-   Copyright (C) 2004 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -80,17 +80,22 @@
   /**
    * The color the arrow is painted in if disabled and the bottom and right
    * edges of the button.
+   * This is package-private to avoid an accessor method.
    */
-  private transient Color shadow = Color.GRAY;
+  transient Color shadow = Color.GRAY;
 
   /**
    * The color the arrow is painted in if enabled and the bottom and right
    * edges of the button.
+   * This is package-private to avoid an accessor method.
    */
-  private transient Color darkShadow = Color.DARK_GRAY;
+  transient Color darkShadow = Color.DARK_GRAY;
 
-  /** The top and left edges of the button. */
-  private transient Color highlight = Color.WHITE;
+  /**
+   * The top and left edges of the button.
+   * This is package-private to avoid an accessor method.
+   */
+  transient Color highlight = Color.WHITE;
 
   /** The border around the ArrowButton. */
   private transient Border buttonBorder = new Border()
Index: javax/swing/plaf/basic/BasicColorChooserUI.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicColorChooserUI.java,v
retrieving revision 1.2
diff -u -r1.2 BasicColorChooserUI.java
--- javax/swing/plaf/basic/BasicColorChooserUI.java 22 Oct 2004 12:44:00 -0000 1.2
+++ javax/swing/plaf/basic/BasicColorChooserUI.java 26 Apr 2005 18:33:56 -0000
@@ -1,5 +1,5 @@
 /* BasicColorChooserUI.java --
-   Copyright (C) 2004 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -141,11 +141,14 @@
   /** The PropertyChangeListener for the JColorChooser. */
   protected PropertyChangeListener propertyChangeListener;
 
-  /** The JColorChooser. */
-  private JColorChooser chooser;
+  /**
+   * The JColorChooser.
+   * This is package-private to avoid an accessor method.
+   */
+  JColorChooser chooser;
 
   /** The JTabbedPane that is used. */
-  private JTabbedPane pane;
+  JTabbedPane pane;
 
   /** The Container that holds the preview panel. */
   private Container prevContainer;
@@ -219,10 +222,11 @@
   /**
    * This method adds tabs to the JTabbedPane for the chooserPanels defined in
    * the JColorChooser.
+   * This is package-private to avoid an accessor method.
    *
    * @param panels The Panels that need tabs to be made for them.
    */
-  private void makeTabs(AbstractColorChooserPanel[] panels)
+  void makeTabs(AbstractColorChooserPanel[] panels)
   {
     pane.removeAll();
     for (int i = 0; i < panels.length; i++)
@@ -255,10 +259,11 @@
   /**
    * This is a helper method that swaps the existing preview panel with the
    * given panel.
+   * This is package-private to avoid an accessor method.
    *
    * @param preview The new preview panel.
    */
-  private void updatePreviewPanel(JComponent preview)
+  void updatePreviewPanel(JComponent preview)
   {
     if (prevContainer == null)
       {
Index: javax/swing/plaf/basic/BasicComboBoxUI.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicComboBoxUI.java,v
retrieving revision 1.6
diff -u -r1.6 BasicComboBoxUI.java
--- javax/swing/plaf/basic/BasicComboBoxUI.java 26 Jan 2005 23:32:51 -0000 1.6
+++ javax/swing/plaf/basic/BasicComboBoxUI.java 26 Apr 2005 18:33:56 -0000
@@ -160,17 +160,22 @@
   private Color highlight;
   private Color lightHighlight;
 
-  /* Size of the largest item in the comboBox */
-  private Dimension largestItemSize;
+  /* Size of the largest item in the comboBox
+   * This is package-private to avoid an accessor method.
+   */
+  Dimension largestItemSize;
 
   // It seems that JComboBox doesn't have a border set explicitely. So we just
   // paint the border everytime combo box is displayed. 
 
-  /* border insets for this JComboBox*/
-  private static final Insets borderInsets = new Insets(2, 2, 2, 2);
+  /* border insets for this JComboBox
+   * This is package-private to avoid an accessor method. */
+  static final Insets borderInsets = new Insets(2, 2, 2, 2);
 
   // Width of the arrow button  
-  private static int arrowButtonWidth = 15;
+  // This is package-private to avoid an accessor method.
+  // FIXME: has wrong name for a constant.
+  static final int arrowButtonWidth = 15;
 
   // FIXME: This fields aren't used anywhere at this moment.
   protected Dimension cachedMinimumSize;
Index: javax/swing/plaf/basic/BasicDesktopIconUI.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicDesktopIconUI.java,v
retrieving revision 1.2
diff -u -r1.2 BasicDesktopIconUI.java
--- javax/swing/plaf/basic/BasicDesktopIconUI.java 22 Oct 2004 12:44:00 -0000 1.2
+++ javax/swing/plaf/basic/BasicDesktopIconUI.java 26 Apr 2005 18:33:56 -0000
@@ -1,5 +1,5 @@
 /* BasicDesktopIconUI.java --
-   Copyright (C) 2004 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -302,8 +302,9 @@
   /** The MouseListener responsible for reacting to MouseEvents on the JDesktopIcon. */
   private transient MouseInputListener mouseHandler;
 
-  /** The Button in the JDesktopIcon responsible for deiconifying it. */
-  private transient BoundButton button;
+  /** The Button in the JDesktopIcon responsible for deiconifying it.
+   * This is package-private to avoid an accessor method. */
+  transient BoundButton button;
 
   /** The PropertyChangeListener listening to the JDesktopIcon. */
   private transient PropertyChangeListener propertyHandler;
Index: javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java,v
retrieving revision 1.5
diff -u -r1.5 BasicInternalFrameTitlePane.java
--- javax/swing/plaf/basic/BasicInternalFrameTitlePane.java 24 Dec 2004 09:53:03 -0000 1.5
+++ javax/swing/plaf/basic/BasicInternalFrameTitlePane.java 26 Apr 2005 18:33:56 -0000
@@ -1,5 +1,5 @@
 /* BasicInternalFrameTitlePane.java --
-   Copyright (C) 2004 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -644,8 +644,9 @@
   /**
    * The label used to display the title. This label is not added to the
    * TitlePane.
+   * This is package-private to avoid an accessor method.
    */
-  private transient JLabel title;
+  transient JLabel title;
 
   /**
    * Creates a new BasicInternalFrameTitlePane object that is used in the
Index: javax/swing/plaf/basic/BasicListUI.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicListUI.java,v
retrieving revision 1.15
diff -u -r1.15 BasicListUI.java
--- javax/swing/plaf/basic/BasicListUI.java 28 Feb 2005 13:14:19 -0000 1.15
+++ javax/swing/plaf/basic/BasicListUI.java 26 Apr 2005 18:33:56 -0000
@@ -1,5 +1,5 @@
 /* BasicListUI.java --
-   Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -491,10 +491,11 @@
   /**
    * Marks the current layout as damaged and requests revalidation from the
    * JList.
+   * This is package-private to avoid an accessor method.
    *
    * @see #updateLayoutStateNeeded
    */
-  private void damageLayout()
+  void damageLayout()
   {
     updateLayoutStateNeeded = 1;
     list.revalidate();
Index: javax/swing/plaf/basic/BasicOptionPaneUI.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicOptionPaneUI.java,v
retrieving revision 1.13
diff -u -r1.13 BasicOptionPaneUI.java
--- javax/swing/plaf/basic/BasicOptionPaneUI.java 19 Apr 2005 06:45:46 -0000 1.13
+++ javax/swing/plaf/basic/BasicOptionPaneUI.java 26 Apr 2005 18:33:57 -0000
@@ -1,5 +1,5 @@
 /* BasicOptionPaneUI.java --
-   Copyright (C) 2004 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -439,7 +439,8 @@
   protected JOptionPane optionPane;
 
   /** The size of the icons. */
-  private static int iconSize = 36;
+  // FIXME: wrong name for a constant.
+  private static final int iconSize = 36;
 
   /** The foreground color for the message area. */
   private transient Color messageForeground;
@@ -451,22 +452,28 @@
   private transient Border buttonBorder;
 
   /** The string used to describe OK buttons. */
-  private static String OK_STRING = "OK";
+  // FIXME: wrong name for a constant.
+  private static final String OK_STRING = "OK";
 
   /** The string used to describe Yes buttons. */
-  private static String YES_STRING = "Yes";
+  // FIXME: wrong name for a constant.
+  private static final String YES_STRING = "Yes";
 
   /** The string used to describe No buttons. */
-  private static String NO_STRING = "No";
+  // FIXME: wrong name for a constant.
+  private static final String NO_STRING = "No";
 
   /** The string used to describe Cancel buttons. */
-  private static String CANCEL_STRING = "Cancel";
+  // FIXME: wrong name for a constant.
+  private static final String CANCEL_STRING = "Cancel";
 
-  /** The container for the message area. */
-  private transient Container messageAreaContainer;
-
-  /** The container for the buttons. */
-  private transient Container buttonContainer;
+  /** The container for the message area.
+   * This is package-private to avoid an accessor method. */
+  transient Container messageAreaContainer;
+
+  /** The container for the buttons.
+   * This is package-private to avoid an accessor method.  */
+  transient Container buttonContainer;
 
   /**
    * A helper class that implements Icon. This is used temporarily until
@@ -1227,8 +1234,9 @@
   /**
    * This method resets the value in the inputComponent to the
    * initialSelectionValue property.
+   * This is package-private to avoid an accessor method.
    */
-  private void resetSelectedValue()
+  void resetSelectedValue()
   {
     if (inputComponent != null)
       {
Index: javax/swing/plaf/basic/BasicPopupMenuUI.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicPopupMenuUI.java,v
retrieving revision 1.6
diff -u -r1.6 BasicPopupMenuUI.java
--- javax/swing/plaf/basic/BasicPopupMenuUI.java 22 Oct 2004 12:44:00 -0000 1.6
+++ javax/swing/plaf/basic/BasicPopupMenuUI.java 26 Apr 2005 18:33:57 -0000
@@ -1,5 +1,5 @@
 /* BasicPopupMenuUI.java
-   Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -73,8 +73,9 @@
   /* PopupMenuListener listens to popup menu events fired by JPopupMenu*/
   private transient PopupMenuListener popupMenuListener;
 
-  /* ComponentListener listening to popupMenu's invoker. */
-  private TopWindowListener topWindowListener;
+  /* ComponentListener listening to popupMenu's invoker.
+   * This is package-private to avoid an accessor method.  */
+  TopWindowListener topWindowListener;
 
   /**
    * Creates a new BasicPopupMenuUI object.
Index: javax/swing/plaf/basic/BasicScrollBarUI.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicScrollBarUI.java,v
retrieving revision 1.16
diff -u -r1.16 BasicScrollBarUI.java
--- javax/swing/plaf/basic/BasicScrollBarUI.java 25 Apr 2005 14:30:59 -0000 1.16
+++ javax/swing/plaf/basic/BasicScrollBarUI.java 26 Apr 2005 18:33:57 -0000
@@ -645,8 +645,9 @@
   /**
    * This method calculates the preferred size since calling
    * getPreferredSize() returns a cached value.
+   * This is package-private to avoid an accessor method.
    */
-  private void calculatePreferredSize()
+  void calculatePreferredSize()
   {
     // System.err.println(this + ".calculatePreferredSize()");
     int height;
@@ -1248,12 +1249,13 @@
    * This method returns the value in the scrollbar's range given the y
    * coordinate. If the value is out of range, it will return the closest
    * legal value.
+   * This is package-private to avoid an accessor method.
    *
    * @param yPos The y coordinate to calculate a value for.
    *
    * @return The value for the y coordinate.
    */
-  private int valueForYPosition(int yPos)
+  int valueForYPosition(int yPos)
   {
     int min = scrollbar.getMinimum();
     int max = scrollbar.getMaximum();
@@ -1280,12 +1282,13 @@
    * This method returns the value in the scrollbar's range given the x
    * coordinate. If the value is out of range, it will return the closest
    * legal value.
+   * This is package-private to avoid an accessor method.
    *
    * @param xPos The x coordinate to calculate a value for.
    *
    * @return The value for the x coordinate.
    */
-  private int valueForXPosition(int xPos)
+  int valueForXPosition(int xPos)
   {
     int min = scrollbar.getMinimum();
     int max = scrollbar.getMaximum();
Index: javax/swing/plaf/basic/BasicSliderUI.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicSliderUI.java,v
retrieving revision 1.12
diff -u -r1.12 BasicSliderUI.java
--- javax/swing/plaf/basic/BasicSliderUI.java 26 Jan 2005 23:32:51 -0000 1.12
+++ javax/swing/plaf/basic/BasicSliderUI.java 26 Apr 2005 18:33:58 -0000
@@ -2158,12 +2158,13 @@
 
   /**
    * This method finds the closest value that has a tick associated with it.
+   * This is package-private to avoid an accessor method.
    *
    * @param value The value to search from.
    *
    * @return The closest value that has a tick associated with it.
    */
-  private int findClosestTick(int value)
+  int findClosestTick(int value)
   {
     int min = slider.getMinimum();
     int max = slider.getMaximum();
Index: javax/swing/plaf/basic/BasicSplitPaneDivider.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicSplitPaneDivider.java,v
retrieving revision 1.7
diff -u -r1.7 BasicSplitPaneDivider.java
--- javax/swing/plaf/basic/BasicSplitPaneDivider.java 22 Oct 2004 12:44:01 -0000 1.7
+++ javax/swing/plaf/basic/BasicSplitPaneDivider.java 26 Apr 2005 18:33:58 -0000
@@ -1,5 +1,5 @@
 /* BasicSplitPaneDivider.java --
-   Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -157,8 +157,9 @@
   /**
    * Keeps track of where the divider should be placed when using one touch
    * expand buttons.
+   * This is package-private to avoid an accessor method.
    */
-  private transient int currentDividerLocation = 1;
+  transient int currentDividerLocation = 1;
 
   /** DOCUMENT ME! */
   private transient Border tmpBorder = new Border()
@@ -493,10 +494,11 @@
    * using one touch expand buttons. Location 0 is the left (or top) most
    * location. Location 1 is the middle. Location 2 is the right (or bottom)
    * most location.
+   * This is package-private to avoid an accessor method.
    *
    * @param locationIndex The location to move to.
    */
-  private void moveDividerTo(int locationIndex)
+  void moveDividerTo(int locationIndex)
   {
     Insets insets = splitPane.getInsets();
     switch (locationIndex)
Index: javax/swing/plaf/basic/BasicTabbedPaneUI.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTabbedPaneUI.java,v
retrieving revision 1.19
diff -u -r1.19 BasicTabbedPaneUI.java
--- javax/swing/plaf/basic/BasicTabbedPaneUI.java 20 Apr 2005 20:15:54 -0000 1.19
+++ javax/swing/plaf/basic/BasicTabbedPaneUI.java 26 Apr 2005 18:33:59 -0000
@@ -1181,20 +1181,25 @@
     }
   }
 
-  /** The button that increments the current scroll location. */
-  private transient ScrollingButton incrButton;
-
-  /** The button that decrements the current scroll location. */
-  private transient ScrollingButton decrButton;
-
-  /** The viewport used to display the tabs. */
-  private transient ScrollingViewport viewport;
-
-  /** The panel inside the viewport that paints the tabs. */
-  private transient ScrollingPanel panel;
-
-  /** The starting visible tab in the run in SCROLL_TAB_MODE. */
-  private transient int currentScrollLocation;
+  /** The button that increments the current scroll location.
+   * This is package-private to avoid an accessor method.  */
+  transient ScrollingButton incrButton;
+
+  /** The button that decrements the current scroll location.
+   * This is package-private to avoid an accessor method.  */
+  transient ScrollingButton decrButton;
+
+  /** The viewport used to display the tabs.
+   * This is package-private to avoid an accessor method.  */
+  transient ScrollingViewport viewport;
+
+  /** The panel inside the viewport that paints the tabs.
+   * This is package-private to avoid an accessor method.  */
+  transient ScrollingPanel panel;
+
+  /** The starting visible tab in the run in SCROLL_TAB_MODE.
+   * This is package-private to avoid an accessor method.  */
+  transient int currentScrollLocation;
 
   /** A reusable rectangle. */
   protected Rectangle calcRect;
@@ -1305,14 +1310,17 @@
   /** The tab pane that this UI paints. */
   protected JTabbedPane tabPane;
 
-  /** The current layout manager for the tabPane. */
-  private transient LayoutManager layoutManager;
-
-  /** The rectangle that describes the tab area's position and size. */
-  private transient Rectangle tabAreaRect;
-
-  /** The rectangle that describes the content area's position and size. */
-  private transient Rectangle contentRect;
+  /** The current layout manager for the tabPane.
+   * This is package-private to avoid an accessor method.  */
+  transient LayoutManager layoutManager;
+
+  /** The rectangle that describes the tab area's position and size.
+   * This is package-private to avoid an accessor method.  */
+  transient Rectangle tabAreaRect;
+
+  /** The rectangle that describes the content area's position and
+   * size.  This is package-private to avoid an accessor method.  */
+  transient Rectangle contentRect;
 
   /**
    * Creates a new BasicTabbedPaneUI object.
@@ -1325,10 +1333,11 @@
   /**
    * This method creates a ScrollingButton that  points in the appropriate
    * direction for an increasing button.
+   * This is package-private to avoid an accessor method.
    *
    * @return The increase ScrollingButton.
    */
-  private ScrollingButton createIncreaseButton()
+  ScrollingButton createIncreaseButton()
   {
     if (incrButton == null)
       incrButton = new ScrollingButton(SwingConstants.NORTH);
@@ -1343,10 +1352,11 @@
   /**
    * This method creates a ScrollingButton that points in the appropriate
    * direction for a decreasing button.
+   * This is package-private to avoid an accessor method.
    *
    * @return The decrease ScrollingButton.
    */
-  private ScrollingButton createDecreaseButton()
+  ScrollingButton createDecreaseButton()
   {
     if (decrButton == null)
       decrButton = new ScrollingButton(SwingConstants.SOUTH);
@@ -1361,12 +1371,13 @@
   /**
    * This method finds the point to set the view  position at given the index
    * of a tab. The tab will be the first visible tab in the run.
+   * This is package-private to avoid an accessor method.
    *
    * @param index The index of the first visible tab.
    *
    * @return The position of the first visible tab.
    */
-  private Point findPointForIndex(int index)
+  Point findPointForIndex(int index)
   {
     int tabPlacement = tabPane.getTabPlacement();
     int selectedIndex = tabPane.getSelectedIndex();
Index: javax/swing/plaf/basic/BasicToolBarUI.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicToolBarUI.java,v
retrieving revision 1.8
diff -u -r1.8 BasicToolBarUI.java
--- javax/swing/plaf/basic/BasicToolBarUI.java 26 Jan 2005 23:32:51 -0000 1.8
+++ javax/swing/plaf/basic/BasicToolBarUI.java 26 Apr 2005 18:33:59 -0000
@@ -82,8 +82,9 @@
  */
 public class BasicToolBarUI extends ToolBarUI implements SwingConstants
 {
-  /** Static owner of all DragWindows. */
-  private static JFrame owner = new JFrame();
+  /** Static owner of all DragWindows.
+   * This is package-private to avoid an accessor method.  */
+  static JFrame owner = new JFrame();
 
   /** The border used when the JToolBar is in nonrollover mode. */
   private static Border nonRolloverBorder;
@@ -94,8 +95,9 @@
   /** The last known BorderLayout constraint before floating. */
   protected String constraintBeforeFloating;
 
-  /** The last known orientation of the JToolBar before floating. */
-  private int lastGoodOrientation;
+  /** The last known orientation of the JToolBar before floating.
+   * This is package-private to avoid an accessor method.  */
+  int lastGoodOrientation;
 
   /** The color of the border when it is dockable. */
   protected Color dockingBorderColor;
@@ -136,20 +138,24 @@
    */
   private transient Window floatFrame;
 
-  /** The original parent of the JToolBar. */
-  private transient Container origParent;
-
-  /** A hashtable of components and their original borders. */
-  private transient Hashtable borders;
+  /** The original parent of the JToolBar.
+   * This is package-private to avoid an accessor method.  */
+  transient Container origParent;
+
+  /** A hashtable of components and their original borders.
+   * This is package-private to avoid an accessor method.  */
+  transient Hashtable borders;
 
   /** A window listener for the floatable frame. */
   private transient WindowListener windowListener;
 
-  /** A set of cached bounds of the JToolBar. */
-  private transient Dimension cachedBounds;
-
-  /** The cached orientation of the JToolBar. */
-  private transient int cachedOrientation;
+  /** A set of cached bounds of the JToolBar.
+   * This is package-private to avoid an accessor method.  */
+  transient Dimension cachedBounds;
+
+  /** The cached orientation of the JToolBar.
+   * This is package-private to avoid an accessor method.  */
+  transient int cachedOrientation;
 
   /**
    * This method creates a new <code>BasicToolBarUI</code> object for the given JToolBar.
@@ -1086,8 +1092,9 @@
 
     /**
      * Creates a new DragWindow object.
+     * This is package-private to avoid an accessor method.
      */
-    private DragWindow()
+    DragWindow()
     {
       super(owner);
     }
Index: javax/swing/text/JTextComponent.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/text/JTextComponent.java,v
retrieving revision 1.26
diff -u -r1.26 JTextComponent.java
--- javax/swing/text/JTextComponent.java 8 Apr 2005 08:04:33 -0000 1.26
+++ javax/swing/text/JTextComponent.java 26 Apr 2005 18:33:59 -0000
@@ -883,7 +883,8 @@
     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;
Index: javax/swing/text/StringContent.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/text/StringContent.java,v
retrieving revision 1.2
diff -u -r1.2 StringContent.java
--- javax/swing/text/StringContent.java 16 Feb 2005 07:05:33 -0000 1.2
+++ javax/swing/text/StringContent.java 26 Apr 2005 18:33:59 -0000
@@ -56,7 +56,8 @@
  */
 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 @@
       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 @@
       }
   }
 
-  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);
Index: javax/swing/text/html/parser/DocumentParser.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/text/html/parser/DocumentParser.java,v
retrieving revision 1.3
diff -u -r1.3 DocumentParser.java
--- javax/swing/text/html/parser/DocumentParser.java 18 Mar 2005 07:29:07 -0000 1.3
+++ javax/swing/text/html/parser/DocumentParser.java 26 Apr 2005 18:33:59 -0000
@@ -144,19 +144,22 @@
   /**
    * 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
Index: javax/swing/text/html/parser/ParserDelegator.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/text/html/parser/ParserDelegator.java,v
retrieving revision 1.3
diff -u -r1.3 ParserDelegator.java
--- javax/swing/text/html/parser/ParserDelegator.java 12 Apr 2005 16:54:34 -0000 1.3
+++ javax/swing/text/html/parser/ParserDelegator.java 26 Apr 2005 18:34:00 -0000
@@ -126,14 +126,16 @@
 
   /**
    * 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]