getMaximumRowCount
getMaximumRowCount: (JComboBox) -> numberHow many rows the popup shows before it scrolls (the look's 15 until set).
JComboBox.new()| Method | Returns | Description |
|---|---|---|
getMaximumRowCount() | number | How many rows the popup shows before it scrolls (the look's 15 until set). |
setMaximumRowCount(number) | () | Sets how many rows the popup shows before it scrolls. |
isPopupVisible() | boolean | Whether the popup is open. |
setPopupVisible(boolean) | () | Opens or closes the popup (it opens only while the box is showing and has rows). |
showPopup() | () | Opens the popup. |
hidePopup() | () | Closes the popup. |
addActionListener(any) | () | Adds an ActionListener (a table with actionPerformed, or that function): it hears every setSelectedItem and every choice, the last ad… |
removeActionListener(any) | () | Removes an ActionListener, by identity. |
getActionListeners() | {any} | The ActionListeners, in registration order. |
addItemListener(any) | () | Adds an ItemListener (a table with itemStateChanged, or that function): when the selected item changes it hears the old one `DESELECTED… |
removeItemListener(any) | () | Removes an ItemListener, by identity. |
getItemListeners() | {any} | The ItemListeners, in registration order. |
addItem(any) | () | Appends to the model (a MutableComboBoxModel). |
getItemAt(number) | any | The row's item, nil outside the rows. |
getItemCount() | number | How many rows. |
getSelectedItem() | any | The model's selected item. |
removeAllItems() | () | Empties the model. |
setModel(any) | () | Shows model; nil raises. |
setRenderer(ListCellRenderer) | () | A ListCellRenderer for the box's value (index -1) and the popup's rows; nil restores the default. |
setSelectedItem(any) | () | o becomes the selected item when it is one of the rows (or nil); the action fires either way. |
new() | JComboBox | () -> JComboBox: An empty combo box (its model an empty DefaultComboBoxModel). |
new({ n: number, [number]: any? }) | JComboBox | |
init(JComboBox) | () | (JComboBox) -> (): An empty combo box (its model an empty DefaultComboBoxModel). |
init(JComboBox, { n: number, [number]: any? }) | () | |
isInstance(any) | boolean | Whether obj is a JComboBox object, a class(JComboBox) subclass's included. |
| Field | Type | Description |
|---|---|---|
super | JComponentClass | JComponent's class table: the base class. |
| Method | Returns | Description |
|---|---|---|
JComboBoxClass.new | JComboBox | () -> JComboBox: An empty combo box (its model an empty DefaultComboBoxModel). |
getMaximumRowCountgetMaximumRowCount: (JComboBox) -> numberHow many rows the popup shows before it scrolls (the look's 15 until set).
setMaximumRowCountsetMaximumRowCount: (JComboBox, number) -> ()Sets how many rows the popup shows before it scrolls.
isPopupVisibleisPopupVisible: (JComboBox) -> booleanWhether the popup is open.
setPopupVisiblesetPopupVisible: (JComboBox, boolean) -> ()Opens or closes the popup (it opens only while the box is showing and has rows).
showPopupshowPopup: (JComboBox) -> ()Opens the popup.
hidePopuphidePopup: (JComboBox) -> ()Closes the popup.
addActionListeneraddActionListener: (JComboBox, any) -> ()Adds an ActionListener (a table with actionPerformed, or that function): it hears every setSelectedItem and every choice, the last added first; the command is "comboBoxChanged".
removeActionListenerremoveActionListener: (JComboBox, any) -> ()Removes an ActionListener, by identity.
getActionListenersgetActionListeners: (JComboBox) -> {any}The ActionListeners, in registration order.
addItemListeneraddItemListener: (JComboBox, any) -> ()Adds an ItemListener (a table with itemStateChanged, or that function): when the selected item changes it hears the old one DESELECTED, then the new one SELECTED, the last added first.
removeItemListenerremoveItemListener: (JComboBox, any) -> ()Removes an ItemListener, by identity.
getItemListenersgetItemListeners: (JComboBox) -> {any}The ItemListeners, in registration order.
addItemaddItem: (JComboBox, any) -> ()Appends to the model (a MutableComboBoxModel).
getItemAtgetItemAt: (JComboBox, number) -> anyThe row's item, nil outside the rows.
getItemCountgetItemCount: (JComboBox) -> numberHow many rows.
getSelectedItemgetSelectedItem: (JComboBox) -> anyThe model's selected item.
removeAllItemsremoveAllItems: (JComboBox) -> ()Empties the model.
setModelsetModel: (JComboBox, any) -> ()Shows model; nil raises.
setRenderersetRenderer: (JComboBox, ListCellRenderer) -> ()A ListCellRenderer for the box's value (index -1) and the popup's rows; nil restores the default.
setSelectedItemsetSelectedItem: (JComboBox, any) -> ()o becomes the selected item when it is one of the rows (or nil); the action fires either way.
newnew: (() -> JComboBox) & (({ n: number, [number]: any? }) -> JComboBox)() -> JComboBox: An empty combo box (its model an empty DefaultComboBoxModel).
({ n: number, [number]: any? }) -> JComboBox: A combo box over items (an array, its first element selected), or over a ComboBoxModel given in its place (a table with getSize, getElementAt, getSelectedItem and setSelectedItem, as new JComboBox(model) takes it).
initinit: ((JComboBox) -> ()) & ((JComboBox, { n: number, [number]: any? }) -> ())(JComboBox) -> (): An empty combo box (its model an empty DefaultComboBoxModel).
(JComboBox, { n: number, [number]: any? }) -> (): A combo box over items (an array, its first element selected), or over a ComboBoxModel given in its place (a table with getSize, getElementAt, getSelectedItem and setSelectedItem, as new JComboBox(model) takes it).
isInstanceisInstance: (any) -> booleanWhether obj is a JComboBox object, a class(JComboBox) subclass's included.