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


Variable Index

 o alignmentValues
 o button
 o HORIZONTAL
 o VERTICAL

Constructor Index

 o Buttons(String[], int)
Creates a set of buttons with the requested labels.
 o Buttons(String[], int, String)
Creates a set of buttons with the requested labels.

Method Index

 o actionPerformed(ActionEvent)
 o addActionListener(ActionListener)
 o getAlignment()
Get the current alignment (Horizontal or Vertical).
 o getAlignmentValue(String)
Get the alignment value integer given one of the following (Horizontal or Vertical).
 o getButton(int)
Get the handle to the speicified button.
 o getButtonCount()
Get the number of buttons in this group.
 o getLabels()
Get the labels of the buttons in this group.
 o isEnabled(int)
 o removeActionListener(ActionListener)
 o setAlignment(int)
Set the alignment (Horizontal or Vertical).
 o setButtonCount(int)
Set the number of buttons in this group.
 o setEnabled(boolean)
Enables a component.
 o setEnabled(int, boolean)
 o setFont(Font)
Sets the font for all subsequent text rendering operations.
 o setLabel(int, String)
Set the label of a button.

Variables

 o VERTICAL
 public static int VERTICAL
 o HORIZONTAL
 public static int HORIZONTAL
 o alignmentValues
 public static String alignmentValues[]
 o button
 public Button button[]

Constructors

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

Methods

 o addActionListener
 public void addActionListener(ActionListener al)
 o removeActionListener
 public void removeActionListener(ActionListener al)
 o 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.
 o getButtonCount
 public int getButtonCount()
Get the number of buttons in this group.

Returns:
the number of buttons in this group.
 o setButtonCount
 public void setButtonCount(int btnCount)
Set the number of buttons in this group.

Parameters:
buttonCount - the number of buttons in this group.
 o getLabels
 public String[] getLabels()
Get the labels of the buttons in this group.

Returns:
the labels of buttons in this group.
 o 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.
 o getAlignment
 public int getAlignment()
Get the current alignment (Horizontal or Vertical).

Returns:
the current alignment value.
 o setAlignment
 public void setAlignment(int align)
Set the alignment (Horizontal or Vertical).

Parameters:
alignment - the new alignment value.
 o getAlignmentValue
 public static int getAlignmentValue(String align)
Get the alignment value integer given one of the following (Horizontal or Vertical).

Returns:
the alignment value.
 o setEnabled
 public void setEnabled(boolean enabled)
Enables a component.

Overrides:
setEnabled in class Component
 o setEnabled
 public void setEnabled(int buttonNumber,
                        boolean enabled)
 o isEnabled
 public boolean isEnabled(int buttonNumber)
 o setFont
 public void setFont(Font thisFont)
Sets the font for all subsequent text rendering operations.

Overrides:
setFont in class Component
 o actionPerformed
 public void actionPerformed(ActionEvent e)

All Packages  Class Hierarchy  This Package  Previous  Next  Index