--- /home/cpdev/src/classpath/javax/swing/text/FieldView.java	2005-07-02 21:04:10.000000000 +0000
+++ javax/swing/text/FieldView.java	2005-06-30 05:35:20.000000000 +0000
@@ -39,15 +39,10 @@
 package javax.swing.text;
 
 import java.awt.Component;
-import java.awt.ComponentOrientation;
 import java.awt.FontMetrics;
 import java.awt.Graphics;
-import java.awt.Rectangle;
 import java.awt.Shape;
 
-import javax.swing.JTextField;
-import javax.swing.event.DocumentEvent;
-
 public class FieldView extends PlainView
 {
   public FieldView(Element elem)
@@ -61,55 +56,6 @@
     return container.getFontMetrics(container.getFont());
   }
 
-  /**
-   * Vertically centers the single line of text within the
-   * bounds of the input shape. The returned Rectangle is centered
-   * vertically within <code>shape</code> and has a height of the
-   * preferred span along the Y axis. Horizontal adjustment is done according
-   * to the horizontalAligment property of the component that is rendered.
-   *
-   * @param shape the shape within which the line is beeing centered
-   */
-  protected Shape adjustAllocation(Shape shape)
-  {
-    Rectangle rectIn = shape.getBounds();
-    // vertical adjustment
-    int height = (int) getPreferredSpan(Y_AXIS);
-    int y = rectIn.y + (rectIn.height - height) / 2;
-    // horizontal adjustment
-    JTextField textField = (JTextField) getContainer();
-    int halign = textField.getHorizontalAlignment();
-    int width = (int) getPreferredSpan(X_AXIS);
-    int x;
-    ComponentOrientation orientation = textField.getComponentOrientation();
-    switch (halign)
-      {
-      case JTextField.CENTER:
-        x = rectIn.x + (rectIn.width - width) / 2;
-        break;
-      case JTextField.RIGHT:
-        x = rectIn.x + (rectIn.width - width);
-        break;
-      case JTextField.TRAILING:
-        if (orientation.isLeftToRight())
-          x = rectIn.x + (rectIn.width - width);
-        else
-          x = rectIn.x;
-        break;
-      case JTextField.LEADING:
-        if (orientation.isLeftToRight())
-          x = rectIn.x;
-        else
-          x = rectIn.x + (rectIn.width - width);
-        break;
-      case JTextField.LEFT:
-      default:
-        x = rectIn.x;
-        break;
-      }
-    return new Rectangle(x, y, width, height);
-  }
-
   public float getPreferredSpan(int axis)
   {
     if (axis != X_AXIS && axis != Y_AXIS)
@@ -145,32 +91,11 @@
   public Shape modelToView(int pos, Shape a, Position.Bias bias)
     throws BadLocationException
   {
-    Shape newAlloc = adjustAllocation(a);
-    return super.modelToView(pos, newAlloc, bias);
+    return super.modelToView(pos, a, bias);
   }
   
   public void paint(Graphics g, Shape s)
   {
-    Shape newAlloc = adjustAllocation(s);
-    super.paint(g, newAlloc);
-  }
-
-  public void insertUpdate(DocumentEvent ev, Shape shape, ViewFactory vf)
-  {
-    Shape newAlloc = adjustAllocation(shape);
-    super.insertUpdate(ev, newAlloc, vf);
+    super.paint(g, s);
   }
-
-  public void removeUpdate(DocumentEvent ev, Shape shape, ViewFactory vf)
-  {
-    Shape newAlloc = adjustAllocation(shape);
-    super.removeUpdate(ev, newAlloc, vf);
-  }
-
-  public void changedUpdate(DocumentEvent ev, Shape shape, ViewFactory vf)
-  {
-    Shape newAlloc = adjustAllocation(shape);
-    super.removeUpdate(ev, newAlloc, vf);
-  }
-
 }
