KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > swingwtx > swing > ButtonModel


1 /*
2    SwingWT
3    Copyright(c)2003-2004, Tomer Bartletz
4  
5    For more information on distributing and using this program, please
6    see the accompanying "COPYING" file.
7  
8    Contact me by electronic mail: tomerb@users.sourceforge.net
9
10    $Log: ButtonModel.java,v $
11    Revision 1.2 2003/12/14 09:13:38 bobintetley
12    Added CVS log to source headers
13
14  */

15 package swingwtx.swing;
16
17 import swingwt.awt.ItemSelectable;
18 import swingwt.awt.event.ActionListener;
19 import swingwt.awt.event.ItemListener;
20 import swingwtx.swing.event.ChangeListener;
21
22 /**
23  * State Model for buttons.
24  * This model is used for check boxes and radio buttons, which are
25  * special kinds of buttons, as well as for normal buttons.
26  *
27  * @author Tomer Barletz, tomerb@users.sourceforge.net
28  * @version 0.1
29  */

30 public interface ButtonModel extends ItemSelectable {
31     boolean isArmed();
32     boolean isSelected();
33     boolean isEnabled();
34     boolean isPressed();
35     boolean isRollover();
36     public void setArmed(boolean b);
37     public void setSelected(boolean b);
38     public void setEnabled(boolean b);
39     public void setPressed(boolean b);
40     public void setRollover(boolean b);
41     public void setMnemonic(int key);
42     public int getMnemonic();
43     public void setActionCommand(String JavaDoc s);
44     public String JavaDoc getActionCommand();
45     public void setGroup(ButtonGroup group);
46     void addActionListener(ActionListener l);
47     void removeActionListener(ActionListener l);
48     void addItemListener(ItemListener l);
49     void removeItemListener(ItemListener l);
50     void addChangeListener(ChangeListener l);
51     void removeChangeListener(ChangeListener l);
52 }
53
Popular Tags