Package com.jidesoft.plaf.basic
Class BasicJideButtonUI
- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.ButtonUI
-
- com.jidesoft.plaf.JideButtonUI
-
- com.jidesoft.plaf.basic.BasicJideButtonUI
-
public class BasicJideButtonUI extends JideButtonUI
JideButtonUI implementation
-
-
Field Summary
Fields Modifier and Type Field Description protected java.awt.Color_darkShadowColorprotected java.awt.Color_focusColorprotected java.awt.Color_highlightprotected boolean_isFloatingIconprotected java.awt.Color_lightHighlightColorprotected ThemePainter_painterprotected java.awt.Color_shadowColorprotected intdefaultTextIconGapprotected intdefaultTextShiftOffsetprotected static java.awt.RectangleiconRectprotected static java.awt.RectangletextRectprotected static java.awt.RectangleviewRect
-
Constructor Summary
Constructors Constructor Description BasicJideButtonUI()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidclearTextShiftOffset()protected javax.swing.plaf.basic.BasicButtonListenercreateButtonListener(javax.swing.AbstractButton b)static javax.swing.plaf.ComponentUIcreateUI(javax.swing.JComponent c)intgetDefaultTextIconGap(javax.swing.AbstractButton b)protected java.awt.ColorgetFocusColor()protected java.awt.ColorgetForegroundOfState(javax.swing.AbstractButton b)protected javax.swing.IcongetIcon(javax.swing.AbstractButton b)java.awt.DimensiongetMaximumSize(javax.swing.JComponent c)java.awt.DimensiongetMinimumSize(javax.swing.JComponent c)ThemePaintergetPainter()java.awt.DimensiongetPreferredSize(javax.swing.JComponent c)protected java.lang.StringgetPropertyPrefix()protected intgetTextShiftOffset()protected voidinstallDefaults(javax.swing.AbstractButton b)protected voidinstallKeyboardActions(javax.swing.AbstractButton b)protected voidinstallListeners(javax.swing.AbstractButton b)voidinstallUI(javax.swing.JComponent c)protected booleanisFloatingIcon()voidpaint(java.awt.Graphics g, javax.swing.JComponent c)protected voidpaintBackground(java.awt.Graphics g, javax.swing.AbstractButton b)protected voidpaintIcon(javax.swing.AbstractButton b, java.awt.Graphics g)protected voidpaintText(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 voidpaintText(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 overridden.protected voidsetTextShiftOffset()static booleanshouldWrapText(java.awt.Component c)Checks if we should wrap text on a button.protected voiduninstallDefaults(javax.swing.AbstractButton b)protected voiduninstallKeyboardActions(javax.swing.AbstractButton b)protected voiduninstallListeners(javax.swing.AbstractButton b)voiduninstallUI(javax.swing.JComponent c)protected voidupdateMargin(javax.swing.AbstractButton b)
-
-
-
Field Detail
-
defaultTextIconGap
protected int defaultTextIconGap
-
defaultTextShiftOffset
protected int defaultTextShiftOffset
-
_painter
protected ThemePainter _painter
-
_shadowColor
protected java.awt.Color _shadowColor
-
_darkShadowColor
protected java.awt.Color _darkShadowColor
-
_highlight
protected java.awt.Color _highlight
-
_lightHighlightColor
protected java.awt.Color _lightHighlightColor
-
_focusColor
protected java.awt.Color _focusColor
-
_isFloatingIcon
protected boolean _isFloatingIcon
-
viewRect
protected static java.awt.Rectangle viewRect
-
textRect
protected static java.awt.Rectangle textRect
-
iconRect
protected static java.awt.Rectangle iconRect
-
-
Method Detail
-
createUI
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
-
getPropertyPrefix
protected java.lang.String getPropertyPrefix()
-
installUI
public void installUI(javax.swing.JComponent c)
- Overrides:
installUIin classjavax.swing.plaf.ComponentUI
-
installDefaults
protected void installDefaults(javax.swing.AbstractButton b)
-
installListeners
protected void installListeners(javax.swing.AbstractButton b)
-
installKeyboardActions
protected void installKeyboardActions(javax.swing.AbstractButton b)
-
uninstallUI
public void uninstallUI(javax.swing.JComponent c)
- Overrides:
uninstallUIin classjavax.swing.plaf.ComponentUI
-
uninstallKeyboardActions
protected void uninstallKeyboardActions(javax.swing.AbstractButton b)
-
uninstallListeners
protected void uninstallListeners(javax.swing.AbstractButton b)
-
uninstallDefaults
protected void uninstallDefaults(javax.swing.AbstractButton b)
-
createButtonListener
protected javax.swing.plaf.basic.BasicButtonListener createButtonListener(javax.swing.AbstractButton b)
-
getDefaultTextIconGap
public int getDefaultTextIconGap(javax.swing.AbstractButton b)
-
getFocusColor
protected java.awt.Color getFocusColor()
-
paint
public void paint(java.awt.Graphics g, javax.swing.JComponent c)- Overrides:
paintin classjavax.swing.plaf.ComponentUI
-
paintIcon
protected void paintIcon(javax.swing.AbstractButton b, java.awt.Graphics g)
-
getIcon
protected javax.swing.Icon getIcon(javax.swing.AbstractButton b)
-
isFloatingIcon
protected boolean isFloatingIcon()
-
paintText
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 overridden. Use the paintText method which takes the AbstractButton argument.- Parameters:
g- the Graphics instancec- the componenttextRect- the rectangle of the texttext- the text to paint
-
getForegroundOfState
protected java.awt.Color getForegroundOfState(javax.swing.AbstractButton b)
-
paintText
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.- Parameters:
g- Graphics contextb- Current button to rendertextRect- Bounding rectangle to render the text.text- String to render- Since:
- 1.4
-
paintBackground
protected void paintBackground(java.awt.Graphics g, javax.swing.AbstractButton b)
-
clearTextShiftOffset
protected void clearTextShiftOffset()
-
setTextShiftOffset
protected void setTextShiftOffset()
-
getTextShiftOffset
protected int getTextShiftOffset()
-
getMinimumSize
public java.awt.Dimension getMinimumSize(javax.swing.JComponent c)
- Overrides:
getMinimumSizein classjavax.swing.plaf.ComponentUI
-
getPreferredSize
public java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
- Overrides:
getPreferredSizein classjavax.swing.plaf.ComponentUI
-
getMaximumSize
public java.awt.Dimension getMaximumSize(javax.swing.JComponent c)
- Overrides:
getMaximumSizein classjavax.swing.plaf.ComponentUI
-
getPainter
public ThemePainter getPainter()
-
updateMargin
protected void updateMargin(javax.swing.AbstractButton b)
-
shouldWrapText
public static boolean shouldWrapText(java.awt.Component c)
Checks if we should wrap text on a button. If the vertical text position is bottom and horizontal text position is center, we will wrap the text.- Parameters:
c- the component- Returns:
- true or false.
-
-