Class FlatComboBoxUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ComboBoxUI
javax.swing.plaf.basic.BasicComboBoxUI
com.formdev.flatlaf.ui.FlatComboBoxUI
- All Implemented Interfaces:
FlatStylingSupport.StyleableLookupProvider, FlatStylingSupport.StyleableUI
public class FlatComboBoxUI
extends BasicComboBoxUI
implements FlatStylingSupport.StyleableUI, FlatStylingSupport.StyleableLookupProvider
Provides the Flat LaF UI delegate for
JComboBox.
- UiDefault:
- ComboBox.font Font, ComboBox.background Color, ComboBox.foreground Color, ComboBox.border Border, ComboBox.padding Insets, ComboBox.squareButton boolean default is true , ComboBox.selectionBackground Color, ComboBox.selectionForeground Color , ComboBox.minimumWidth int, ComboBox.editorColumns int, ComboBox.maximumRowCount int, ComboBox.buttonStyle String auto (default), button, mac or none, Component.arrowType String chevron (default) or triangle, ComboBox.editableBackground Color optional; defaults to ComboBox.background, ComboBox.focusedBackground Color optional, ComboBox.disabledBackground Color, ComboBox.disabledForeground Color, ComboBox.buttonBackground Color optional, ComboBox.buttonEditableBackground Color optional, ComboBox.buttonFocusedBackground Color optional; defaults to ComboBox.focusedBackground, ComboBox.buttonFocusedEditableBackground Color optional; defaults to ComboBox.buttonEditableBackground, ComboBox.buttonSeparatorWidth int or float optional; defaults to Component.borderWidth, ComboBox.buttonSeparatorColor Color optional, ComboBox.buttonDisabledSeparatorColor Color optional, ComboBox.buttonArrowColor Color, ComboBox.buttonDisabledArrowColor Color, ComboBox.buttonHoverArrowColor Color, ComboBox.buttonPressedArrowColor Color, ComboBox.popupBackground Color optional, ComboBox.popupInsets Insets, ComboBox.selectionInsets Insets, ComboBox.selectionArc int
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classprotected classNested classes/interfaces inherited from class BasicComboBoxUI
BasicComboBoxUI.ComboBoxLayoutManager, BasicComboBoxUI.FocusHandler, BasicComboBoxUI.ItemHandler, BasicComboBoxUI.KeyHandler, BasicComboBoxUI.ListDataHandler, BasicComboBoxUI.PropertyChangeHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected floatprotected Stringprotected Colorprotected Colorprotected Colorprotected intprotected Colorprotected booleanprotected intprotected Colorprotected Insetsprotected booleanprotected intprotected InsetsFields inherited from class BasicComboBoxUI
arrowButton, cachedMinimumSize, comboBox, currentValuePane, editor, focusListener, hasFocus, isMinimumSizeDirty, itemListener, keyListener, listBox, listDataListener, padding, popup, popupKeyListener, popupMouseListener, popupMouseMotionListener, propertyChangeListener, squareButton -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapplyStyle(Object style) protected ObjectapplyStyleProperty(String key, Object value) protected voidprotected JButtonprotected FocusListenerprotected LayoutManagerprotected ComboPopupprotected PropertyChangeListenerstatic ComponentUIprotected ColorgetBackground(boolean enabled) protected Dimensionprotected Dimensionprotected ColorgetForeground(boolean enabled) protected DimensiongetSizeForComponent(Component comp) getStyleableValue(JComponent c, String key) protected voidprotected voidprotected voidvoidstatic booleanisPermanentFocusOwner(JComboBox<?> comboBox) voidpaintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus) voidpaintCurrentValueBackground(Graphics g, Rectangle bounds, boolean hasFocus) protected voidprotected voidvoidupdate(Graphics g, JComponent c) Methods inherited from class BasicComboBoxUI
addEditor, configureArrowButton, createEditor, createItemListener, createKeyListener, createListDataListener, createRenderer, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getInsets, getMaximumSize, getPreferredSize, installComponents, installKeyboardActions, isFocusTraversable, isNavigationKey, isPopupVisible, paint, rectangleForCurrentValue, removeEditor, selectNextPossibleValue, selectPreviousPossibleValue, setPopupVisible, toggleOpenClose, unconfigureArrowButton, unconfigureEditor, uninstallComponents, uninstallKeyboardActions, uninstallUIMethods inherited from class ComponentUI
contains
-
Field Details
-
minimumWidth
protected int minimumWidth -
editorColumns
protected int editorColumns -
buttonStyle
-
arrowType
-
editableBackground
-
focusedBackground
-
disabledBackground
-
disabledForeground
-
buttonBackground
-
buttonEditableBackground
-
buttonFocusedBackground
-
buttonFocusedEditableBackground
- Since:
- 3.7.1
-
buttonSeparatorWidth
protected float buttonSeparatorWidth- Since:
- 2
-
buttonSeparatorColor
- Since:
- 2
-
buttonDisabledSeparatorColor
- Since:
- 2
-
buttonArrowColor
-
buttonDisabledArrowColor
-
buttonHoverArrowColor
-
buttonPressedArrowColor
-
popupBackground
-
popupInsets
- Since:
- 3
-
selectionInsets
- Since:
- 3
-
selectionArc
protected int selectionArc- Since:
- 3
-
hover
protected boolean hover -
pressed
protected boolean pressed
-
-
Constructor Details
-
FlatComboBoxUI
public FlatComboBoxUI()
-
-
Method Details
-
createUI
-
installUI
- Overrides:
installUIin classBasicComboBoxUI
-
installListeners
protected void installListeners()- Overrides:
installListenersin classBasicComboBoxUI
-
uninstallListeners
protected void uninstallListeners()- Overrides:
uninstallListenersin classBasicComboBoxUI
-
installDefaults
protected void installDefaults()- Overrides:
installDefaultsin classBasicComboBoxUI
-
uninstallDefaults
protected void uninstallDefaults()- Overrides:
uninstallDefaultsin classBasicComboBoxUI
-
createLayoutManager
- Overrides:
createLayoutManagerin classBasicComboBoxUI
-
createFocusListener
- Overrides:
createFocusListenerin classBasicComboBoxUI
-
createPropertyChangeListener
- Overrides:
createPropertyChangeListenerin classBasicComboBoxUI
-
createPopup
- Overrides:
createPopupin classBasicComboBoxUI
-
configureEditor
protected void configureEditor()- Overrides:
configureEditorin classBasicComboBoxUI
-
createArrowButton
- Overrides:
createArrowButtonin classBasicComboBoxUI
-
installStyle
protected void installStyle()- Since:
- 2
-
applyStyle
- Since:
- 2
-
applyStyleProperty
-
getStyleableInfos
- Specified by:
getStyleableInfosin interfaceFlatStylingSupport.StyleableUI- Since:
- 2
-
getStyleableValue
- Specified by:
getStyleableValuein interfaceFlatStylingSupport.StyleableUI- Since:
- 2.5
-
getLookupForStyling
- Specified by:
getLookupForStylingin interfaceFlatStylingSupport.StyleableLookupProvider- Since:
- 2.5
-
update
- Overrides:
updatein classComponentUI
-
paintCurrentValue
- Overrides:
paintCurrentValuein classBasicComboBoxUI
-
paintCurrentValueBackground
- Overrides:
paintCurrentValueBackgroundin classBasicComboBoxUI
-
getBackground
-
getForeground
-
getMinimumSize
- Overrides:
getMinimumSizein classBasicComboBoxUI
-
getDefaultSize
- Overrides:
getDefaultSizein classBasicComboBoxUI
-
getDisplaySize
- Overrides:
getDisplaySizein classBasicComboBoxUI
-
getSizeForComponent
- Overrides:
getSizeForComponentin classBasicComboBoxUI
-
isPermanentFocusOwner
- Since:
- 1.3
-