|
Quaqua 8.0 2011-10-02 | ||||||||
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
ch.randelshofer.quaqua.QuaquaButtonUI
public class QuaquaButtonUI
QuaquaButtonUI.
Field Summary |
---|
Fields inherited from class javax.swing.plaf.basic.BasicButtonUI |
---|
defaultTextIconGap, defaultTextShiftOffset |
Fields inherited from interface ch.randelshofer.quaqua.VisuallyLayoutable |
---|
CLIP_BOUNDS, COMPONENT_BOUNDS, TEXT_BOUNDS |
Constructor Summary | |
---|---|
QuaquaButtonUI()
|
Method Summary | |
---|---|
protected javax.swing.plaf.basic.BasicButtonListener |
createButtonListener(javax.swing.AbstractButton b)
|
static javax.swing.plaf.ComponentUI |
createUI(javax.swing.JComponent c)
Push Button. |
int |
getBaseline(javax.swing.JComponent c,
int width,
int height)
Returns the baseline for the specified component, or -1 if the baseline can not be determined. |
java.awt.Dimension |
getMaximumSize(javax.swing.JComponent c)
|
java.awt.Dimension |
getMinimumSize(javax.swing.JComponent c)
|
static java.awt.Dimension |
getPreferredSize(javax.swing.AbstractButton b)
|
java.awt.Dimension |
getPreferredSize(javax.swing.JComponent c)
|
protected java.lang.String |
getPropertyPrefix()
This method is here, to let QuaquaButtonListener access this property. |
protected static java.lang.String |
getStyle(java.awt.Component c,
java.lang.String defaultStyle)
|
java.awt.Rectangle |
getVisualBounds(javax.swing.JComponent c,
int type,
int width,
int height)
Returns the visual bounds for the specified component, or null if the visual bounds can not be determined. |
protected void |
installDefaults(javax.swing.AbstractButton b)
|
protected java.lang.String |
layoutCL(javax.swing.AbstractButton c,
java.awt.FontMetrics fontMetrics,
java.lang.String text,
javax.swing.Icon icon,
java.awt.Rectangle viewR,
java.awt.Rectangle iconR,
java.awt.Rectangle textR)
Forwards the call to SwingUtilities.layoutCompoundLabel(). |
void |
paint(java.awt.Graphics g,
javax.swing.JComponent c)
|
protected void |
paintIcon(java.awt.Graphics g,
javax.swing.JComponent c,
java.awt.Rectangle iconRect)
|
protected void |
paintText(java.awt.Graphics g,
javax.swing.AbstractButton b,
java.awt.Rectangle textRect,
java.lang.String text)
Method which renders the text of the current button. |
protected void |
paintText(java.awt.Graphics g,
javax.swing.JComponent c,
java.awt.Rectangle textRect,
java.lang.String text)
As of Java 2 platform v 1.4 this method should not be used or overriden. |
Methods inherited from class javax.swing.plaf.basic.BasicButtonUI |
---|
clearTextShiftOffset, getBaselineResizeBehavior, getDefaultTextIconGap, getTextShiftOffset, installKeyboardActions, installListeners, installUI, paintButtonPressed, paintFocus, 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 QuaquaButtonUI()
Method Detail |
---|
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
protected void installDefaults(javax.swing.AbstractButton b)
installDefaults
in class javax.swing.plaf.basic.BasicButtonUI
protected javax.swing.plaf.basic.BasicButtonListener createButtonListener(javax.swing.AbstractButton b)
createButtonListener
in class javax.swing.plaf.basic.BasicButtonUI
public void paint(java.awt.Graphics g, javax.swing.JComponent c)
paint
in class javax.swing.plaf.basic.BasicButtonUI
protected void paintText(java.awt.Graphics g, javax.swing.JComponent c, java.awt.Rectangle textRect, java.lang.String text)
paintText
in class javax.swing.plaf.basic.BasicButtonUI
protected void paintText(java.awt.Graphics g, javax.swing.AbstractButton b, java.awt.Rectangle textRect, java.lang.String text)
paintText
in class javax.swing.plaf.basic.BasicButtonUI
g
- Graphics contextb
- Current button to rendertextRect
- Bounding rectangle to render the text.text
- String to renderprotected void paintIcon(java.awt.Graphics g, javax.swing.JComponent c, java.awt.Rectangle iconRect)
paintIcon
in class javax.swing.plaf.basic.BasicButtonUI
protected java.lang.String getPropertyPrefix()
getPropertyPrefix
in class javax.swing.plaf.basic.BasicButtonUI
public java.awt.Dimension getMinimumSize(javax.swing.JComponent c)
getMinimumSize
in class javax.swing.plaf.basic.BasicButtonUI
public java.awt.Dimension getMaximumSize(javax.swing.JComponent c)
getMaximumSize
in class javax.swing.plaf.basic.BasicButtonUI
public java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
getPreferredSize
in class javax.swing.plaf.basic.BasicButtonUI
protected static java.lang.String getStyle(java.awt.Component c, java.lang.String defaultStyle)
public static java.awt.Dimension getPreferredSize(javax.swing.AbstractButton b)
protected java.lang.String layoutCL(javax.swing.AbstractButton c, java.awt.FontMetrics fontMetrics, java.lang.String text, javax.swing.Icon icon, java.awt.Rectangle viewR, java.awt.Rectangle iconR, java.awt.Rectangle textR)
SwingUtilities.layoutCompoundLabel(javax.swing.JComponent, java.awt.FontMetrics, java.lang.String, javax.swing.Icon, int, int, int, int, java.awt.Rectangle, java.awt.Rectangle, java.awt.Rectangle, int)
public int getBaseline(javax.swing.JComponent c, int width, int height)
VisuallyLayoutable
getBaseline
in interface VisuallyLayoutable
getBaseline
in class javax.swing.plaf.basic.BasicButtonUI
c
- JComponent to calculate baseline forwidth
- Width of the component to determine baseline for.height
- Height of the component to determine baseline for.
public java.awt.Rectangle getVisualBounds(javax.swing.JComponent c, int type, int width, int height)
VisuallyLayoutable
getVisualBounds
in interface VisuallyLayoutable
c
- JComponent to calculate visual margin fortype
- The type of the visual margin.width
- Width of the componentheight
- Height of the component
|
Copyright 2003-2007 (c) Werner Randelshofer. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |