ComboBox

class ComboBox[A](items: Seq[A]) extends Component with Publisher

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.

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

Companion
object
class Component
trait PeerContainer
trait UIElement
trait LazyPublisher
trait Publisher
trait Reactor
trait Proxy
class Object
trait Matchable
class Any

Type members

Classlikes

object selection extends Publisher

Inherited classlikes

object keys
Inherited from
Component
object mouse

Contains publishers for various mouse events. They are separated for efficiency reasons.

Contains publishers for various mouse events. They are separated for efficiency reasons.

Inherited from
Component

Value members

Abstract methods

Implicitly added by stringEditor
Implicitly added by intEditor
Implicitly added by floatEditor
Implicitly added by doubleEditor
def item: A
Implicitly added by stringEditor
def item: A
Implicitly added by intEditor
def item: A
Implicitly added by floatEditor
def item: A
Implicitly added by doubleEditor
def item_=(a: A): Unit
Implicitly added by stringEditor
def item_=(a: A): Unit
Implicitly added by intEditor
def item_=(a: A): Unit
Implicitly added by floatEditor
def item_=(a: A): Unit
Implicitly added by doubleEditor
def startEditing(): Unit
Implicitly added by stringEditor
def startEditing(): Unit
Implicitly added by intEditor
def startEditing(): Unit
Implicitly added by floatEditor
def startEditing(): Unit
Implicitly added by doubleEditor

Concrete methods

def editable: Boolean
def makeEditable(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.

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 maximumRowCount: Int

Maximum number of rows to display without scrolling

Maximum number of rows to display without scrolling

def maximumRowCount_=(c: Int): Unit

Maximum number of rows to display without scrolling

Maximum number of rows to display without scrolling

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

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).

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

Inherited methods

Inherited from
UIElement
def background_=(c: Color): Unit
Inherited from
UIElement
def border: Border
Inherited from
Component
def border_=(b: Border): Unit
Inherited from
Component
Inherited from
UIElement
def componentOrientation: ComponentOrientation
Inherited from
UIElement
def componentOrientation_=(x: ComponentOrientation): Unit
Inherited from
UIElement
def cursor: Cursor
Inherited from
UIElement
def cursor_=(c: Cursor): Unit
Inherited from
UIElement
def deafTo(ps: Publisher*): Unit
Implicitly added by stringEditor

Installed reaction won't receive events from the given publisher anylonger.

Installed reaction won't receive events from the given publisher anylonger.

Inherited from
Reactor
def deafTo(ps: Publisher*): Unit
Implicitly added by intEditor

Installed reaction won't receive events from the given publisher anylonger.

Installed reaction won't receive events from the given publisher anylonger.

Inherited from
Reactor
def deafTo(ps: Publisher*): Unit
Implicitly added by floatEditor

Installed reaction won't receive events from the given publisher anylonger.

Installed reaction won't receive events from the given publisher anylonger.

Inherited from
Reactor
def deafTo(ps: Publisher*): Unit
Implicitly added by doubleEditor

Installed reaction won't receive events from the given publisher anylonger.

Installed reaction won't receive events from the given publisher anylonger.

Inherited from
Reactor
def deafTo(ps: Publisher*): Unit

Installed reaction won't receive events from the given publisher anylonger.

Installed reaction won't receive events from the given publisher anylonger.

Inherited from
Reactor
def displayable: Boolean
Inherited from
UIElement
def enabled: Boolean
Inherited from
Component
def enabled_=(b: Boolean): Unit
Inherited from
Component
override def equals(that: Any): Boolean
Definition Classes
Proxy -> Any
Inherited from
Proxy
def focusable: Boolean
Inherited from
Component
def focusable_=(b: Boolean): Unit
Inherited from
Component
def font: Font
Inherited from
UIElement
def font_=(f: Font): Unit
Inherited from
UIElement
Inherited from
UIElement
def foreground_=(c: Color): Unit
Inherited from
UIElement
def hasFocus: Boolean
Inherited from
Component
override def hashCode(): Int
Definition Classes
Proxy -> Any
Inherited from
Proxy
def ignoreRepaint: Boolean
Inherited from
UIElement
def ignoreRepaint_=(b: Boolean): Unit
Inherited from
UIElement
def inputVerifier: Component => Boolean
Inherited from
Component
def inputVerifier_=(v: Component => Boolean): Unit
Inherited from
Component
def listenTo(ps: Publisher*): Unit
Implicitly added by stringEditor

Listen to the given publisher as long as deafTo isn't called for them.

Listen to the given publisher as long as deafTo isn't called for them.

Inherited from
Reactor
def listenTo(ps: Publisher*): Unit
Implicitly added by intEditor

Listen to the given publisher as long as deafTo isn't called for them.

Listen to the given publisher as long as deafTo isn't called for them.

Inherited from
Reactor
def listenTo(ps: Publisher*): Unit
Implicitly added by floatEditor

Listen to the given publisher as long as deafTo isn't called for them.

