01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: package javax.swing;
19:
20: import java.awt.ItemSelectable;
21: import java.awt.event.ActionListener;
22: import java.awt.event.ItemListener;
23: import javax.swing.event.ChangeListener;
24:
25: public interface ButtonModel extends ItemSelectable {
26: void addItemListener(ItemListener listener);
27:
28: void removeItemListener(ItemListener listener);
29:
30: void addActionListener(ActionListener listener);
31:
32: void removeActionListener(ActionListener listener);
33:
34: void addChangeListener(ChangeListener listener);
35:
36: void removeChangeListener(ChangeListener listener);
37:
38: void setSelected(boolean selected);
39:
40: boolean isSelected();
41:
42: void setRollover(boolean rollover);
43:
44: boolean isRollover();
45:
46: void setPressed(boolean pressed);
47:
48: boolean isPressed();
49:
50: void setEnabled(boolean enabled);
51:
52: boolean isEnabled();
53:
54: void setArmed(boolean armed);
55:
56: boolean isArmed();
57:
58: void setMnemonic(int mnemonic);
59:
60: int getMnemonic();
61:
62: void setGroup(ButtonGroup group);
63:
64: void setActionCommand(String command);
65:
66: String getActionCommand();
67: }
|