Package org.flexdock.plaf.theme
Class ButtonUI
- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.ButtonUI
-
- javax.swing.plaf.basic.BasicButtonUI
-
- org.flexdock.plaf.theme.ButtonUI
-
- All Implemented Interfaces:
IFlexViewComponentUI,XMLConstants
public class ButtonUI extends javax.swing.plaf.basic.BasicButtonUI implements IFlexViewComponentUI
- Author:
- Christopher Butler
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classButtonUI.ButtonListener
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBORDERstatic java.lang.StringBORDER_ACTIVEstatic java.lang.StringBORDER_ACTIVE_HOVERstatic java.lang.StringBORDER_HOVERstatic java.lang.StringBORDER_PRESSEDprotected javax.swing.border.BorderborderActiveprotected javax.swing.border.BorderborderActiveHoverprotected javax.swing.border.BorderborderDefaultprotected javax.swing.border.BorderborderDefaultHoverprotected javax.swing.border.BorderborderPressedprotected PropertySetcreationParameters-
Fields inherited from class javax.swing.plaf.basic.BasicButtonUI
defaultTextIconGap, defaultTextShiftOffset
-
Fields inherited from interface org.flexdock.plaf.IFlexViewComponentUI
ICON_RESOURCE
-
Fields inherited from interface org.flexdock.plaf.XMLConstants
ATTRIBUTE_KEY, CLASSNAME_KEY, CONSTRUCTOR_KEY, DESC_KEY, EXTENDS_KEY, HANDLER_KEY, INHERITS_KEY, NAME_KEY, OVERRIDDEN_KEY, PROP_HANDLER_KEY, PROPERTY_KEY, REFERENCE_KEY, VALUE_KEY
-
-
Constructor Summary
Constructors Constructor Description ButtonUI()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.swing.plaf.basic.BasicButtonListenercreateButtonListener(javax.swing.AbstractButton b)protected javax.swing.IcongetActionIcon(javax.swing.AbstractButton button, boolean pressed, boolean active, boolean hover)protected javax.swing.border.BordergetBorder(javax.swing.AbstractButton button)PropertySetgetCreationParameters()protected javax.swing.border.BordergetDefaultBorder(javax.swing.AbstractButton button, boolean active)protected javax.swing.IcongetDefaultIcon(javax.swing.AbstractButton button, boolean active)protected javax.swing.IcongetDisabledIcon(javax.swing.AbstractButton button, boolean active)protected javax.swing.border.BordergetHoverBorder(javax.swing.AbstractButton button, boolean active)protected javax.swing.IcongetHoverIcon(javax.swing.AbstractButton button, boolean active)protected javax.swing.IcongetIcon(javax.swing.AbstractButton button)protected javax.swing.border.BordergetPressedBorder(javax.swing.AbstractButton button)protected javax.swing.IcongetPressedIcon(javax.swing.AbstractButton button)voidinitializeCreationParameters()protected voidinstallKeyboardActions(javax.swing.AbstractButton b)voidinstallUI(javax.swing.JComponent c)protected booleanisParentActive(javax.swing.AbstractButton button)protected booleanisPressed(javax.swing.AbstractButton button)voidpaint(java.awt.Graphics g, javax.swing.JComponent c)protected voidpaintBackground(java.awt.Graphics g, javax.swing.AbstractButton b, boolean active, boolean hover, boolean pressed)protected voidpaintBorder(java.awt.Graphics g, javax.swing.AbstractButton b)protected voidpaintIcon(java.awt.Graphics g, javax.swing.AbstractButton b)voidsetBorderActive(javax.swing.border.Border borderActive)voidsetBorderActiveHover(javax.swing.border.Border borderActiveHover)voidsetBorderDefault(javax.swing.border.Border borderDefault)voidsetBorderDefaultHover(javax.swing.border.Border borderDefaultHover)voidsetBorderPressed(javax.swing.border.Border borderPressed)voidsetCreationParameters(PropertySet creationParameters)voiduninstallUI(javax.swing.JComponent c)-
Methods inherited from class javax.swing.plaf.basic.BasicButtonUI
clearTextShiftOffset, createUI, getBaseline, getBaselineResizeBehavior, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getPreferredSize, getPropertyPrefix, getTextShiftOffset, installDefaults, installListeners, paintButtonPressed, paintFocus, paintIcon, paintText, paintText, setTextShiftOffset, uninstallDefaults, uninstallKeyboardActions, uninstallListeners
-
-
-
-
Field Detail
-
BORDER
public static final java.lang.String BORDER
- See Also:
- Constant Field Values
-
BORDER_HOVER
public static final java.lang.String BORDER_HOVER
- See Also:
- Constant Field Values
-
BORDER_ACTIVE
public static final java.lang.String BORDER_ACTIVE
- See Also:
- Constant Field Values
-
BORDER_ACTIVE_HOVER
public static final java.lang.String BORDER_ACTIVE_HOVER
- See Also:
- Constant Field Values
-
BORDER_PRESSED
public static final java.lang.String BORDER_PRESSED
- See Also:
- Constant Field Values
-
creationParameters
protected PropertySet creationParameters
-
borderDefault
protected javax.swing.border.Border borderDefault
-
borderDefaultHover
protected javax.swing.border.Border borderDefaultHover
-
borderActive
protected javax.swing.border.Border borderActive
-
borderActiveHover
protected javax.swing.border.Border borderActiveHover
-
borderPressed
protected javax.swing.border.Border borderPressed
-
-
Method Detail
-
paint
public void paint(java.awt.Graphics g, javax.swing.JComponent c)- Overrides:
paintin classjavax.swing.plaf.basic.BasicButtonUI
-
paintBackground
protected void paintBackground(java.awt.Graphics g, javax.swing.AbstractButton b, boolean active, boolean hover, boolean pressed)
-
paintBorder
protected void paintBorder(java.awt.Graphics g, javax.swing.AbstractButton b)
-
getBorder
protected javax.swing.border.Border getBorder(javax.swing.AbstractButton button)
-
getPressedBorder
protected javax.swing.border.Border getPressedBorder(javax.swing.AbstractButton button)
-
getHoverBorder
protected javax.swing.border.Border getHoverBorder(javax.swing.AbstractButton button, boolean active)
-
getDefaultBorder
protected javax.swing.border.Border getDefaultBorder(javax.swing.AbstractButton button, boolean active)
-
paintIcon
protected void paintIcon(java.awt.Graphics g, javax.swing.AbstractButton b)
-
getIcon
protected javax.swing.Icon getIcon(javax.swing.AbstractButton button)
-
getDisabledIcon
protected javax.swing.Icon getDisabledIcon(javax.swing.AbstractButton button, boolean active)
-
getPressedIcon
protected javax.swing.Icon getPressedIcon(javax.swing.AbstractButton button)
-
getHoverIcon
protected javax.swing.Icon getHoverIcon(javax.swing.AbstractButton button, boolean active)
-
getDefaultIcon
protected javax.swing.Icon getDefaultIcon(javax.swing.AbstractButton button, boolean active)
-
getActionIcon
protected javax.swing.Icon getActionIcon(javax.swing.AbstractButton button, boolean pressed, boolean active, boolean hover)
-
isPressed
protected boolean isPressed(javax.swing.AbstractButton button)
-
isParentActive
protected boolean isParentActive(javax.swing.AbstractButton button)
-
installUI
public void installUI(javax.swing.JComponent c)
- Overrides:
installUIin classjavax.swing.plaf.basic.BasicButtonUI
-
uninstallUI
public void uninstallUI(javax.swing.JComponent c)
- Overrides:
uninstallUIin classjavax.swing.plaf.basic.BasicButtonUI
-
installKeyboardActions
protected void installKeyboardActions(javax.swing.AbstractButton b)
- Overrides:
installKeyboardActionsin classjavax.swing.plaf.basic.BasicButtonUI
-
createButtonListener
protected javax.swing.plaf.basic.BasicButtonListener createButtonListener(javax.swing.AbstractButton b)
- Overrides:
createButtonListenerin classjavax.swing.plaf.basic.BasicButtonUI
-
setBorderActive
public void setBorderActive(javax.swing.border.Border borderActive)
-
setBorderActiveHover
public void setBorderActiveHover(javax.swing.border.Border borderActiveHover)
-
setBorderDefault
public void setBorderDefault(javax.swing.border.Border borderDefault)
-
setBorderDefaultHover
public void setBorderDefaultHover(javax.swing.border.Border borderDefaultHover)
-
setBorderPressed
public void setBorderPressed(javax.swing.border.Border borderPressed)
-
getCreationParameters
public PropertySet getCreationParameters()
- Specified by:
getCreationParametersin interfaceIFlexViewComponentUI
-
setCreationParameters
public void setCreationParameters(PropertySet creationParameters)
- Specified by:
setCreationParametersin interfaceIFlexViewComponentUI
-
initializeCreationParameters
public void initializeCreationParameters()
- Specified by:
initializeCreationParametersin interfaceIFlexViewComponentUI
-
-