org.jvnet.flamingo.common.ui
Class BasicCommandButtonUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.ButtonUI
          extended by org.jvnet.flamingo.common.ui.CommandButtonUI
              extended by org.jvnet.flamingo.common.ui.BasicCommandButtonUI
Direct Known Subclasses:
BasicCommandMenuButtonUI, BasicCommandToggleButtonUI, BasicRibbonApplicationMenuButtonUI

public class BasicCommandButtonUI
extends CommandButtonUI

Basic UI for command button JCommandButton.

Author:
Kirill Grouchnikov

Field Summary
static java.lang.String DONT_DISPOSE_POPUPS
          Client property to mark the command button to not dispose the popups on activation.
static java.lang.String EMULATE_SQUARE_BUTTON
          Client property to mark the command button to have square corners.
 
Constructor Summary
BasicCommandButtonUI()
          Creates a new UI delegate.
 
Method Summary
static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
           
 java.awt.Rectangle getActionClickArea()
          Returns the click area associated with the default button action.
 java.awt.Point getKeyTipAnchorCenterPoint()
           
 java.awt.Rectangle getPopupClickArea()
          Returns the click area associated with the popup button action.
 java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
           
 void installUI(javax.swing.JComponent c)
           
 void paint(java.awt.Graphics g, javax.swing.JComponent c)
           
 void uninstallUI(javax.swing.JComponent c)
           
 void update(java.awt.Graphics g, javax.swing.JComponent c)
           
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMULATE_SQUARE_BUTTON

public static final java.lang.String EMULATE_SQUARE_BUTTON
Client property to mark the command button to have square corners. This client property is for internal use only.

See Also:
Constant Field Values

DONT_DISPOSE_POPUPS

public static final java.lang.String DONT_DISPOSE_POPUPS
Client property to mark the command button to not dispose the popups on activation.

See Also:
disposePopupsActionListener, Constant Field Values
Constructor Detail

BasicCommandButtonUI

public BasicCommandButtonUI()
Creates a new UI delegate.

Method Detail

createUI

public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)

installUI

public void installUI(javax.swing.JComponent c)
Overrides:
installUI in class javax.swing.plaf.ComponentUI

uninstallUI

public void uninstallUI(javax.swing.JComponent c)
Overrides:
uninstallUI in class javax.swing.plaf.ComponentUI

update

public void update(java.awt.Graphics g,
                   javax.swing.JComponent c)
Overrides:
update in class javax.swing.plaf.ComponentUI

paint

public void paint(java.awt.Graphics g,
                  javax.swing.JComponent c)
Overrides:
paint in class javax.swing.plaf.ComponentUI

getPreferredSize

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

getActionClickArea

public java.awt.Rectangle getActionClickArea()
Description copied from class: CommandButtonUI
Returns the click area associated with the default button action.

Specified by:
getActionClickArea in class CommandButtonUI
Returns:
Click area associated with the default button action.

getPopupClickArea

public java.awt.Rectangle getPopupClickArea()
Description copied from class: CommandButtonUI
Returns the click area associated with the popup button action.

Specified by:
getPopupClickArea in class CommandButtonUI
Returns:
Click area associated with the popup button action.

getKeyTipAnchorCenterPoint

public java.awt.Point getKeyTipAnchorCenterPoint()
Specified by:
getKeyTipAnchorCenterPoint in class CommandButtonUI