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 | BasicTextAreaUI.
Paragraph for representing plain-text lines that support bidirectional text. |
| 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. |
| pack-priv View | |
| public static ComponentUI | Returns: the UIa text area ta)Hides javax. Creates a UI for a JTextArea. |
| 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. |
| public Dimension | Returns: the minimum sizethe editor component c)Overrides javax. The method is overridden to take into account caret width. |
| public Dimension | Returns: the preferred sizethe editor component c)Overrides javax. The method is overridden to take into account caret width. |
| protected String | Returns: the name ("TextArea")Implements abstract javax. Fetches the name used as a key to look up properties through the UIManager. |
| protected void | installDefaults()
Overrides javax. Initializes component properties, such as font, foreground, background, caret color, selection color, selected text color, disabled text color, border, and margin. |
| protected void | propertyChange(PropertyChangeEvent
the property change event evt)Overrides javax. This method gets called when a bound property is changed on the associated JTextComponent. |
| BasicTextAreaUI | back to summary |
|---|---|
| public BasicTextAreaUI() Constructs a new BasicTextAreaUI object. | |
| create | back to summary |
|---|---|
| public View create(Element elem) Overrides javax. Implements javax. Creates a view for an element. | |
| createI18N | back to summary |
|---|---|
| pack-priv View createI18N(Element elem) | |
| createUI | back to summary |
|---|---|
| public static ComponentUI createUI(JComponent ta) Hides javax. Creates a UI for a JTextArea.
| |
| 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.
| |
| getMinimumSize | back to summary |
|---|---|
| public Dimension getMinimumSize(JComponent c) Overrides javax. The method is overridden to take into account caret width.
| |
| getPreferredSize | back to summary |
|---|---|
| public Dimension getPreferredSize(JComponent c) Overrides javax. The method is overridden to take into account caret width.
| |
| getPropertyPrefix | back to summary |
|---|---|
| protected String getPropertyPrefix() Implements abstract javax. Fetches the name used as a key to look up properties through the UIManager. This is used as a prefix to all the standard text properties.
| |
| installDefaults | back to summary |
|---|---|
| protected void installDefaults() Overrides javax. Doc from javax. Initializes component properties, such as font, foreground, background, caret color, selection color, selected text color, disabled text color, border, and margin. Each property is set if its current value is either null or a UIResource. | |
| propertyChange | back to summary |
|---|---|
| protected void propertyChange(PropertyChangeEvent evt) Overrides javax. This method gets called when a bound property is changed on the associated JTextComponent. This is a hook which UI implementations may change to reflect how the UI displays bound properties of JTextComponent subclasses. This is implemented to rebuild the View when the WrapLine or the WrapStyleWord property changes.
| |
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | BasicTextAreaUI.
This class can be used to represent a logical view for a flow. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected SizeRequirements | calculateMinorAxisRequirements(int axis, SizeRequirements r)
Overrides javax. Calculate the needs for the paragraph along the minor axis. |
| public int | getFlowSpan(int index)
Overrides javax. Fetch the constraining span to flow against for the given child index. |
| public void | |
| protected void | setPropertiesFromAttributes()
Overrides javax. Set the cached properties from the attributes. |
| public void | setSize(float
the width >= 0 width, float the height >= 0 height)Overrides javax. Sets the size of the view. |
| PlainParagraph | back to summary |
|---|---|
| pack-priv PlainParagraph(Element elem) | |
| calculateMinorAxisRequirements | back to summary |
|---|---|
| protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements r) Overrides javax. Doc from javax. Calculate the needs for the paragraph along the minor axis. This uses size requirements of the superclass, modified to take into account the non-breakable areas at the adjacent views edges. The minimal size requirements for such views should be no less than the sum of all adjacent fragments. If the | |
| getFlowSpan | back to summary |
|---|---|
| public int getFlowSpan(int index) Overrides javax. Fetch the constraining span to flow against for the given child index. | |
| setParent | back to summary |
|---|---|
| public void setParent(View parent) Overrides javax. Doc from javax. Sets the parent of the view.
This is reimplemented to provide the superclass
behavior as well as calling the | |
| setPropertiesFromAttributes | back to summary |
|---|---|
| protected void setPropertiesFromAttributes() Overrides javax. Doc from javax. Set the cached properties from the attributes. | |
| setSize | back to summary |
|---|---|
| public void setSize(float width, float height) Overrides javax. Sets the size of the view. If the size has changed, layout is redone. The size is the full size of the view including the inset areas.
| |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected void | childAllocation(int index, Rectangle a)
Implements abstract javax. Returns the allocation for a given child. |
| protected void | forwardUpdateToView(View
the child view to forward the event to. v, DocumentEvent the change information from the associated document e, Shape the current allocation of the view a, ViewFactory the factory to use to rebuild if the view has children f)Overrides javax. Forward the DocumentEvent to the given child view. |
| public float | getPreferredSpan(int axis)
Implements abstract javax. Determines the preferred span for this view along an axis. |
| protected View | getViewAtPoint(int x, int y, Rectangle alloc)
Implements abstract javax. Fetches the child view at the given coordinates. |
| protected int | getViewIndexAtPosition(int pos)
Overrides javax. Fetches the child view index representing the given position in the model. |
| protected boolean | isAfter(int x, int y, Rectangle alloc)
Implements abstract javax. Tests whether a point lies after the rectangle range. |
| protected boolean | isBefore(int x, int y, Rectangle alloc)
Implements abstract javax. Tests whether a point lies before the rectangle range. |
| protected void | loadChildren(ViewFactory f)
Overrides javax. Loads all of the children to initialize the view. |
| public void | paint(Graphics g, Shape allocation)
Implements abstract javax. Renders using the given rendering surface and area on that surface. |
| protected boolean | updateChildren(DocumentEvent.
Overrides javax. Updates the child views in response to receiving notification that the model changed, and there is change record for the element this view is responsible for. |
| LogicalView | back to summary |
|---|---|
| pack-priv LogicalView(Element elem) | |
| childAllocation | back to summary |
|---|---|
| protected void childAllocation(int index, Rectangle a) Implements abstract javax. Doc from javax. Returns the allocation for a given child. | |
| forwardUpdateToView | back to summary |
|---|---|
| protected void forwardUpdateToView(View v, DocumentEvent e, Shape a, ViewFactory f) Overrides javax. Forward the DocumentEvent to the given child view. This is implemented to reparent the child to the logical view (the children may have been parented by a row in the flow if they fit without breaking) and then execute the superclass behavior.
| |
| getPreferredSpan | back to summary |
|---|---|
| public float getPreferredSpan(int axis) Implements abstract javax. Doc from javax. Determines the preferred span for this view along an axis. | |
| getViewAtPoint | back to summary |
|---|---|
| protected View getViewAtPoint(int x, int y, Rectangle alloc) Implements abstract javax. Doc from javax. Fetches the child view at the given coordinates. | |
| getViewIndexAtPosition | back to summary |
|---|---|
| protected int getViewIndexAtPosition(int pos) Overrides javax. Doc from javax. Fetches the child view index representing the given position in the model. This is implemented to fetch the view in the case where there is a child view for each child element. | |
| isAfter | back to summary |
|---|---|
| protected boolean isAfter(int x, int y, Rectangle alloc) Implements abstract javax. Doc from javax. Tests whether a point lies after the rectangle range. | |
| isBefore | back to summary |
|---|---|
| protected boolean isBefore(int x, int y, Rectangle alloc) Implements abstract javax. Doc from javax. Tests whether a point lies before the rectangle range. | |
| loadChildren | back to summary |
|---|---|
| protected void loadChildren(ViewFactory f) Overrides javax. Doc from javax. Loads all of the children to initialize the view.
This is called by the | |
| paint | back to summary |
|---|---|
| public void paint(Graphics g, Shape allocation) Implements abstract javax. Doc from 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. | |
| updateChildren | back to summary |
|---|---|
| protected boolean updateChildren(DocumentEvent. Overrides javax. Doc from javax. Updates the child views in response to receiving notification
that the model changed, and there is change record for the
element this view is responsible for. This is implemented
to assume the child views are directly responsible for the
child elements of the element this view represents. The
| |