java.lang.ObjectThe base class for all UI delegate objects in the Swing pluggable look and feel architecture. The UI delegate object for a Swing component is responsible for implementing the aspects of the component that depend on the look and feel. Thejavax.swing.plaf.ComponentUI
JComponent
class
invokes methods from this class in order to delegate operations
(painting, layout calculations, etc.) that may vary depending on the
look and feel installed. Client programs should not invoke methods
on this class directly.
Constructor: |
---|
|
Method from javax.swing.plaf.ComponentUI Summary: |
---|
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update |
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method from javax.swing.plaf.ComponentUI Detail: |
---|
true if the specified x,y location is
contained within the look and feel's defined shape of the specified
component. x and y are defined to be relative
to the coordinate system of the specified component. Although
a component's bounds is constrained to a rectangle,
this method provides the means for defining a non-rectangular
shape within those bounds for the purpose of hit detection. |
createUI
method that returns an instance of that UI delegate subclass.
If the UI delegate subclass is stateless, it may return an instance
that is shared by multiple components. If the UI delegate is
stateful, then it should return a new instance per component.
The default implementation of this method throws an error, as it
should never be invoked. |
i th Accessible child of the object.
UIs might need to override this if they present areas on the
screen that can be viewed as components, but actual components
are not used for presenting those areas.
Note: As of v1.3, it is recommended that developers call
|
Accessible ,
this
method should return the number of children of this object.
UIs might wish to override this if they present areas on the
screen that can be viewed as components, but actual components
are not used for presenting those areas.
Note: As of v1.3, it is recommended that developers call
Component.AccessibleAWTComponent.getAccessibleChildrenCount() instead
of this method. |
LayoutManager s to align components along their
baseline. A return value less than 0 indicates this component
does not have a reasonable baseline and that
LayoutManager s should not align this component on
its baseline.
This method returns -1. Subclasses that have a meaningful baseline should override appropriately. |
This method returns |
null is returned, the maximum
size will be calculated by the component's layout manager instead
(this is the preferred approach for any component with a specific
layout manager installed). The default implementation of this
method invokes getPreferredSize and returns that value. |
null is returned, the minimum
size will be calculated by the component's layout manager instead
(this is the preferred approach for any component with a specific
layout manager installed). The default implementation of this
method invokes getPreferredSize and returns that value. |
null is returned, the preferred
size will be calculated by the component's layout manager instead
(this is the preferred approach for any component with a specific
layout manager installed). The default implementation of this
method returns null . |
ComponentUI instance is being installed
as the UI delegate on the specified component. This method should
completely configure the component for the look and feel,
including the following:
|
ComponentUI.update method when
the specified component is being painted. Subclasses should override
this method and use the specified Graphics object to
render the content of the component. |
installUI . This method is invoked when this
UIComponent instance is being removed as the UI delegate
for the specified component. This method should undo the
configuration performed in installUI , being careful to
leave the JComponent instance in a clean state (no
extraneous listeners, look-and-feel-specific property objects, etc.).
This should include the following:
|
JComponent
when the specified component is being painted.
By default this method fills the specified component with its background color if its {@code opaque} property is {@code true}, and then immediately calls {@code paint}. In general this method need not be overridden by subclasses; all look-and-feel rendering code should reside in the {@code paint} method. |