View
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected Shape | Returns: the allocation that the superclass should use.the allocation given to the view, which may need
to be adjusted. a)Adjusts the allocation given to the view to be a suitable allocation for a text field. |
| pack-priv Shape | adjustPaintRegion(Shape a)
Overrides javax. Adjusts |
| protected FontMetrics | Returns: the metricsFetches the font metrics associated with the component hosting this view. |
| public float | Returns: the span the view would like to be rendered into >= 0. Typically the view is told to render into the span that is returned, although there is no guarantee. The parent may choose to resize or break the view.may be either View.X_AXIS or View.Y_AXIS axis)Overrides javax. Determines the preferred span for this view along an axis. |
| public int | Returns: the weight -> 1 for View.X_AXIS, else 0View.X_AXIS or View.Y_AXIS axis)Overrides javax. Determines the resizability of the view along the given axis. |
| public void | insertUpdate(DocumentEvent
the change information from the associated document changes, Shape the current allocation of the view a, ViewFactory the factory to use to rebuild if the view has children f)Overrides javax. Gives notification that something was inserted into the document in a location that this view is responsible for. |
| public Shape | Returns: the bounding box of the given positionthe position to convert >= 0 pos, Shape the allocated region to render into a, Position.Overrides javax. Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it. |
| public void | paint(Graphics
the rendering surface to use g, Shape the allocated region to render into a)Overrides javax. Renders using the given rendering surface and area on that surface. |
| public void | removeUpdate(DocumentEvent
the change information from the associated document changes, Shape the current allocation of the view a, ViewFactory the factory to use to rebuild if the view has children f)Overrides javax. Gives notification that something was removed from the document in a location that this view is responsible for. |
| pack-priv 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. |
| public int | Returns: the location within the model that best represents the given point in the viewthe X coordinate >= 0.0f fx, float the Y coordinate >= 0.0f fy, Shape the allocated region to render into a, Position.Overrides javax. Provides a mapping from the view coordinate space to the logical coordinate space of the model. |
| FieldView | back to summary |
|---|---|
| public FieldView(Element elem) Constructs a new FieldView wrapped on an element.
| |
| adjustAllocation | back to summary |
|---|---|
| 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). | |
| adjustPaintRegion | back to summary |
|---|---|
| pack-priv Shape adjustPaintRegion(Shape a) Overrides javax. Adjusts | |
| getFontMetrics | back to summary |
|---|---|
| protected FontMetrics getFontMetrics() Fetches the font metrics associated with the component hosting this view.
| |
| getPreferredSpan | back to summary |
|---|---|
| public float getPreferredSpan(int axis) Overrides javax. Determines the preferred span for this view along an axis.
| |
| getResizeWeight | back to summary |
|---|---|
| public int getResizeWeight(int axis) Overrides javax. Determines the resizability of the view along the given axis. A value of 0 or less is not resizable.
| |
| insertUpdate | back to summary |
|---|---|
| public void insertUpdate(DocumentEvent changes, Shape a, ViewFactory f) Overrides javax. Gives notification that something was inserted into the document in a location that this view is responsible for.
| |
| modelToView | back to summary |
|---|---|
| public Shape modelToView(int pos, Shape a, Position. Overrides javax. Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
| |
| paint | back to summary |
|---|---|
| public void paint(Graphics g, Shape a) Overrides javax. 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.
| |
| removeUpdate | back to summary |
|---|---|
| public void removeUpdate(DocumentEvent changes, Shape a, ViewFactory f) Overrides javax. Gives notification that something was removed from the document in a location that this view is responsible for.
| |
| updateVisibilityModel | back to summary |
|---|---|
| pack-priv 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. | |
| viewToModel | back to summary |
|---|---|
| public int viewToModel(float fx, float fy, Shape a, Position. Overrides javax. Provides a mapping from the view coordinate space to the logical coordinate space of the model.
| |