All Packages Class Hierarchy This Package Previous Next Index
Class com.bulletproof.gui.Buttons
java.lang.Object
|
+----com.bulletproof.gui.Component
|
+----com.bulletproof.gui.Container
|
+----com.bulletproof.gui.Panel
|
+----com.bulletproof.gui.Buttons
- public class Buttons
- extends Panel
- implements ActionListener
Class Buttons represents a neat grouping of Button components
-
alignmentValues
-
-
button
-
-
HORIZONTAL
-
-
VERTICAL
-
-
Buttons(String[], int)
- Creates a set of buttons with the requested labels.
-
Buttons(String[], int, String)
- Creates a set of buttons with the requested labels.
-
actionPerformed(ActionEvent)
-
-
addActionListener(ActionListener)
-
-
getAlignment()
- Get the current alignment (Horizontal or Vertical).
-
getAlignmentValue(String)
- Get the alignment value integer given one of the following (Horizontal or Vertical).
-
getButton(int)
- Get the handle to the speicified button.
-
getButtonCount()
- Get the number of buttons in this group.
-
getLabels()
- Get the labels of the buttons in this group.
-
isEnabled(int)
-
-
removeActionListener(ActionListener)
-
-
setAlignment(int)
- Set the alignment (Horizontal or Vertical).
-
setButtonCount(int)
- Set the number of buttons in this group.
-
setEnabled(boolean)
- Enables a component.
-
setEnabled(int, boolean)
-
-
setFont(Font)
- Sets the font for all subsequent text rendering operations.
-
setLabel(int, String)
- Set the label of a button.
VERTICAL
public static int VERTICAL
HORIZONTAL
public static int HORIZONTAL
alignmentValues
public static String alignmentValues[]
button
public Button button[]
Buttons
public Buttons(String buttons[],
int alignment)
- Creates a set of buttons with the requested labels.
- Parameters:
- buttons - the text labels for the buttons.
- alignment - the text alignment (Horizontal or Vertical).
Buttons
public Buttons(String buttons[],
int alignment,
String layout)
- Creates a set of buttons with the requested labels.
- Parameters:
- buttons - the text labels for the buttons.
- alignment - the text alignment (Horizontal or Vertical).
- layout - the button positioning (North, South, East, West or Center).
addActionListener
public void addActionListener(ActionListener al)
removeActionListener
public void removeActionListener(ActionListener al)
getButton
public Button getButton(int ix)
- Get the handle to the speicified button.
- Parameters:
- the - button number to retrieve.
- Returns:
- the handle to the speicified button.
getButtonCount
public int getButtonCount()
- Get the number of buttons in this group.
- Returns:
- the number of buttons in this group.
setButtonCount
public void setButtonCount(int btnCount)
- Set the number of buttons in this group.
- Parameters:
- buttonCount - the number of buttons in this group.
getLabels
public String[] getLabels()
- Get the labels of the buttons in this group.
- Returns:
- the labels of buttons in this group.
setLabel
public void setLabel(int ix,
String btnName)
- Set the label of a button.
- Parameters:
- buttonNumber - the number of the selected button.
- buttonLabel - the new label text.
getAlignment
public int getAlignment()
- Get the current alignment (Horizontal or Vertical).
- Returns:
- the current alignment value.
setAlignment
public void setAlignment(int align)
- Set the alignment (Horizontal or Vertical).
- Parameters:
- alignment - the new alignment value.
getAlignmentValue
public static int getAlignmentValue(String align)
- Get the alignment value integer given one of the following (Horizontal or Vertical).
- Returns:
- the alignment value.
setEnabled
public void setEnabled(boolean enabled)
- Enables a component.
- Overrides:
- setEnabled in class Component
setEnabled
public void setEnabled(int buttonNumber,
boolean enabled)
isEnabled
public boolean isEnabled(int buttonNumber)
setFont
public void setFont(Font thisFont)
- Sets the font for all subsequent text rendering operations.
- Overrides:
- setFont in class Component
actionPerformed
public void actionPerformed(ActionEvent e)
All Packages Class Hierarchy This Package Previous Next Index