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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classCell padding border used in popup list and for current value if not editable.private classDelegates actions from editor text field to combobox.protected classprotected classprivate classKey selection manager that delegates to the default manager.private static classUse for style "mac" to mark checked item.Nested classes/interfaces inherited from class BasicComboBoxUI
BasicComboBoxUI.ComboBoxLayoutManager, BasicComboBoxUI.FocusHandler, BasicComboBoxUI.ItemHandler, BasicComboBoxUI.KeyHandler, BasicComboBoxUI.ListDataHandler, BasicComboBoxUI.PropertyChangeHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprivate Colorprivate AtomicBooleanprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected floatprotected Stringprotected Colorprotected Colorprotected Colorprotected intprotected Colorprotected booleanprivate MouseListenerprotected intprivate FlatComboBoxUI.CellPaddingBorderprotected 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 voidvoidprivate voidprivate booleanprivate booleanprivate booleanstatic booleanisPermanentFocusOwner(JComboBox<?> comboBox) voidpaintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus) voidpaintCurrentValueBackground(Graphics g, Rectangle bounds, boolean hasFocus) protected voidprotected voidvoidupdate(Graphics g, JComponent c) private voidprivate voidMethods 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
-
background
-
editableBackground
-
focusedBackground
-
disabledBackground
-
disabledForeground
-
buttonBackground
-
buttonEditableBackground
-
buttonFocusedBackground
-
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
-
hoverListener
-
hover
protected boolean hover -
pressed
protected boolean pressed -
paddingBorder
-
oldStyleValues
-
-
Constructor Details
-
FlatComboBoxUI
public FlatComboBoxUI()
-
-
Method Details
-
createUI
-
installUI
- Overrides:
installUIin classBasicComboBoxUI
-
installUIImpl
-
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
-
updateEditorPadding
private void updateEditorPadding() -
updateEditorColors
private void updateEditorColors() -
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
-
isCellRenderer
private boolean isCellRenderer() -
isCellRendererBackgroundChanged
private boolean isCellRendererBackgroundChanged() -
isMacStyle
private boolean isMacStyle() -
isPermanentFocusOwner
- Since:
- 1.3
-