scala.swing

class ComboBox

[source: scala/swing/ComboBox.scala]

class ComboBox[A](items : Seq[A])
extends Component
Let's the user make a selection from a list of predefined items. Visually, this is implemented as a button-like component with a pull-down menu.
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 so, this combo needs an editor which is supplied by the implicit argument. For default editors, see ComboBox companion object.
def prototypeDisplayValue : Option[A]
def prototypeDisplayValue_= (v : 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 pull-down menu). The underlying combo box renders all items in a ListView (both, in the pull-down 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 been configured. 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, paint, 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_=, preferredSize_=, font, font_=, locationOnScreen, location, bounds, size, size_=, size_=, locale, toolkit, cursor, cursor_=, visible, visible_=, showing, repaint
Methods inherited from Proxy
hashCode, 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 pull-down menu). The underlying combo box renders all items in a ListView (both, in the pull-down 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 been configured. 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 so, this combo needs an editor which is supplied by the implicit argument. For default editors, see ComboBox companion object.

def prototypeDisplayValue : Option[A]

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