|
Quaqua 5.4.1 2009-07-14 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.ComboBoxUI
javax.swing.plaf.basic.BasicComboBoxUI
ch.randelshofer.quaqua.QuaquaComboBoxUI
public class QuaquaComboBoxUI
Quaqua UI for JComboBox.
Nested Class Summary | |
---|---|
class |
QuaquaComboBoxUI.GlowFocusHandler
This listener hides the popup when the focus is lost. |
class |
QuaquaComboBoxUI.QuaquaComboBoxLayoutManager
This inner class is marked "public" due to a compiler bug. |
class |
QuaquaComboBoxUI.QuaquaPropertyChangeListener
This inner class is marked "public" due to a compiler bug. |
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicComboBoxUI |
---|
javax.swing.plaf.basic.BasicComboBoxUI.ComboBoxLayoutManager, javax.swing.plaf.basic.BasicComboBoxUI.FocusHandler, javax.swing.plaf.basic.BasicComboBoxUI.ItemHandler, javax.swing.plaf.basic.BasicComboBoxUI.KeyHandler, javax.swing.plaf.basic.BasicComboBoxUI.ListDataHandler, javax.swing.plaf.basic.BasicComboBoxUI.PropertyChangeHandler |
Field Summary | |
---|---|
static java.lang.String |
IS_TABLE_CELL_EDITOR
|
Fields inherited from class javax.swing.plaf.basic.BasicComboBoxUI |
---|
arrowButton, cachedMinimumSize, comboBox, currentValuePane, editor, focusListener, hasFocus, isMinimumSizeDirty, itemListener, keyListener, listBox, listDataListener, popup, popupKeyListener, popupMouseListener, popupMouseMotionListener, propertyChangeListener |
Fields inherited from interface ch.randelshofer.quaqua.VisuallyLayoutable |
---|
CLIP_BOUNDS, COMPONENT_BOUNDS, TEXT_BOUNDS |
Constructor Summary | |
---|---|
QuaquaComboBoxUI()
|
Method Summary | |
---|---|
protected javax.swing.JButton |
createArrowButton()
|
protected javax.swing.ComboBoxEditor |
createEditor()
|
protected java.awt.event.FocusListener |
createFocusListener()
Creates a FocusListener which will be added to the combo box. |
protected java.awt.LayoutManager |
createLayoutManager()
|
protected javax.swing.plaf.basic.ComboPopup |
createPopup()
|
java.beans.PropertyChangeListener |
createPropertyChangeListener()
|
static javax.swing.plaf.ComponentUI |
createUI(javax.swing.JComponent c)
Preferred spacing between combo boxes and other components. |
protected void |
editablePropertyChanged(java.beans.PropertyChangeEvent e)
Deprecated. As of Java 2 platform v1.4. |
protected javax.swing.Icon |
getArrowIcon()
|
protected int |
getArrowWidth()
|
int |
getBaseline(javax.swing.JComponent c,
int width,
int height)
Returns the baseline for the specified component, or -1 if the baseline can not be determined. |
java.awt.event.KeyListener |
getKeyListener()
|
protected java.awt.Insets |
getMargin()
|
java.awt.Dimension |
getMaximumSize(javax.swing.JComponent c)
|
java.awt.Dimension |
getMinimumSize(javax.swing.JComponent c)
Note: Changes in this method also require changes in method rectangelForCurrentValue. |
java.awt.Rectangle |
getVisualBounds(javax.swing.JComponent c,
int layoutType,
int width,
int height)
Returns the visual bounds for the specified component, or null if the visual bounds can not be determined. |
protected void |
installDefaults()
|
protected void |
installListeners()
Create and install the listeners for the combo box and its model. |
void |
installUI(javax.swing.JComponent c)
|
protected boolean |
isSmall()
|
void |
layoutComboBox(java.awt.Container parent,
QuaquaComboBoxUI.QuaquaComboBoxLayoutManager manager)
|
void |
paint(java.awt.Graphics g,
javax.swing.JComponent c)
|
void |
paintCurrentValue(java.awt.Graphics g,
java.awt.Rectangle bounds,
boolean hasFocus)
|
void |
paintCurrentValueBackground(java.awt.Graphics g,
java.awt.Rectangle bounds,
boolean hasFocus)
Paints the background of the currently selected item. |
protected java.awt.Rectangle |
rectangleForCurrentValue()
Returns the area that is reserved for drawing the currently selected item. |
protected java.awt.Rectangle |
rectangleForCurrentValue(int width,
int height)
Returns the area that is reserved for drawing the currently selected item. |
protected void |
removeListeners()
Deprecated. As of Java 2 platform v1.4. |
protected void |
uninstallListeners()
Remove the installed listeners from the combo box and its model. |
Methods inherited from class javax.swing.plaf.basic.BasicComboBoxUI |
---|
addEditor, configureArrowButton, configureEditor, createItemListener, createKeyListener, createListDataListener, createRenderer, getAccessibleChild, getAccessibleChildrenCount, getDefaultSize, getDisplaySize, getInsets, getPreferredSize, installComponents, installKeyboardActions, isFocusTraversable, isNavigationKey, isPopupVisible, removeEditor, selectNextPossibleValue, selectPreviousPossibleValue, setPopupVisible, toggleOpenClose, unconfigureArrowButton, unconfigureEditor, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallUI |
Methods inherited from class javax.swing.plaf.ComponentUI |
---|
contains, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String IS_TABLE_CELL_EDITOR
Constructor Detail |
---|
public QuaquaComboBoxUI()
Method Detail |
---|
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
public void installUI(javax.swing.JComponent c)
installUI
in class javax.swing.plaf.basic.BasicComboBoxUI
protected void installDefaults()
installDefaults
in class javax.swing.plaf.basic.BasicComboBoxUI
protected void installListeners()
installListeners
in class javax.swing.plaf.basic.BasicComboBoxUI
protected void uninstallListeners()
installListeners
uninstallListeners
in class javax.swing.plaf.basic.BasicComboBoxUI
public java.awt.event.KeyListener getKeyListener()
protected javax.swing.ComboBoxEditor createEditor()
createEditor
in class javax.swing.plaf.basic.BasicComboBoxUI
protected javax.swing.plaf.basic.ComboPopup createPopup()
createPopup
in class javax.swing.plaf.basic.BasicComboBoxUI
protected javax.swing.JButton createArrowButton()
createArrowButton
in class javax.swing.plaf.basic.BasicComboBoxUI
public java.beans.PropertyChangeListener createPropertyChangeListener()
createPropertyChangeListener
in class javax.swing.plaf.basic.BasicComboBoxUI
public void paint(java.awt.Graphics g, javax.swing.JComponent c)
paint
in class javax.swing.plaf.basic.BasicComboBoxUI
public void paintCurrentValue(java.awt.Graphics g, java.awt.Rectangle bounds, boolean hasFocus)
paintCurrentValue
in class javax.swing.plaf.basic.BasicComboBoxUI
public void paintCurrentValueBackground(java.awt.Graphics g, java.awt.Rectangle bounds, boolean hasFocus)
paintCurrentValueBackground
in class javax.swing.plaf.basic.BasicComboBoxUI
protected void editablePropertyChanged(java.beans.PropertyChangeEvent e)
protected java.awt.LayoutManager createLayoutManager()
createLayoutManager
in class javax.swing.plaf.basic.BasicComboBoxUI
public void layoutComboBox(java.awt.Container parent, QuaquaComboBoxUI.QuaquaComboBoxLayoutManager manager)
protected javax.swing.Icon getArrowIcon()
protected int getArrowWidth()
protected void removeListeners()
protected boolean isSmall()
protected java.awt.Rectangle rectangleForCurrentValue()
rectangleForCurrentValue
in class javax.swing.plaf.basic.BasicComboBoxUI
protected java.awt.Rectangle rectangleForCurrentValue(int width, int height)
protected java.awt.Insets getMargin()
public java.awt.Dimension getMinimumSize(javax.swing.JComponent c)
getMinimumSize
in class javax.swing.plaf.basic.BasicComboBoxUI
public java.awt.Dimension getMaximumSize(javax.swing.JComponent c)
getMaximumSize
in class javax.swing.plaf.basic.BasicComboBoxUI
protected java.awt.event.FocusListener createFocusListener()
FocusListener
which will be added to the combo box.
If this method returns null then it will not be added to the combo box.
createFocusListener
in class javax.swing.plaf.basic.BasicComboBoxUI
FocusListener
or nullpublic int getBaseline(javax.swing.JComponent c, int width, int height)
VisuallyLayoutable
getBaseline
in interface VisuallyLayoutable
c
- JComponent to calculate baseline forwidth
- Width of the component to determine baseline for.height
- Height of the component to determine baseline for.
public java.awt.Rectangle getVisualBounds(javax.swing.JComponent c, int layoutType, int width, int height)
VisuallyLayoutable
getVisualBounds
in interface VisuallyLayoutable
c
- JComponent to calculate visual margin forlayoutType
- The type of the visual margin.width
- Width of the componentheight
- Height of the component
|
Copyright 2003-2007 (c) Werner Randelshofer. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |