java.lang.Object | |||
↳ | javax.swing.text.View | ||
↳ | javax.swing.text.PlainView | ||
↳ | javax.swing.text.FieldView |
![]() |
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.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new FieldView wrapped on an element.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Determines the preferred span for this view along an
axis.
| |||||||||||
Determines the resizability of the view along the
given axis.
| |||||||||||
Gives notification that something was inserted into the document
in a location that this view is responsible for.
| |||||||||||
Provides a mapping from the document model coordinate space
to the coordinate space of the view mapped to it.
| |||||||||||
Renders using the given rendering surface and area on that surface.
| |||||||||||
Gives notification that something was removed from the document
in a location that this view is responsible for.
| |||||||||||
Provides a mapping from the view coordinate space to the logical
coordinate space of the model.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adjusts the allocation given to the view
to be a suitable allocation for a text field.
| |||||||||||
Fetches the font metrics associated with the component hosting
this view.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Constructs a new FieldView wrapped on an element.
elem | the element |
---|
Determines the preferred span for this view along an axis.
axis | may be either View.X_AXIS or View.Y_AXIS |
---|
Determines the resizability of the view along the given axis. A value of 0 or less is not resizable.
axis | View.X_AXIS or View.Y_AXIS |
---|
Gives notification that something was inserted into the document in a location that this view is responsible for.
changes | the change information from the associated document |
---|---|
a | the current allocation of the view |
f | the factory to use to rebuild if the view has children |
Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
pos | the position to convert >= 0 |
---|---|
a | the allocated region to render into |
b | the bias toward the previous character or the
next character represented by the offset, in case the
position is a boundary of two views; b will have one
of these values:
|
BadLocationException | if the given position does not represent a valid location in the associated document |
---|
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.
g | the rendering surface to use |
---|---|
a | the allocated region to render into |
Gives notification that something was removed from the document in a location that this view is responsible for.
changes | the change information from the associated document |
---|---|
a | the current allocation of the view |
f | the factory to use to rebuild if the view has children |
Provides a mapping from the view coordinate space to the logical coordinate space of the model.
fx | the X coordinate >= 0.0f |
---|---|
fy | the Y coordinate >= 0.0f |
a | the allocated region to render into |
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).
a | the allocation given to the view, which may need to be adjusted. |
---|
Fetches the font metrics associated with the component hosting this view.