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.
getFontMetrics()
Fetches the font metrics associated with the component hosting
this view.
float
getPreferredSpan(int axis)
Determines the preferred span for this view along an
axis.
int
getResizeWeight(int axis)
Determines the resizability of the view along the
given axis.
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.
modelToView(int pos,
Shape a,
Position.Bias b)
Provides a mapping from the document model coordinate space
to the coordinate space of the view mapped to it.
void
paint(Graphics g,
Shape a)
Renders using the given rendering surface and area on that surface.
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.
int
viewToModel(float fx,
float fy,
Shape a,
Position.Bias[] bias)
Provides a mapping from the view coordinate space to the logical
coordinate space of the model.
Methods inherited from class javax.swing.text.PlainView
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).
Parameters:
a - the allocation given to the view, which may need
to be adjusted.
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.
Submit a bug or feature For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 1993-2001 Sun Microsystems, Inc. 901 San Antonio Road Palo Alto, California, 94303, U.S.A. All Rights Reserved.