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.
javax.swing.JComponent
, javax.swing.UIManager
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public boolean | Returns: true if the specified x,y location is contained
within the look and feel's defined shape for the given componentthe component where the x,y location is being queried;
this argument is often ignored,
but might be used if the UI object is stateless
and shared by multiple components c, int the x coordinate of the point x, int the y coordinate of the point y)Returns |
public static ComponentUI | Returns: aComponentUI object for c a c)JComponent for which to create a UI delegateReturns an instance of the UI delegate for the specified component. |
public Accessible | Returns: thei th Accessible child of the objecta c, int JComponent for which to get a child objectzero-based index of child i)Returns the |
public int | Returns: the number of accessible children in the objectJComponent for which to get count of accessible childrenReturns the number of accessible children in the object. |
public int | Returns: baseline or a value < 0 indicating there is no reasonable baselineJComponent baseline is being requested forthe width to get the baseline for width, int the height to get the baseline for height)Returns the baseline. |
public Component. | Returns: an enum indicating how the baseline changes as the component size changesJComponent to return baseline resize behavior forReturns an enum indicating how the baseline of the component changes as the size changes. |
public Dimension | Returns: aDimension object or null the component whose maximum size is being queried;
this argument is often ignored,
but might be used if the UI object is stateless
and shared by multiple components c)Returns the specified component's maximum size appropriate for the look and feel. |
public Dimension | Returns: aDimension object or null the component whose minimum size is being queried;
this argument is often ignored,
but might be used if the UI object is stateless
and shared by multiple components c)Returns the specified component's minimum size appropriate for the look and feel. |
public Dimension | Returns: aDimension object containing given component's preferred
size appropriate for the look and feelthe component whose preferred size is being queried;
this argument is often ignored,
but might be used if the UI object is stateless
and shared by multiple components c)Returns the specified component's preferred size appropriate for the look and feel. |
public void | installUI(JComponent
the component where this UI delegate is being installed c)Configures the specified component appropriately for the look and feel. |
public void | paint(Graphics
the g, JComponent Graphics context in which to paintthe component being painted;
this argument is often ignored,
but might be used if the UI object is stateless
and shared by multiple components c)Paints the specified component appropriately for the look and feel. |
public void | uninstallUI(JComponent
the component from which this UI delegate is being removed;
this argument is often ignored,
but might be used if the UI object is stateless
and shared by multiple components c)Reverses configuration which was done on the specified component during
|
public void | update(Graphics
the g, JComponent Graphics context in which to paintthe component being painted;
this argument is often ignored,
but might be used if the UI object is stateless
and shared by multiple components c)Notifies this UI delegate that it is time to paint the specified component. |
ComponentUI | back to summary |
---|---|
public ComponentUI() Sole constructor. (For invocation by subclass constructors, typically implicit.) |
contains | back to summary |
---|---|
public boolean contains(JComponent c, int x, int y) Returns
|
createUI | back to summary |
---|---|
public static ComponentUI createUI(JComponent c) Returns an instance of the UI delegate for the specified component.
Each subclass must provide its own static
|
getAccessibleChild | back to summary |
---|---|
public Accessible getAccessibleChild(JComponent c, int i) Returns the Note As of v1.3, it is recommended that developers call
|
getAccessibleChildrenCount | back to summary |
---|---|
public int getAccessibleChildrenCount(JComponent c) Returns the number of accessible children in the object. If all
of the children of this object implement Note As of v1.3, it is recommended that developers call
|
getBaseline | back to summary |
---|---|
public int getBaseline(JComponent c, int width, int height) Returns the baseline. The baseline is measured from the top of
the component. This method is primarily meant for
This method returns -1. Subclasses that have a meaningful baseline should override appropriately.
|
getBaselineResizeBehavior | back to summary |
---|---|
public Component. Returns an enum indicating how the baseline of the component changes as the size changes. This method is primarily meant for layout managers and GUI builders.
This method returns
|
getMaximumSize | back to summary |
---|---|
public Dimension getMaximumSize(JComponent c) Returns the specified component's maximum size appropriate for
the look and feel. If
|
getMinimumSize | back to summary |
---|---|
public Dimension getMinimumSize(JComponent c) Returns the specified component's minimum size appropriate for
the look and feel. If
|
getPreferredSize | back to summary |
---|---|
public Dimension getPreferredSize(JComponent c) Returns the specified component's preferred size appropriate for
the look and feel. If
|
installUI | back to summary |
---|---|
public void installUI(JComponent c) Configures the specified component appropriately for the look and feel.
This method is invoked when the
|
paint | back to summary |
---|---|
public void paint(Graphics g, JComponent c) Paints the specified component appropriately for the look and feel.
This method is invoked from the
|
uninstallUI | back to summary |
---|---|
public void uninstallUI(JComponent c) Reverses configuration which was done on the specified component during
|
update | back to summary |
---|---|
public void update(Graphics g, JComponent c) Notifies this UI delegate that it is time to paint the specified
component. This method is invoked by By default this method fills the specified component with
its background color if its
|