com.metamatrix.toolbox.ui.widget.laf
Class ButtonLookAndFeel

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.ButtonUI
          extended by javax.swing.plaf.basic.BasicButtonUI
              extended by javax.swing.plaf.metal.MetalButtonUI
                  extended by com.metamatrix.toolbox.ui.widget.laf.ButtonLookAndFeel
Direct Known Subclasses:
TableHeaderButtonLookAndFeel

public class ButtonLookAndFeel
extends javax.swing.plaf.metal.MetalButtonUI

Sub-classes MetalButtonUI to provide multiple-line text.

Since:
2.0
Version:
2.0
Author:
John P. A. Verhaeg

Field Summary
 
Fields inherited from class javax.swing.plaf.metal.MetalButtonUI
disabledTextColor, focusColor, selectColor
 
Fields inherited from class javax.swing.plaf.basic.BasicButtonUI
defaultTextIconGap, defaultTextShiftOffset
 
Constructor Summary
ButtonLookAndFeel()
           
 
Method Summary
static boolean areDefaultsInstalled()
           
static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent component)
           
 java.awt.Dimension getPreferredSize(javax.swing.JComponent component)
           
 void installDefaults(javax.swing.AbstractButton button)
           
 void paint(java.awt.Graphics graphic, javax.swing.JComponent component)
           
protected  void paintButtonPressed(java.awt.Graphics graphic, javax.swing.AbstractButton button)
           
protected  void paintText(java.awt.Graphics graphic, javax.swing.JComponent component, java.awt.Rectangle TEXT_BOUNDS, java.lang.String text)
           
 void setIconTextGap(int iconTextGap)
           
 void setPressedShift(int pressedShift)
           
 
Methods inherited from class javax.swing.plaf.metal.MetalButtonUI
createButtonListener, getDisabledTextColor, getFocusColor, getSelectColor, paintFocus, uninstallDefaults, update
 
Methods inherited from class javax.swing.plaf.basic.BasicButtonUI
clearTextShiftOffset, getBaseline, getBaselineResizeBehavior, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getPropertyPrefix, getTextShiftOffset, installKeyboardActions, installListeners, installUI, paintIcon, paintText, setTextShiftOffset, uninstallKeyboardActions, uninstallListeners, uninstallUI
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ButtonLookAndFeel

public ButtonLookAndFeel()
Method Detail

areDefaultsInstalled

public static boolean areDefaultsInstalled()
Since:
2.0

createUI

public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent component)
Since:
2.0

getPreferredSize

public java.awt.Dimension getPreferredSize(javax.swing.JComponent component)
Overrides:
getPreferredSize in class javax.swing.plaf.basic.BasicButtonUI
Since:
2.0

installDefaults

public void installDefaults(javax.swing.AbstractButton button)
Overrides:
installDefaults in class javax.swing.plaf.metal.MetalButtonUI
Since:
2.0

paint

public void paint(java.awt.Graphics graphic,
                  javax.swing.JComponent component)
Overrides:
paint in class javax.swing.plaf.basic.BasicButtonUI
Since:
2.0

paintButtonPressed

protected void paintButtonPressed(java.awt.Graphics graphic,
                                  javax.swing.AbstractButton button)
Overrides:
paintButtonPressed in class javax.swing.plaf.metal.MetalButtonUI
Since:
2.0

paintText

protected void paintText(java.awt.Graphics graphic,
                         javax.swing.JComponent component,
                         java.awt.Rectangle TEXT_BOUNDS,
                         java.lang.String text)
Overrides:
paintText in class javax.swing.plaf.metal.MetalButtonUI
Since:
2.0

setIconTextGap

public void setIconTextGap(int iconTextGap)
Since:
2.0

setPressedShift

public void setPressedShift(int pressedShift)
Since:
2.0


Copyright © 2009. All Rights Reserved.