01: /*
02: * @(#)SplitButtonModel.java 2/18/2005
03: *
04: * Copyright 2002 - 2005 JIDE Software Inc. All rights reserved.
05: */
06: package com.jidesoft.swing;
07:
08: import javax.swing.*;
09:
10: /**
11: * SplitButtonModel is for JideSplitButton. Because SplitButton has two parts - button part and dropdown menu part.
12: * setSelected() and isSelected() is used by dropdown menu part. However in order to support togglable button,
13: * we have to make the button part selected or not selected. That's why we create SplitButtonModel and added two
14: * methods for the selection of button part.
15: */
16: public interface SplitButtonModel extends ButtonModel {
17: /**
18: * Selects or deselects the button.
19: *
20: * @param b true selects the button,
21: * false deselects the button.
22: */
23: void setButtonSelected(boolean b);
24:
25: /**
26: * Indicates if the button has been selected. Only needed for
27: * certain types of buttons - such as radio buttons and check boxes.
28: *
29: * @return true if the button is selected
30: */
31: boolean isButtonSelected();
32:
33: /**
34: * Enables or disables the button.
35: *
36: * @param b true enables the button,
37: * false disables the button.
38: */
39: void setButtonEnabled(boolean b);
40:
41: /**
42: * Indicates if the button is enabled.
43: *
44: * @return true if the button is enabled.
45: */
46: boolean isButtonEnabled();
47:
48: /**
49: * Sets the button part of the JideSplitButton as rollover.
50: *
51: * @param b true set the button as rollover,
52: * false set the button as not rollover
53: */
54: void setButtonRollover(boolean b);
55:
56: /**
57: * Indicates if the button part of the JideSplitButton is rollover.
58: *
59: * @return true if the button is rollover
60: */
61: boolean isButtonRollover();
62: }
|