|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.ButtonUI
javax.swing.plaf.basic.BasicButtonUI
org.bounce.plaf.BounceButtonUI
public class BounceButtonUI
BounceButtonUI implementation.
Field Summary |
---|
Fields inherited from class javax.swing.plaf.basic.BasicButtonUI |
---|
defaultTextIconGap, defaultTextShiftOffset |
Constructor Summary | |
---|---|
BounceButtonUI()
|
Method Summary | |
---|---|
protected BasicButtonListener |
createButtonListener(AbstractButton b)
Overrides the createButtonListener method in the BasicButtonUI class, to be able to install a new button listener that can listen to double clicks. |
static ComponentUI |
createUI(JComponent c)
Return this button look and feel. |
Dimension |
getPreferredSize(JComponent c)
Returns the preferred size of the button, this size will return the full width of the text as the preferred width and the full height of the lines as the height. |
void |
paint(Graphics g,
JComponent c)
Overrides the paint method in the BasicButtonUI class. |
protected void |
paintBackground(Graphics g,
JComponent c)
Paints button's background. |
protected void |
paintFocus(Graphics g,
QButton b,
Rectangle viewRect,
Rectangle textRect,
Rectangle iconRect)
Paints the focus rectangle on the button. |
protected void |
paintIcon(Graphics g,
JComponent c,
Rectangle iconRect,
Icon icon)
Paints the icon for the button. |
protected void |
paintText(Graphics g,
JComponent c,
Rectangle textRect,
String[] text)
Paints the text on the button. |
Methods inherited from class javax.swing.plaf.basic.BasicButtonUI |
---|
clearTextShiftOffset, getBaseline, getBaselineResizeBehavior, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getPropertyPrefix, getTextShiftOffset, installDefaults, installKeyboardActions, installListeners, installUI, paintButtonPressed, paintFocus, paintIcon, paintText, paintText, setTextShiftOffset, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI |
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 |
Constructor Detail |
---|
public BounceButtonUI()
Method Detail |
---|
public static ComponentUI createUI(JComponent c)
c
- the component the look and feel is for, normally a QButton.
public void paint(Graphics g, JComponent c)
paint
in class BasicButtonUI
g
- the graphics.c
- the button component.protected void paintIcon(Graphics g, JComponent c, Rectangle iconRect, Icon icon)
g
- the graphics.c
- the button component.iconRect
- the rectangle the icon has to be painted in.icon
- the icon.protected void paintBackground(Graphics g, JComponent c)
g
- the graphics.c
- the button component.protected void paintFocus(Graphics g, QButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
g
- the graphics.b
- the button component.viewRect
- the whole button rectangle.textRect
- the text rectangle.iconRect
- the icon rectangle.protected void paintText(Graphics g, JComponent c, Rectangle textRect, String[] text)
g
- the graphics.c
- the button component.textRect
- the text rectangle.text
- the text to be painted.protected BasicButtonListener createButtonListener(AbstractButton b)
createButtonListener
in class BasicButtonUI
b
- the button component.
public Dimension getPreferredSize(JComponent c)
This method is a revamped version of the method:
BasicButtonUI.getPreferredSize()
getPreferredSize
in class BasicButtonUI
c
- the button component.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |