public class PlasticComboBoxUI extends MetalComboBoxUI
ComboBoxUI.
Has the same height as text fields - unless you change the renderer.Also, this class offers to use the combo's popup prototype display value to compute the popup menu width. This is an optional feature of the JGoodies Plastic L&fs implemented via a client property key.
Options.COMBO_POPUP_PROTOTYPE_DISPLAY_VALUE_KEYMetalComboBoxUI.MetalComboBoxLayoutManager, MetalComboBoxUI.MetalComboPopup, MetalComboBoxUI.MetalPropertyChangeListenerBasicComboBoxUI.ComboBoxLayoutManager, BasicComboBoxUI.FocusHandler, BasicComboBoxUI.ItemHandler, BasicComboBoxUI.KeyHandler, BasicComboBoxUI.ListDataHandler, BasicComboBoxUI.PropertyChangeHandlerarrowButton, cachedMinimumSize, comboBox, currentValuePane, editor, focusListener, hasFocus, isMinimumSizeDirty, itemListener, keyListener, listBox, listDataListener, padding, popup, popupKeyListener, popupMouseListener, popupMouseMotionListener, squareButton| Constructor and Description |
|---|
PlasticComboBoxUI() |
| Modifier and Type | Method and Description |
|---|---|
protected JButton |
createArrowButton()
Creates and answers the arrow button that is to be used in the combo box.
|
protected ComboBoxEditor |
createEditor()
Creates the editor that is to be used in editable combo boxes.
|
protected LayoutManager |
createLayoutManager()
Creates a layout manager for managing the components which
make up the combo box.
|
protected ComboPopup |
createPopup() |
PropertyChangeListener |
createPropertyChangeListener() |
protected ListCellRenderer |
createRenderer()
Creates the default renderer that will be used in a non-editiable combo
box.
|
static ComponentUI |
createUI(JComponent b) |
Dimension |
getMinimumSize(JComponent c)
The minumum size is the size of the display area plus insets plus the button.
|
Dimension |
getPreferredSize(JComponent c)
Delegates to #getMinimumSize(Component).
|
protected void |
installListeners() |
void |
installUI(JComponent c) |
protected boolean |
isToolBarComboBox(JComponent c)
Checks and answers if this combo is in a tool bar.
|
protected Rectangle |
rectangleForCurrentValue()
Returns the area that is reserved for drawing the currently selected item.
|
protected void |
uninstallListeners() |
void |
update(Graphics g,
JComponent c) |
configureEditor, editablePropertyChanged, getBaseline, layoutComboBox, paint, paintCurrentValue, paintCurrentValueBackground, removeListeners, unconfigureEditoraddEditor, configureArrowButton, createFocusListener, createItemListener, createKeyListener, createListDataListener, getAccessibleChild, getAccessibleChildrenCount, getBaselineResizeBehavior, getDefaultSize, getDisplaySize, getInsets, getMaximumSize, getSizeForComponent, installComponents, installDefaults, installKeyboardActions, isFocusTraversable, isNavigationKey, isPopupVisible, removeEditor, selectNextPossibleValue, selectPreviousPossibleValue, setPopupVisible, toggleOpenClose, unconfigureArrowButton, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallUIcontainspublic static ComponentUI createUI(JComponent b)
public void installUI(JComponent c)
installUI in class BasicComboBoxUIprotected void installListeners()
installListeners in class BasicComboBoxUIprotected void uninstallListeners()
uninstallListeners in class BasicComboBoxUIprotected JButton createArrowButton()
Overridden to use a button that can have a pseudo 3D effect.
createArrowButton in class MetalComboBoxUIprotected ComboBoxEditor createEditor()
createEditor in class MetalComboBoxUIprotected LayoutManager createLayoutManager()
Overriden to use a layout that has a fixed width arrow button.
createLayoutManager in class MetalComboBoxUIprotected ComboPopup createPopup()
createPopup in class MetalComboBoxUIprotected ListCellRenderer createRenderer()
setRenderer.This method differs from the superclass implementation in that it uses an empty border with wider left and right margins of 2 pixels instead of 1.
createRenderer in class BasicComboBoxUIListCellRender used for the combo boxJComboBox.setRenderer(javax.swing.ListCellRenderer<? super E>)public Dimension getMinimumSize(JComponent c)
getMinimumSize in class MetalComboBoxUIpublic Dimension getPreferredSize(JComponent c)
getPreferredSize in class BasicComboBoxUIprotected Rectangle rectangleForCurrentValue()
rectangleForCurrentValue in class BasicComboBoxUIpublic void update(Graphics g, JComponent c)
update in class ComponentUIprotected boolean isToolBarComboBox(JComponent c)
c - the component to checkpublic PropertyChangeListener createPropertyChangeListener()
createPropertyChangeListener in class MetalComboBoxUICopyright © 2001-2014 JGoodies Software GmbH. All Rights Reserved.