Class ToggleButton
Class ToggleButton
java.lang.Object
|
+----Button
|
+----ToggleButton
- class ToggleButton
- extends Button
ToggleButton is the class for buttons with to states.
-
ToggleButton(int, String, String, int, int, int, int, Font, Font, boolean)
- Creates a toggle button.
-
GetChoosed()
- Returns the state of the button.
-
drawButton(Graphics)
-
-
mouseUpButton(int, int)
-
ToggleButton
public ToggleButton(int bnum,
String l,
String cl,
int x,
int y,
int w,
int h,
Font f,
Font cf,
boolean cho)
- Creates a toggle button.
This button has two states represended by two labels and two fonts.
- Parameters:
- bnum - id-number for the button
- l - label for state one
- cl - label for state two
- x - x-ccordinate of the button
- y - y-coordinate of the button
- w - the size().width
- h - the size().height
- f - the font used for the label in state one
- cf - the font used for the label in state two
- cho - initialize the ToggleButton in state two?
GetChoosed
public boolean GetChoosed()
- Returns the state of the button.
- Returns:
- is the button in state two?
drawButton
protected void drawButton(Graphics g)
- Overrides:
- drawButton in class Button
mouseUpButton
protected boolean mouseUpButton(int x,
int y)
- Overrides:
- mouseUpButton in class Button