Home » openjdk-7 » javax » swing » text » [javadoc | source]
public class: FieldView [javadoc | source]

All Implemented Interfaces:
    TabExpander, SwingConstants

Direct Known Subclasses:

Extends the multi-line plain text view to be suitable for a single-line editor view. If the view is allocated extra space, the field must adjust for it. If the hosting component is a JTextField, this view will manage the ranges of the associated BoundedRangeModel and will adjust the horizontal allocation to match the current visibility settings of the JTextField.
Fields inherited from javax.swing.text.PlainView:
metrics,  longLine,  font,  lineBuffer,  tabSize,  tabBase,  sel0,  sel1,  unselected,  selected,  firstLineOffset
Fields inherited from javax.swing.text.View:
BadBreakWeight,  GoodBreakWeight,  ExcellentBreakWeight,  ForcedBreakWeight,  X_AXIS,  Y_AXIS,  sharedBiasReturn
 public FieldView(Element elem) 
    Constructs a new FieldView wrapped on an element.
    elem - the element
Method from javax.swing.text.FieldView Summary:
adjustAllocation,   adjustPaintRegion,   getFontMetrics,   getPreferredSpan,   getResizeWeight,   insertUpdate,   modelToView,   paint,   removeUpdate,   updateVisibilityModel,   viewToModel
Methods from javax.swing.text.PlainView:
adjustPaintRegion,   changedUpdate,   damageLineRange,   drawLine,   drawSelectedText,   drawUnselectedText,   getLineBuffer,   getPreferredSpan,   getTabSize,   insertUpdate,   lineToRect,   modelToView,   nextTabStop,   paint,   removeUpdate,   setSize,   updateDamage,   updateMetrics,   viewToModel
Methods from javax.swing.text.View:
append,   breakView,   changedUpdate,   createFragment,   forwardUpdate,   forwardUpdateToView,   getAlignment,   getAttributes,   getBreakWeight,   getChildAllocation,   getContainer,   getDocument,   getElement,   getEndOffset,   getGraphics,   getMaximumSpan,   getMinimumSpan,   getNextVisualPositionFrom,   getParent,   getPreferredSpan,   getResizeWeight,   getStartOffset,   getToolTipText,   getView,   getViewCount,   getViewFactory,   getViewIndex,   getViewIndex,   insert,   insertUpdate,   isVisible,   modelToView,   modelToView,   modelToView,   paint,   preferenceChanged,   remove,   removeAll,   removeUpdate,   replace,   setParent,   setSize,   updateChildren,   updateLayout,   viewToModel,   viewToModel
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.swing.text.FieldView Detail:
 protected Shape adjustAllocation(Shape a) 
    Adjusts the allocation given to the view to be a suitable allocation for a text field. If the view has been allocated more than the preferred span vertically, the allocation is changed to be centered vertically. Horizontally the view is adjusted according to the horizontal alignment property set on the associated JTextField (if that is the type of the hosting component).
 Shape adjustPaintRegion(Shape a) 
    Adjusts a based on the visible region and returns it.
 protected FontMetrics getFontMetrics() 
    Fetches the font metrics associated with the component hosting this view.
 public float getPreferredSpan(int axis) 
    Determines the preferred span for this view along an axis.
 public int getResizeWeight(int axis) 
    Determines the resizability of the view along the given axis. A value of 0 or less is not resizable.
 public  void insertUpdate(DocumentEvent changes,
    Shape a,
    ViewFactory f) 
    Gives notification that something was inserted into the document in a location that this view is responsible for.
 public Shape modelToView(int pos,
    Shape a,
    Bias b) throws BadLocationException 
    Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
 public  void paint(Graphics g,
    Shape a) 
    Renders using the given rendering surface and area on that surface. The view may need to do layout and create child views to enable itself to render into the given allocation.
 public  void removeUpdate(DocumentEvent changes,
    Shape a,
    ViewFactory f) 
    Gives notification that something was removed from the document in a location that this view is responsible for.
  void updateVisibilityModel() 
    Update the visibility model with the associated JTextField (if there is one) to reflect the current visibility as a result of changes to the document model. The bounded range properties are updated. If the view hasn't yet been shown the extent will be zero and we just set it to be full until determined otherwise.
 public int viewToModel(float fx,
    float fy,
    Shape a,
    Bias[] bias) 
    Provides a mapping from the view coordinate space to the logical coordinate space of the model.