javax.swing.plaf.metal
public class MetalComboBoxButton extends JButton
Field Summary | |
---|---|
protected JComboBox | comboBox A reference to the JComboBox that the button belongs to. |
protected Icon | comboIcon The button icon. |
protected boolean | iconOnly Display just the icon, or the icon plus the label. |
protected JList | listBox A reference to the JList. |
protected CellRendererPane | rendererPane
Used for rendering the selected item. |
Constructor Summary | |
---|---|
MetalComboBoxButton(JComboBox cb, Icon i, CellRendererPane pane, JList list)
Creates a new button.
| |
MetalComboBoxButton(JComboBox cb, Icon i, boolean onlyIcon, CellRendererPane pane, JList list)
Creates a new button.
|
Method Summary | |
---|---|
JComboBox | getComboBox()
Returns the combo box that the button is used with.
|
Icon | getComboIcon()
Returns the icon displayed by the button. |
boolean | isFocusTraversable()
Returns false , to indicate that this component is not part
of the focus traversal group.
|
boolean | isIconOnly()
Returns a flag that controls whether the button displays an icon only,
or text as well.
|
void | paintComponent(Graphics g)
Paints the component.
|
void | setComboBox(JComboBox cb)
Sets the combo box that the button is used with.
|
void | setComboIcon(Icon i)
Sets the icon displayed by the button.
|
void | setEnabled(boolean enabled)
Enables or disables the button.
|
void | setIconOnly(boolean isIconOnly)
Sets the flag that controls whether the button displays an icon only,
or text as well.
|
Parameters: cb the combo that the button is used for (null
not
permitted). i the icon displayed on the button. pane the rendering pane. list the list.
Parameters: cb the combo that the button is used for (null
not
permitted). i the icon displayed on the button. onlyIcon a flag that specifies whether the button displays only an
icon, or text as well. pane the rendering pane. list the list.
Returns: The combo box.
Returns: The icon displayed by the button.
false
, to indicate that this component is not part
of the focus traversal group.
Returns: false
Returns: A boolean.
Parameters: g the graphics device.
Parameters: cb the combo box.
Parameters: i the icon.
Parameters: enabled the new status.
Parameters: isIconOnly the flag.