Package com.formdev.flatlaf.ui
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 class
Cell padding border used in popup list and for current value if not editable.private class
Delegates actions from editor text field to combobox.protected class
protected class
private class
Key selection manager that delegates to the default manager.private static class
Use for style "mac" to mark checked item.Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicComboBoxUI
BasicComboBoxUI.ComboBoxLayoutManager, BasicComboBoxUI.FocusHandler, BasicComboBoxUI.ItemHandler, BasicComboBoxUI.KeyHandler, BasicComboBoxUI.ListDataHandler, BasicComboBoxUI.PropertyChangeHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
private Color
private AtomicBoolean
protected Color
protected Color
protected Color
protected Color
protected Color
protected Color
protected Color
protected Color
protected Color
protected float
protected String
protected Color
protected Color
protected Color
protected int
protected Color
protected boolean
private MouseListener
protected int
private FlatComboBoxUI.CellPaddingBorder
protected Color
protected Insets
protected boolean
protected int
protected Insets
Fields inherited from class javax.swing.plaf.basic.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 void
applyStyle
(Object style) protected Object
applyStyleProperty
(String key, Object value) protected void
protected JButton
protected FocusListener
protected LayoutManager
protected ComboPopup
protected PropertyChangeListener
static ComponentUI
protected Color
getBackground
(boolean enabled) protected Dimension
protected Dimension
protected Color
getForeground
(boolean enabled) protected Dimension
getSizeForComponent
(Component comp) getStyleableValue
(JComponent c, String key) protected void
protected void
protected void
void
private void
private boolean
private boolean
private boolean
static boolean
isPermanentFocusOwner
(JComboBox<?> comboBox) void
paintCurrentValue
(Graphics g, Rectangle bounds, boolean hasFocus) void
paintCurrentValueBackground
(Graphics g, Rectangle bounds, boolean hasFocus) protected void
protected void
void
update
(Graphics g, JComponent c) private void
private void
Methods inherited from class javax.swing.plaf.basic.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, uninstallUI
Methods inherited from class javax.swing.plaf.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:
installUI
in classBasicComboBoxUI
-
installUIImpl
-
installListeners
protected void installListeners()- Overrides:
installListeners
in classBasicComboBoxUI
-
uninstallListeners
protected void uninstallListeners()- Overrides:
uninstallListeners
in classBasicComboBoxUI
-
installDefaults
protected void installDefaults()- Overrides:
installDefaults
in classBasicComboBoxUI
-
uninstallDefaults
protected void uninstallDefaults()- Overrides:
uninstallDefaults
in classBasicComboBoxUI
-
createLayoutManager
- Overrides:
createLayoutManager
in classBasicComboBoxUI
-
createFocusListener
- Overrides:
createFocusListener
in classBasicComboBoxUI
-
createPropertyChangeListener
- Overrides:
createPropertyChangeListener
in classBasicComboBoxUI
-
createPopup
- Overrides:
createPopup
in classBasicComboBoxUI
-
configureEditor
protected void configureEditor()- Overrides:
configureEditor
in classBasicComboBoxUI
-
updateEditorPadding
private void updateEditorPadding() -
updateEditorColors
private void updateEditorColors() -
createArrowButton
- Overrides:
createArrowButton
in classBasicComboBoxUI
-
installStyle
protected void installStyle()- Since:
- 2
-
applyStyle
- Since:
- 2
-
applyStyleProperty
- Since:
- 2
-
getStyleableInfos
- Specified by:
getStyleableInfos
in interfaceFlatStylingSupport.StyleableUI
- Since:
- 2
-
getStyleableValue
- Specified by:
getStyleableValue
in interfaceFlatStylingSupport.StyleableUI
- Since:
- 2.5
-
getLookupForStyling
- Specified by:
getLookupForStyling
in interfaceFlatStylingSupport.StyleableLookupProvider
- Since:
- 2.5
-
update
- Overrides:
update
in classComponentUI
-
paintCurrentValue
- Overrides:
paintCurrentValue
in classBasicComboBoxUI
-
paintCurrentValueBackground
- Overrides:
paintCurrentValueBackground
in classBasicComboBoxUI
-
getBackground
-
getForeground
-
getMinimumSize
- Overrides:
getMinimumSize
in classBasicComboBoxUI
-
getDefaultSize
- Overrides:
getDefaultSize
in classBasicComboBoxUI
-
getDisplaySize
- Overrides:
getDisplaySize
in classBasicComboBoxUI
-
getSizeForComponent
- Overrides:
getSizeForComponent
in classBasicComboBoxUI
-
isCellRenderer
private boolean isCellRenderer() -
isCellRendererBackgroundChanged
private boolean isCellRendererBackgroundChanged() -
isMacStyle
private boolean isMacStyle() -
isPermanentFocusOwner
- Since:
- 1.3
-