Listen to the given publisher as long as deafTo isn't called for them.

Inherited from
Reactor
def listenTo(ps: Publisher*): Unit
Implicitly added by doubleEditor

Listen to the given publisher as long as deafTo isn't called for them.

Listen to the given publisher as long as deafTo isn't called for them.

Inherited from
Reactor
def listenTo(ps: Publisher*): Unit

Listen to the given publisher as long as deafTo isn't called for them.

Listen to the given publisher as long as deafTo isn't called for them.

Inherited from
Reactor
def locale: Locale
Inherited from
UIElement
Inherited from
UIElement
Inherited from
UIElement
Inherited from
UIElement
def maximumSize_=(x: Dimension): Unit
Inherited from
UIElement
Inherited from
UIElement
def minimumSize_=(x: Dimension): Unit
Inherited from
UIElement
def name: String
Inherited from
Component
def name_=(s: String): Unit
Inherited from
Component
def opaque: Boolean
Inherited from
Component
def opaque_=(b: Boolean): Unit
Inherited from
Component
def paint(g: Graphics2D): Unit
Inherited from
Component
Inherited from
UIElement
def preferredSize_=(x: Dimension): Unit
Inherited from
UIElement
def publish(e: Event): Unit
Implicitly added by stringEditor

Notify all registered reactions.

Notify all registered reactions.

Inherited from
Publisher
def publish(e: Event): Unit
Implicitly added by intEditor

Notify all registered reactions.

Notify all registered reactions.

Inherited from
Publisher
def publish(e: Event): Unit
Implicitly added by floatEditor

Notify all registered reactions.

Notify all registered reactions.

Inherited from
Publisher
def publish(e: Event): Unit
Implicitly added by doubleEditor

Notify all registered reactions.

Notify all registered reactions.

Inherited from
Publisher
def publish(e: Event): Unit

Notify all registered reactions.

Notify all registered reactions.

Inherited from
Publisher
def repaint(rect: Rectangle): Unit
Inherited from
UIElement
def repaint(): Unit
Inherited from
UIElement
def requestFocus(): Unit
Inherited from
Component
def requestFocusInWindow(): Boolean
Inherited from
Component
def revalidate(): Unit
Inherited from
Component
def self: Any
Inherited from
UIElement
def showing: Boolean
Inherited from
UIElement
Inherited from
UIElement
override def subscribe(listener: Reaction): Unit
Definition Classes
LazyPublisher -> Publisher
Inherited from
LazyPublisher
override def toString: String
Definition Classes
Component -> Proxy -> Any
Inherited from
Component
def toolkit: Toolkit
Inherited from
UIElement
def tooltip: String
Inherited from
Component
def tooltip_=(t: String): Unit
Inherited from
Component
override def unsubscribe(listener: Reaction): Unit
Definition Classes
LazyPublisher -> Publisher
Inherited from
LazyPublisher
def validate(): Unit
Inherited from
UIElement
def visible: Boolean
Inherited from
UIElement
def visible_=(b: Boolean): Unit
Inherited from
UIElement
def xLayoutAlignment: Double

Used by certain layout managers, e.g., BoxLayout or OverlayLayout to align components relative to each other.

Used by certain layout managers, e.g., BoxLayout or OverlayLayout to align components relative to each other.

Inherited from
Component
def xLayoutAlignment_=(x: Double): Unit
Inherited from
Component
def yLayoutAlignment: Double
Inherited from
Component
def yLayoutAlignment_=(y: Double): Unit
Inherited from
Component

Concrete fields

lazy val comboBoxPeer: ComboBoxEditor
Implicitly added by stringEditor
lazy val comboBoxPeer: ComboBoxEditor
Implicitly added by intEditor
lazy val comboBoxPeer: ComboBoxEditor
Implicitly added by floatEditor
lazy val comboBoxPeer: ComboBoxEditor
Implicitly added by doubleEditor
lazy override val peer: JComboBox[A]

Inherited fields

protected val listeners: RefSet[Reaction]
Implicitly added by stringEditor
Inherited from
Publisher
protected val listeners: RefSet[Reaction]
Implicitly added by intEditor
Inherited from
Publisher
protected val listeners: RefSet[Reaction]
Implicitly added by floatEditor
Inherited from
Publisher
protected val listeners: RefSet[Reaction]
Implicitly added by doubleEditor
Inherited from
Publisher
protected val listeners: RefSet[Reaction]
Inherited from
Publisher
Implicitly added by stringEditor

All reactions of this reactor.

All reactions of this reactor.

Inherited from
Reactor
Implicitly added by intEditor

All reactions of this reactor.

All reactions of this reactor.

Inherited from
Reactor
Implicitly added by floatEditor

All reactions of this reactor.

All reactions of this reactor.

Inherited from
Reactor
Implicitly added by doubleEditor

All reactions of this reactor.

All reactions of this reactor.

Inherited from
Reactor

All reactions of this reactor.

All reactions of this reactor.

Inherited from
Reactor