Package com.jidesoft.swing
Class DefaultSplitButtonModel
- java.lang.Object
-
- javax.swing.DefaultButtonModel
-
- com.jidesoft.swing.DefaultSplitButtonModel
-
- All Implemented Interfaces:
SplitButtonModel
,java.awt.ItemSelectable
,java.io.Serializable
,javax.swing.ButtonModel
- Direct Known Subclasses:
JideToggleSplitButton.ToggleSplitButtonModel
public class DefaultSplitButtonModel extends javax.swing.DefaultButtonModel implements SplitButtonModel
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
BUTTON_ENABLED
Indicates that the button part of the split button is enabled or disabled.static int
BUTTON_ROLLOVER
Indicates that the button part of the split button is rollover.static int
BUTTON_SELECTED
Indicates that the button part of the split button has been selected.
-
Constructor Summary
Constructors Constructor Description DefaultSplitButtonModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isButtonEnabled()
Indicates if the button part of the JideSplitButton has been enabled.boolean
isButtonRollover()
Indicates if the button part of the JideSplitButton is rollover.boolean
isButtonSelected()
Indicates if the button part of the JideSplitButton has been selected.void
setButtonEnabled(boolean b)
Selects or deselects the button part of the JideSplitButton.void
setButtonRollover(boolean b)
Sets the button part of the JideSplitButton as rollover.void
setButtonSelected(boolean b)
Selects or deselects the button part of the JideSplitButton.void
setRollover(boolean b)
-
Methods inherited from class javax.swing.DefaultButtonModel
addActionListener, addChangeListener, addItemListener, fireActionPerformed, fireItemStateChanged, fireStateChanged, getActionCommand, getActionListeners, getChangeListeners, getGroup, getItemListeners, getListeners, getMnemonic, getSelectedObjects, isArmed, isEnabled, isPressed, isRollover, isSelected, removeActionListener, removeChangeListener, removeItemListener, setActionCommand, setArmed, setEnabled, setGroup, setMnemonic, setPressed, setSelected
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.swing.ButtonModel
addActionListener, addChangeListener, addItemListener, getActionCommand, getGroup, getMnemonic, isArmed, isEnabled, isPressed, isRollover, isSelected, removeActionListener, removeChangeListener, removeItemListener, setActionCommand, setArmed, setEnabled, setGroup, setMnemonic, setPressed, setSelected
-
-
-
-
Field Detail
-
BUTTON_SELECTED
public static final int BUTTON_SELECTED
Indicates that the button part of the split button has been selected.- See Also:
- Constant Field Values
-
BUTTON_ENABLED
public static final int BUTTON_ENABLED
Indicates that the button part of the split button is enabled or disabled.- See Also:
- Constant Field Values
-
BUTTON_ROLLOVER
public static final int BUTTON_ROLLOVER
Indicates that the button part of the split button is rollover.- See Also:
- Constant Field Values
-
-
Method Detail
-
setButtonSelected
public void setButtonSelected(boolean b)
Selects or deselects the button part of the JideSplitButton.- Specified by:
setButtonSelected
in interfaceSplitButtonModel
- Parameters:
b
- true selects the button, false deselects the button
-
isButtonSelected
public boolean isButtonSelected()
Indicates if the button part of the JideSplitButton has been selected.- Specified by:
isButtonSelected
in interfaceSplitButtonModel
- Returns:
- true if the button is selected
-
setButtonEnabled
public void setButtonEnabled(boolean b)
Selects or deselects the button part of the JideSplitButton.- Specified by:
setButtonEnabled
in interfaceSplitButtonModel
- Parameters:
b
- true selects the button, false deselects the button
-
isButtonEnabled
public boolean isButtonEnabled()
Indicates if the button part of the JideSplitButton has been enabled.- Specified by:
isButtonEnabled
in interfaceSplitButtonModel
- Returns:
- true if the button is enabled
-
setButtonRollover
public void setButtonRollover(boolean b)
Sets the button part of the JideSplitButton as rollover.- Specified by:
setButtonRollover
in interfaceSplitButtonModel
- Parameters:
b
- true set the button as rollover, false set the button as not rollover
-
isButtonRollover
public boolean isButtonRollover()
Indicates if the button part of the JideSplitButton is rollover.- Specified by:
isButtonRollover
in interfaceSplitButtonModel
- Returns:
- true if the button is rollover
-
setRollover
public void setRollover(boolean b)
- Specified by:
setRollover
in interfacejavax.swing.ButtonModel
- Overrides:
setRollover
in classjavax.swing.DefaultButtonModel
-
-