JIDE 3.5.15

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  Color _darkShadowColor
           
protected  Color _focusColor
           
protected  Color _highlight
           
protected  boolean _isFloatingIcon
           
protected  Color _lightHighlightColor
           
protected  ThemePainter _painter
           
protected  Color _shadowColor
           
protected  int defaultTextIconGap
           
protected  int defaultTextShiftOffset
           
protected static Rectangle iconRect
           
protected static Rectangle textRect
           
protected static Rectangle viewRect
           
 
Constructor Summary
BasicJideButtonUI()
           
 
Method Summary
protected  void clearTextShiftOffset()
           
protected  BasicButtonListener createButtonListener(AbstractButton b)
           
static ComponentUI createUI(JComponent c)
           
 int getDefaultTextIconGap(AbstractButton b)
           
protected  Color getFocusColor()
           
protected  Color getForegroundOfState(AbstractButton b)
           
protected  Icon getIcon(AbstractButton b)
           
 Dimension getMaximumSize(JComponent c)
           
 Dimension getMinimumSize(JComponent c)
           
 ThemePainter getPainter()
           
 Dimension getPreferredSize(JComponent c)
           
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)
           
protected  boolean isFloatingIcon()
           
 void paint(Graphics g, JComponent c)
           
protected  void paintBackground(Graphics g, AbstractButton b)
           
protected  void paintIcon(AbstractButton b, Graphics g)
           
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 overridden.
protected  void setTextShiftOffset()
           
static boolean shouldWrapText(Component c)
          Checks if we should wrap text on a button.
protected  void uninstallDefaults(AbstractButton b)
           
protected  void uninstallKeyboardActions(AbstractButton b)
           
protected  void uninstallListeners(AbstractButton b)
           
 void uninstallUI(JComponent c)
           
protected  void updateMargin(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 Color _shadowColor

_darkShadowColor

protected Color _darkShadowColor

_highlight

protected Color _highlight

_lightHighlightColor

protected Color _lightHighlightColor

_focusColor

protected Color _focusColor

_isFloatingIcon

protected boolean _isFloatingIcon

viewRect

protected static Rectangle viewRect

textRect

protected static Rectangle textRect

iconRect

protected static Rectangle iconRect
Constructor Detail

BasicJideButtonUI

public BasicJideButtonUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent c)

getPropertyPrefix

protected String getPropertyPrefix()

installUI

public void installUI(JComponent c)
Overrides:
installUI in class ComponentUI

installDefaults

protected void installDefaults(AbstractButton b)

installListeners

protected void installListeners(AbstractButton b)

installKeyboardActions

protected void installKeyboardActions(AbstractButton b)

uninstallUI

public void uninstallUI(JComponent c)
Overrides:
uninstallUI in class ComponentUI

uninstallKeyboardActions

protected void uninstallKeyboardActions(AbstractButton b)

uninstallListeners

protected void uninstallListeners(AbstractButton b)

uninstallDefaults

protected void uninstallDefaults(AbstractButton b)

createButtonListener

protected BasicButtonListener createButtonListener(AbstractButton b)

getDefaultTextIconGap

public int getDefaultTextIconGap(AbstractButton b)

getFocusColor

protected Color getFocusColor()

paint

public void paint(Graphics g,
                  JComponent c)
Overrides:
paint in class ComponentUI

paintIcon

protected void paintIcon(AbstractButton b,
                         Graphics g)

getIcon

protected Icon getIcon(AbstractButton b)

isFloatingIcon

protected boolean isFloatingIcon()

paintText

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 overridden. Use the paintText method which takes the AbstractButton argument.

Parameters:
g - the Graphics instance
c - the component
textRect - the rectangle of the text
text - the text to paint

getForegroundOfState

protected Color getForegroundOfState(AbstractButton b)

paintText

protected void paintText(Graphics g,
                         AbstractButton b,
                         Rectangle textRect,
                         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(Graphics g,
                               AbstractButton b)

clearTextShiftOffset

protected void clearTextShiftOffset()

setTextShiftOffset

protected void setTextShiftOffset()

getTextShiftOffset

protected int getTextShiftOffset()

getMinimumSize

public Dimension getMinimumSize(JComponent c)
Overrides:
getMinimumSize in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent c)
Overrides:
getPreferredSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent c)
Overrides:
getMaximumSize in class ComponentUI

getPainter

public ThemePainter getPainter()

updateMargin

protected void updateMargin(AbstractButton b)

shouldWrapText

public static boolean shouldWrapText(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.

JIDE 3.5.15