Class FieldView
java.lang.Object
javax.swing.text.View
javax.swing.text.PlainView
javax.swing.text.FieldView
- All Implemented Interfaces:
SwingConstants
,TabExpander
- Direct Known Subclasses:
PasswordView
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.
- See Also:
-
Field Summary
Fields declared in class javax.swing.text.View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
Fields declared in interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Shape
Adjusts the allocation given to the view to be a suitable allocation for a text field.protected FontMetrics
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.