JIDE Common Layer 2.7.1

com.jidesoft.plaf.basic
Class BasicJideButtonUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.ButtonUI
          extended by com.jidesoft.plaf.JideButtonUI
              extended by com.jidesoft.plaf.basic.BasicJideButtonUI
Direct Known Subclasses:
XertoJideButtonUI

public class BasicJideButtonUI
extends JideButtonUI

JideButtonUI implementation


Field Summary
protected  java.awt.Color _darkShadowColor
           
protected  java.awt.Color _focusColor
           
protected  java.awt.Color _highlight
           
protected  boolean _isFloatingIcon
           
protected  java.awt.Color _lightHighlightColor
           
protected  ThemePainter _painter
           
protected  java.awt.Color _shadowColor
           
protected  int defaultTextIconGap
           
protected  int defaultTextShiftOffset
           
protected static java.awt.Rectangle iconRect
           
protected static java.awt.Rectangle textRect
           
protected static java.awt.Rectangle viewRect
           
 
Constructor Summary
BasicJideButtonUI()
           
 
Method Summary
protected  void clearTextShiftOffset()
           
protected  javax.swing.plaf.basic.BasicButtonListener createButtonListener(javax.swing.AbstractButton b)
           
static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
           
 int getDefaultTextIconGap(javax.swing.AbstractButton b)
           
protected  java.awt.Color getFocusColor()
           
protected  java.awt.Color getForegroundOfState(javax.swing.AbstractButton b)
           
protected  javax.swing.Icon getIcon(javax.swing.AbstractButton b)
           
 java.awt.Dimension getMaximumSize(javax.swing.JComponent c)
           
 java.awt.Dimension getMinimumSize(javax.swing.JComponent c)
           
 ThemePainter getPainter()
           
 java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
           
protected  java.lang.String getPropertyPrefix()
           
protected  int getTextShiftOffset()
           
protected  void installDefaults(javax.swing.AbstractButton b)
           
protected  void installKeyboardActions(javax.swing.AbstractButton b)
           
protected  void installListeners(javax.swing.AbstractButton b)
           
 void installUI(javax.swing.JComponent c)
           
protected  boolean isFloatingIcon()
           
 void paint(java.awt.Graphics g, javax.swing.JComponent c)
           
protected  void paintBackground(java.awt.Graphics g, javax.swing.AbstractButton b)
           
protected  void paintIcon(javax.swing.AbstractButton b, java.awt.Graphics g)
           
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 overridden.
protected  void setTextShiftOffset()
           
static boolean shouldWrapText(java.awt.Component c)
          Checks if we should wrap text on a button.
protected  void uninstallDefaults(javax.swing.AbstractButton b)
           
protected  void uninstallKeyboardActions(javax.swing.AbstractButton b)
           
protected  void uninstallListeners(javax.swing.AbstractButton b)
           
 void uninstallUI(javax.swing.JComponent c)
           
protected  void updateMargin(javax.swing.AbstractButton b)
           
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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
Constructor Detail

BasicJideButtonUI

public BasicJideButtonUI()
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:
installUI in class javax.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:
uninstallUI in class javax.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:
paint in class javax.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.


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 context
b - Current button to render
textRect - 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:
getMinimumSize in class javax.swing.plaf.ComponentUI

getPreferredSize

public java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
Overrides:
getPreferredSize in class javax.swing.plaf.ComponentUI

getMaximumSize

public java.awt.Dimension getMaximumSize(javax.swing.JComponent c)
Overrides:
getMaximumSize in class javax.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 -
Returns:
true or false.

JIDE Common Layer 2.7.1