Warning
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Swing. As of 1.4, support for long term storage
of all JavaBeans
has been added to the java.beans package.
Please see java..
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | BasicTextFieldUI.
A field view that support bidirectional text via the support provided by ParagraphView. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public View | Returns: the view for the elementthe element elem)Overrides javax. Implements javax. Creates a view for an element. |
| public static ComponentUI | Returns: the UIthe text field c)Hides javax. Creates a UI for a JTextField. |
| public int | getBaseline(JComponent c, int width, int height)
Overrides javax. Returns the baseline. |
| public Component. | getBaselineResizeBehavior(JComponent c)
Overrides javax. Returns an enum indicating how the baseline of the component changes as the size changes. |
| protected String | Returns: the name ("TextField")Implements abstract javax. Fetches the name used as a key to lookup properties through the UIManager. |
| BasicTextFieldUI | back to summary |
|---|---|
| public BasicTextFieldUI() Creates a new BasicTextFieldUI. | |
| create | back to summary |
|---|---|
| public View create(Element elem) Overrides javax. Implements javax. Creates a view for an element. | |
| createUI | back to summary |
|---|---|
| public static ComponentUI createUI(JComponent c) Hides javax. Creates a UI for a JTextField.
| |
| getBaseline | back to summary |
|---|---|
| public int getBaseline(JComponent c, int width, int height) Overrides javax. Returns the baseline.
| |
| getBaselineResizeBehavior | back to summary |
|---|---|
| public Component. Overrides javax. Returns an enum indicating how the baseline of the component changes as the size changes.
| |
| getPropertyPrefix | back to summary |
|---|---|
| protected String getPropertyPrefix() Implements abstract javax. Fetches the name used as a key to lookup properties through the UIManager. This is used as a prefix to all the standard text properties.
| |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv 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. |
| public int | getFlowSpan(int index)
Overrides javax. Fetch the constraining span to flow against for the given child index. |
| 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. |
| pack-priv static boolean | |
| 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 Shape | Returns: the bounding box of the given position is returnedthe position to convert >= 0 p0, Position.the bias toward the previous character or the
next character represented by p0, in case the
position is a boundary of two views. b0,the position to convert >= 0 p1, Position.the bias toward the previous character or the
next character represented by p1, in case the
position is a boundary of two views. b1,the allocated region to render into a)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. |
| protected void | setJustification(int j)
Overrides javax. Sets the type of justification. |
| 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. |
| I18nFieldView | back to summary |
|---|---|
| pack-priv I18nFieldView(Element elem) | |
| adjustAllocation | back to summary |
|---|---|
| pack-priv 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). | |
| getFlowSpan | back to summary |
|---|---|
| public int getFlowSpan(int index) Overrides javax. Fetch the constraining span to flow against for
the given child index. There is no limit for
a field since it scrolls, so this is implemented to
return | |
| 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.
| |
| isLeftToRight | back to summary |
|---|---|
| pack-priv static boolean isLeftToRight(Component c) | |
| 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.
| |
| modelToView | back to summary |
|---|---|
| public Shape modelToView(int p0, 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.
| |
| setJustification | back to summary |
|---|---|
| protected void setJustification(int j) Overrides javax. Doc from javax. Sets the type of justification. | |
| 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.
| |