Class BasicCommandButtonUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ButtonUI
org.pushingpixels.radiance.component.internal.ui.common.CommandButtonUI
org.pushingpixels.radiance.component.internal.ui.common.BasicCommandButtonUI
- All Implemented Interfaces:
RadianceCoreUtilities.BackgroundAppearanceStrategyAware
- Direct Known Subclasses:
BasicRibbonTaskToggleButtonUI, RadianceCommandButtonUI
Basic UI for command button
JCommandButton.- Author:
- Kirill Grouchnikov
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JCommandButtonThe associated command button.static final StringClient property to mark the command button to not dispose the popups on activation.protected Stringprotected HorizontalAlignmentprotected RadianceIconprotected booleanLayout information.protected CommandButtonLayoutManagerprotected RadianceIconThe popup indicator icon.protected String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected BasicCommandButtonListenerCreates the button listener for the specified command button.protected PopupActionListenerCreates the popup action listener for this command button.Returns the layout information for the associated button.protected voidInstalls subcomponents on the associated command button.protected voidInstalls defaults on the associated command button.protected voidInstalls the keyboard actions on the associated command button.protected voidInstalls listeners on the associated command button.voidbooleanprotected booleanReturns indication whether the button background is painted.protected booleanReturns indication whether the action-popup areas separator is painted.voidvoidsetInnerFocusOnAction(boolean innerFocusOnAction) protected voidUninstalls subcomponents from the associated command button.protected voidUninstalls defaults from the associated command button.protected voidUninstalls the keyboard actions from the associated command button.protected voidUninstalls listeners from the associated command button.voidvoidupdate(Graphics g, JComponent c) protected voidUpdates the popup indicator icon.Methods inherited from class ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, paint
-
Field Details
-
commandButton
The associated command button. -
layoutInfo
Layout information. -
isInnerFocusOnAction
protected boolean isInnerFocusOnAction -
text
-
extraText
-
icon
-
horizontalAlignment
-
backgroundAppearanceStrategy
-
DO_NOT_DISPOSE_POPUPS
Client property to mark the command button to not dispose the popups on activation.- See Also:
-
popupIcon
The popup indicator icon. -
layoutManager
-
-
Constructor Details
-
BasicCommandButtonUI
protected BasicCommandButtonUI()Creates a new UI delegate.
-
-
Method Details
-
installUI
- Overrides:
installUIin classComponentUI
-
uninstallUI
- Overrides:
uninstallUIin classComponentUI
-
installDefaults
protected void installDefaults()Installs defaults on the associated command button. -
installComponents
protected void installComponents()Installs subcomponents on the associated command button. -
installListeners
protected void installListeners()Installs listeners on the associated command button. -
createButtonListener
Creates the button listener for the specified command button.- Returns:
- The button listener for the specified command button.
-
installKeyboardActions
protected void installKeyboardActions()Installs the keyboard actions on the associated command button. -
uninstallDefaults
protected void uninstallDefaults()Uninstalls defaults from the associated command button. -
uninstallComponents
protected void uninstallComponents()Uninstalls subcomponents from the associated command button. -
uninstallListeners
protected void uninstallListeners()Uninstalls listeners from the associated command button. -
uninstallKeyboardActions
protected void uninstallKeyboardActions()Uninstalls the keyboard actions from the associated command button. -
update
- Overrides:
updatein classComponentUI
-
updatePopupIcon
protected void updatePopupIcon()Updates the popup indicator icon. -
getPreferredSize
- Overrides:
getPreferredSizein classComponentUI
-
getLayoutInfo
Description copied from class:CommandButtonUIReturns the layout information for the associated button.- Specified by:
getLayoutInfoin classCommandButtonUI- Returns:
- Layout information for the associated button.
-
getLayoutManager
- Specified by:
getLayoutManagerin classCommandButtonUI
-
isPaintingSeparators
protected boolean isPaintingSeparators()Returns indication whether the action-popup areas separator is painted.- Returns:
trueif the action-popup areas separator is painted.
-
isPaintingBackground
protected boolean isPaintingBackground()Returns indication whether the button background is painted.- Returns:
trueif the button background is painted.
-
createPopupActionListener
Creates the popup action listener for this command button.- Returns:
- Popup action listener for this command button.
-
processPopupAction
public void processPopupAction() -
getActionKeyTipAnchorCenterPoint
- Specified by:
getActionKeyTipAnchorCenterPointin classCommandButtonUI
-
getPopupKeyTipAnchorCenterPoint
- Specified by:
getPopupKeyTipAnchorCenterPointin classCommandButtonUI
-
isInnerFocusOnAction
public boolean isInnerFocusOnAction()- Specified by:
isInnerFocusOnActionin classCommandButtonUI
-
setInnerFocusOnAction
public void setInnerFocusOnAction(boolean innerFocusOnAction) - Specified by:
setInnerFocusOnActionin classCommandButtonUI
-
getBackgroundAppearanceStrategy
-