Package org.compiere.plaf
Class CompiereComboBoxUI
- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.ComboBoxUI
-
- javax.swing.plaf.basic.BasicComboBoxUI
-
- javax.swing.plaf.metal.MetalComboBoxUI
-
- org.compiere.plaf.CompiereComboBoxUI
-
public class CompiereComboBoxUI extends MetalComboBoxUI
Adempiere ComboBox UI. The ComboBox is opaque - with opaque arrow button and textfield background- Version:
- $Id: AdempiereComboBoxUI.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
- Author:
- Jorg Janke
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.plaf.metal.MetalComboBoxUI
MetalComboBoxUI.MetalComboBoxLayoutManager, MetalComboBoxUI.MetalComboPopup, MetalComboBoxUI.MetalPropertyChangeListener
-
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 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 CompiereComboBoxUI()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected JButton
createArrowButton()
Create opaque buttonprotected ComboPopup
createPopup()
Create Popupstatic ComponentUI
createUI(JComponent c)
Create UIJButton
getArrowButton()
void
installUI(JComponent c)
Install UI - Set ComboBox opaque.void
setIcon(Icon defaultIcon)
Set Icon of arrow button-
Methods inherited from class javax.swing.plaf.metal.MetalComboBoxUI
configureEditor, createEditor, createLayoutManager, createPropertyChangeListener, editablePropertyChanged, getBaseline, getMinimumSize, layoutComboBox, paint, paintCurrentValue, paintCurrentValueBackground, removeListeners, unconfigureEditor
-
Methods inherited from class javax.swing.plaf.basic.BasicComboBoxUI
addEditor, configureArrowButton, createFocusListener, createItemListener, createKeyListener, createListDataListener, createRenderer, getAccessibleChild, getAccessibleChildrenCount, getBaselineResizeBehavior, getDefaultSize, getDisplaySize, getInsets, getMaximumSize, getPreferredSize, getSizeForComponent, installComponents, installDefaults, installKeyboardActions, installListeners, isFocusTraversable, isNavigationKey, isPopupVisible, rectangleForCurrentValue, removeEditor, selectNextPossibleValue, selectPreviousPossibleValue, setPopupVisible, toggleOpenClose, unconfigureArrowButton, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI
-
Methods inherited from class javax.swing.plaf.ComponentUI
contains, update
-
-
-
-
Method Detail
-
createUI
public static ComponentUI createUI(JComponent c)
Create UI- Parameters:
c
-- Returns:
- new instance of AdempiereComboBoxUI
-
installUI
public void installUI(JComponent c)
Install UI - Set ComboBox opaque. Bug in Metal: arrowButton gets Mouse Events, so add the JComboBox MouseListeners to the arrowButton- Overrides:
installUI
in classBasicComboBoxUI
- Parameters:
c
- componrnt- See Also:
CComboBox.addMouseListener(MouseListener)
-
createArrowButton
protected JButton createArrowButton()
Create opaque button- Overrides:
createArrowButton
in classMetalComboBoxUI
- Returns:
- opaque button
-
getArrowButton
public JButton getArrowButton()
-
setIcon
public void setIcon(Icon defaultIcon)
Set Icon of arrow button- Parameters:
defaultIcon
-
-
createPopup
protected ComboPopup createPopup()
Create Popup- Overrides:
createPopup
in classMetalComboBoxUI
- Returns:
- AdempiereComboPopup
-
-