Method
|
Description
|
Constructor
|
public ComboBox(String commandName, String[] items, String tip)
Parameters:
commandName - The command name.
items - The array of the JComboBox items.
tip - The text to be displayed in a tool tip.
Processing:
Calls the following methods.
this.setActionCommand(commandName);
this.addActionListener(this.action);
this.setName(commandName);
this.setToolTipText(tip);
|
activateListener
|
public void activateListener(boolean activate)
If the activate is true, then adds the ComboBoxAction to this object as an ActionListener,
otherwise removes the ComboBoxAction from this object.
: If the setSelectedItem or setSelectedIndex method of the JComboBox
is called, the action occurs and the actionPerformed method is called to execute a command. This behavior may be inconvenient
in some situation. This method provides the function to restrain the occurrence
of the action by adding or removing the ActionListener.
=>FontStyle.setFontStyleToMenu
|
isActionListener
|
private boolean isActionListener(ActionListener listener)
Return true if the ComboBoxAction is added to this object.
|
createFontFamily
ComboBox
(static) |
public static JComboBox createFontFamilyComboBox(String name)
Parameters:
name - The command name
Processing:
Create a new ComboBox object for selecting a font family.
ComboBox for font families
|
createFontSizeComboBox
(static) |
public static JComboBox createFontSizeComboBox(String name)
Parameters:
name - The command name
Processing:
Create a new ComboBox object for selecting a font size.
ComboBox for font sizes
|