/[classpath]/classpath/javax/swing/text/FieldView.java
ViewVC logotype

Diff of /classpath/javax/swing/text/FieldView.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.2.5 by gnu_andrew, Sat Sep 10 15:31:55 2005 UTC revision 1.1.2.6 by gnu_andrew, Wed Nov 2 00:44:03 2005 UTC
# Line 118  public class FieldView extends PlainView Line 118  public class FieldView extends PlainView
118      FontMetrics fm = getFontMetrics();      FontMetrics fm = getFontMetrics();
119    
120      if (axis == Y_AXIS)      if (axis == Y_AXIS)
121        return fm.getHeight();        return super.getPreferredSpan(axis);
122    
123      String text;      String text;
124      Element elem = getElement();      Element elem = getElement();
# Line 134  public class FieldView extends PlainView Line 134  public class FieldView extends PlainView
134          text = "";          text = "";
135        }        }
136            
137      return fm.stringWidth(text);      return fm.stringWidth(text) + 30;
138    }    }
139    
140    public int getResizeWeight(int axis)    public int getResizeWeight(int axis)
# Line 159  public class FieldView extends PlainView Line 159  public class FieldView extends PlainView
159    {    {
160      Shape newAlloc = adjustAllocation(shape);      Shape newAlloc = adjustAllocation(shape);
161      super.insertUpdate(ev, newAlloc, vf);      super.insertUpdate(ev, newAlloc, vf);
162        getContainer().repaint();
163    }    }
164    
165    public void removeUpdate(DocumentEvent ev, Shape shape, ViewFactory vf)    public void removeUpdate(DocumentEvent ev, Shape shape, ViewFactory vf)
166    {    {
167      Shape newAlloc = adjustAllocation(shape);      Shape newAlloc = adjustAllocation(shape);
168      super.removeUpdate(ev, newAlloc, vf);      super.removeUpdate(ev, newAlloc, vf);
169        getContainer().repaint();
170    }    }
171    
172    public void changedUpdate(DocumentEvent ev, Shape shape, ViewFactory vf)    public void changedUpdate(DocumentEvent ev, Shape shape, ViewFactory vf)
173    {    {
174      Shape newAlloc = adjustAllocation(shape);      Shape newAlloc = adjustAllocation(shape);
175      super.removeUpdate(ev, newAlloc, vf);      super.removeUpdate(ev, newAlloc, vf);
176        getContainer().repaint();
177    }    }
178    
179    public int viewToModel(float fx, float fy, Shape a, Position.Bias[] bias)    public int viewToModel(float fx, float fy, Shape a, Position.Bias[] bias)

Legend:
Removed from v.1.1.2.5  
changed lines
  Added in v.1.1.2.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26