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
-
public class FlatComboBoxUI extends BasicComboBoxUI
Provides the Flat LaF UI delegate forJComboBox.- UiDefault:
- ComboBox.font Font, ComboBox.background Color, ComboBox.foreground Color, ComboBox.border Border, ComboBox.padding Insets, ComboBox.squareButton boolean default is true , ComboBox.minimumWidth int, ComboBox.editorColumns int, ComboBox.maximumRowCount int, ComboBox.buttonStyle String auto (default), button or none, Component.arrowType String chevron (default) or triangle, Component.isIntelliJTheme boolean, Component.borderColor Color, Component.disabledBorderColor Color, ComboBox.editableBackground Color optional; defaults to ComboBox.background, ComboBox.focusedBackground Color optional, ComboBox.disabledBackground Color, ComboBox.disabledForeground Color, ComboBox.buttonBackground Color, ComboBox.buttonEditableBackground Color, ComboBox.buttonFocusedBackground Color optional; defaults to ComboBox.focusedBackground, ComboBox.buttonArrowColor Color, ComboBox.buttonDisabledArrowColor Color, ComboBox.buttonHoverArrowColor Color, ComboBox.buttonPressedArrowColor Color, ComboBox.popupBackground Color optional
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classFlatComboBoxUI.FlatComboBoxButtonprotected classFlatComboBoxUI.FlatComboPopup-
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
Fields Modifier and Type Field Description protected StringarrowTypeprotected ColorborderColorprotected ColorbuttonArrowColorprotected ColorbuttonBackgroundprotected ColorbuttonDisabledArrowColorprotected ColorbuttonEditableBackgroundprotected ColorbuttonFocusedBackgroundprotected ColorbuttonHoverArrowColorprotected ColorbuttonPressedArrowColorprotected StringbuttonStyleprotected ColordisabledBackgroundprotected ColordisabledBorderColorprotected ColordisabledForegroundprotected ColoreditableBackgroundprotected inteditorColumnsprotected ColorfocusedBackgroundprotected booleanhoverprotected booleanisIntelliJThemeprotected intminimumWidthprotected ColorpopupBackgroundprotected booleanpressed-
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 Constructor Description FlatComboBoxUI()
-
Method Summary
-
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, installUI, 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 Detail
-
minimumWidth
protected int minimumWidth
-
editorColumns
protected int editorColumns
-
buttonStyle
protected String buttonStyle
-
arrowType
protected String arrowType
-
isIntelliJTheme
protected boolean isIntelliJTheme
-
borderColor
protected Color borderColor
-
disabledBorderColor
protected Color disabledBorderColor
-
editableBackground
protected Color editableBackground
-
focusedBackground
protected Color focusedBackground
-
disabledBackground
protected Color disabledBackground
-
disabledForeground
protected Color disabledForeground
-
buttonBackground
protected Color buttonBackground
-
buttonEditableBackground
protected Color buttonEditableBackground
-
buttonFocusedBackground
protected Color buttonFocusedBackground
-
buttonArrowColor
protected Color buttonArrowColor
-
buttonDisabledArrowColor
protected Color buttonDisabledArrowColor
-
buttonHoverArrowColor
protected Color buttonHoverArrowColor
-
buttonPressedArrowColor
protected Color buttonPressedArrowColor
-
popupBackground
protected Color popupBackground
-
hover
protected boolean hover
-
pressed
protected boolean pressed
-
-
Method Detail
-
createUI
public static ComponentUI createUI(JComponent c)
-
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
protected LayoutManager createLayoutManager()
- Overrides:
createLayoutManagerin classBasicComboBoxUI
-
createFocusListener
protected FocusListener createFocusListener()
- Overrides:
createFocusListenerin classBasicComboBoxUI
-
createPropertyChangeListener
protected PropertyChangeListener createPropertyChangeListener()
- Overrides:
createPropertyChangeListenerin classBasicComboBoxUI
-
createPopup
protected ComboPopup createPopup()
- Overrides:
createPopupin classBasicComboBoxUI
-
configureEditor
protected void configureEditor()
- Overrides:
configureEditorin classBasicComboBoxUI
-
createArrowButton
protected JButton createArrowButton()
- Overrides:
createArrowButtonin classBasicComboBoxUI
-
update
public void update(Graphics g, JComponent c)
- Overrides:
updatein classComponentUI
-
paintCurrentValue
public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus)
- Overrides:
paintCurrentValuein classBasicComboBoxUI
-
paintCurrentValueBackground
public void paintCurrentValueBackground(Graphics g, Rectangle bounds, boolean hasFocus)
- Overrides:
paintCurrentValueBackgroundin classBasicComboBoxUI
-
getBackground
protected Color getBackground(boolean enabled)
-
getForeground
protected Color getForeground(boolean enabled)
-
getMinimumSize
public Dimension getMinimumSize(JComponent c)
- Overrides:
getMinimumSizein classBasicComboBoxUI
-
getDefaultSize
protected Dimension getDefaultSize()
- Overrides:
getDefaultSizein classBasicComboBoxUI
-
getDisplaySize
protected Dimension getDisplaySize()
- Overrides:
getDisplaySizein classBasicComboBoxUI
-
getSizeForComponent
protected Dimension getSizeForComponent(Component comp)
- Overrides:
getSizeForComponentin classBasicComboBoxUI
-
isPermanentFocusOwner
public static boolean isPermanentFocusOwner(JComboBox<?> comboBox)
- Since:
- 1.3
-
-