scala.swing

class ComboBox

[source: scala/swing/ComboBox.scala]

class ComboBox[A](items : scala.Seq[A])
extends Component
Has built-in default editor and renderer that cannot be exposed. They are set by the look and feel (LaF). Unfortunately, this design in inherently broken, since custom editors will almost always look differently. The border of the built-in text field editor, e.g., is drawn by the LaF. In a custom text field editor we have no way to mirror that. This combo box has to be initialized with a valid selected value. Otherwise it will fail.
See Also
javax.swing.JComboBox
Value Summary
override lazy val peer : javax.swing.JComboBox
Values and Variables inherited from Component
initP
Values and Variables inherited from Publisher
listeners
Values and Variables inherited from Reactor
reactions
Method Summary
def editable : Boolean
def makeEditable ()(implicit editor : (ComboBox[A]) => Editor[A]) : Unit
Makes this combo box editable. In order to do, this combo needs an editor which is supplied by the implicit argument. For default editors, see ComboBox companion object.
def prototypeDisplayValue : scala.Option[A]
def prototypeDisplayValue_= (v : scala.Option[A]) : Unit
def renderer : Renderer[A]
Sets the renderer for this combo box's items. Index -1 is passed to the renderer for the selected item (not in the popup menu). The underlying combo box renders all items in a ListView (both, in the pulldown menu as well as in the box itself), hence the ListView.Renderer. Note that the UI peer of a combo box usually changes the colors of the component to its own defaults _after_ the renderer has configured it. That's Swing's principle of most suprise.
def renderer_= (r : Renderer[A]) : Unit
Methods inherited from Component
xLayoutAlignment, xLayoutAlignment_=, yLayoutAlignment, yLayoutAlignment_=, border, border_=, opaque, opaque_=, enabled, enabled_=, tooltip, tooltip_=, inputVerifier, inputVerifier_=, revalidate, requestFocus, paintComponent, toString
Methods inherited from Publisher
subscribe, unsubscribe, publish
Methods inherited from Reactor
listenTo, deafTo
Methods inherited from UIElement
self, foreground, foreground_=, background, background_=, minimumSize, minimumSize_=, maximumSize, maximumSize_=, preferredSize, preferredSize_=, font, font_=, locationOnScreen, location, bounds, size, size_=, size_=, locale, toolkit, cursor, cursor_=, visible, visible_=, showing, repaint
Methods inherited from scala.Proxy
scala.Proxy.hashCode, scala.Proxy.equals
Methods inherited from AnyRef
getClass, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Object Summary
object selection extends Publisher
Value Details
override lazy val peer : javax.swing.JComboBox
Overrides
Component.peer

Method Details
def renderer : Renderer[A]
Sets the renderer for this combo box's items. Index -1 is passed to the renderer for the selected item (not in the popup menu). The underlying combo box renders all items in a ListView (both, in the pulldown menu as well as in the box itself), hence the ListView.Renderer. Note that the UI peer of a combo box usually changes the colors of the component to its own defaults _after_ the renderer has configured it. That's Swing's principle of most suprise.

def renderer_=(r : Renderer[A]) : Unit

def editable : Boolean

def makeEditable()(implicit editor : (ComboBox[A]) => Editor[A]) : Unit
Makes this combo box editable. In order to do, this combo needs an editor which is supplied by the implicit argument. For default editors, see ComboBox companion object.

def prototypeDisplayValue : scala.Option[A]

def prototypeDisplayValue_=(v : scala.Option[A]) : Unit