is new.
java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.ButtonUI
javax.swing.plaf.basic.BasicButtonUI
public class BasicButtonUI
BasicButton implementation
| Field Summary | |
|---|---|
| protected int |
defaultTextIconGap
|
| protected int |
defaultTextShiftOffset
|
| Constructor Summary | |
|---|---|
|
BasicButtonUI
() |
|
| Method Summary | |
|---|---|
| protected void |
clearTextShiftOffset
() |
| protected BasicButtonListener |
createButtonListener
(
AbstractButton
b) |
| static ComponentUI |
createUI
(
JComponent
c) |
int
|
getBaseline
(
JComponent
Returns the baseline.
|
Component.BaselineResizeBehavior
|
getBaselineResizeBehavior
(
JComponent
Returns an enum indicating how the baseline of the component changes as the size changes.
|
| int |
getDefaultTextIconGap
(
AbstractButton
b) |
| Dimension |
getMaximumSize
(
JComponent
c) Returns the specified component's maximum size appropriate for the look and feel. |
| Dimension |
getMinimumSize
(
JComponent
c) Returns the specified component's minimum size appropriate for the look and feel. |
| Dimension |
getPreferredSize
(
JComponent
c) Returns the specified component's preferred size appropriate for the look and feel. |
| protected String |
getPropertyPrefix
() |
| protected int |
getTextShiftOffset
() |
| protected void |
installDefaults
(
AbstractButton
b) |
| protected void |
installKeyboardActions
(
AbstractButton
b) |
| protected void |
installListeners
(
AbstractButton
b) |
| void |
installUI
(
JComponent
c) Configures the specified component appropriate for the look and feel. |
| void |
paint
(
Graphics
g,
JComponent
c) Paints the specified component appropriate for the look and feel. |
| protected void |
paintButtonPressed
(
Graphics
g,
AbstractButton
b) |
| protected void |
paintFocus
(
Graphics
g,
AbstractButton
b,
Rectangle
viewRect,
Rectangle
textRect,
Rectangle
iconRect) |
| protected void |
paintIcon
(
Graphics
g,
JComponent
c,
Rectangle
iconRect) |
| protected void |
paintText
(
Graphics
g,
AbstractButton
b,
Rectangle
textRect,
String
text) Method which renders the text of the current button. |
| protected void |
paintText
(
Graphics
g,
JComponent
c,
Rectangle
textRect,
String
text) As of Java 2 platform v 1.4 this method should not be used or overriden. |
| protected void |
setTextShiftOffset
() |
| protected void |
uninstallDefaults
(
AbstractButton
b) |
| protected void |
uninstallKeyboardActions
(
AbstractButton
b) |
| protected void |
uninstallListeners
(
AbstractButton
b) |
| void |
uninstallUI
(
JComponent
c) Reverses configuration which was done on the specified component during installUI. |
| Methods inherited from class javax.swing.plaf. ComponentUI |
|---|
| contains , getAccessibleChild , getAccessibleChildrenCount , update |
| Methods inherited from class java.lang. Object |
|---|
| clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
| Field Detail |
|---|
protected int defaultTextIconGap
protected int defaultTextShiftOffset
| Constructor Detail |
|---|
public BasicButtonUI()
| Method Detail |
|---|
public static ComponentUI createUI(JComponent c)
protected String getPropertyPrefix()
public void installUI(JComponent c)
protected void installDefaults(AbstractButton b)
protected void installListeners(AbstractButton b)
protected void installKeyboardActions(AbstractButton b)
public void uninstallUI(JComponent c)
protected void uninstallKeyboardActions(AbstractButton b)
protected void uninstallListeners(AbstractButton b)
protected void uninstallDefaults(AbstractButton b)
protected BasicButtonListener createButtonListener(AbstractButton b)
public int getDefaultTextIconGap(AbstractButton b)
public void paint(Graphics g,
JComponent c)
protected void paintIcon(Graphics g,
JComponent c,
Rectangle iconRect)
protected void paintText(Graphics g,
JComponent c,
Rectangle textRect,
String text)
protected void paintText(Graphics g,
AbstractButton b,
Rectangle textRect,
String text)
protected void paintFocus(Graphics g,
AbstractButton b,
Rectangle viewRect,
Rectangle textRect,
Rectangle iconRect)
protected void paintButtonPressed(Graphics g,
AbstractButton b)
protected void clearTextShiftOffset()
protected void setTextShiftOffset()
protected int getTextShiftOffset()
public Dimension getMinimumSize(JComponent c)
public Dimension getPreferredSize(JComponent c)
public Dimension getMaximumSize(JComponent c)
getBaseline
public int
getBaseline
(
JComponent
c, int width, int height)
Returns the baseline.
Overrides:
getBaseline
in class
ComponentUI
Parameters:
c - JComponent baseline is being requested for
width - the width to get the baseline for
height - the height to get the baseline for
Returns:
baseline or a value < 0 indicating there is no reasonable baseline
Throws:
NullPointerException
- if c is null
IllegalArgumentException
- if width or height is < 0
Since:
1.6
See Also:
JComponent.getBaseline(int, int)
getBaselineResizeBehavior
public
Component.BaselineResizeBehavior
getBaselineResizeBehavior
(
JComponent
c)
Returns an enum indicating how the baseline of the component changes as the size changes.
Overrides:
getBaselineResizeBehavior
in class
ComponentUI
Parameters:
c - JComponent to return baseline resize behavior for
Returns:
an enum indicating how the baseline changes as the component size changes
Throws:
NullPointerException
- if c is null
Since:
1.6
See Also:
JComponent.getBaseline(int, int)