JIDE 3.5.15

com.jidesoft.swing
Interface SplitButtonModel

All Superinterfaces:
ButtonModel, ItemSelectable
All Known Implementing Classes:
DefaultSplitButtonModel, JideToggleSplitButton.ToggleSplitButtonModel

public interface SplitButtonModel
extends ButtonModel

SplitButtonModel is for JideSplitButton. Because SplitButton has two parts - button part and dropdown menu part. setSelected() and isSelected() is used by dropdown menu part. However in order to support togglable button, we have to make the button part selected or not selected. That's why we create SplitButtonModel and added two methods for the selection of button part.


Method Summary
 boolean isButtonEnabled()
          Indicates if the button is enabled.
 boolean isButtonRollover()
          Indicates if the button part of the JideSplitButton is rollover.
 boolean isButtonSelected()
          Indicates if the button has been selected.
 void setButtonEnabled(boolean b)
          Enables or disables the button.
 void setButtonRollover(boolean b)
          Sets the button part of the JideSplitButton as rollover.
 void setButtonSelected(boolean b)
          Selects or deselects the button.
 
Methods inherited from interface javax.swing.ButtonModel
addActionListener, addChangeListener, addItemListener, getActionCommand, getMnemonic, isArmed, isEnabled, isPressed, isRollover, isSelected, removeActionListener, removeChangeListener, removeItemListener, setActionCommand, setArmed, setEnabled, setGroup, setMnemonic, setPressed, setRollover, setSelected
 
Methods inherited from interface java.awt.ItemSelectable
getSelectedObjects
 

Method Detail

setButtonSelected

void setButtonSelected(boolean b)
Selects or deselects the button.

Parameters:
b - true selects the button, false deselects the button.

isButtonSelected

boolean isButtonSelected()
Indicates if the button has been selected. Only needed for certain types of buttons - such as radio buttons and check boxes.

Returns:
true if the button is selected

setButtonEnabled

void setButtonEnabled(boolean b)
Enables or disables the button.

Parameters:
b - true enables the button, false disables the button.

isButtonEnabled

boolean isButtonEnabled()
Indicates if the button is enabled.

Returns:
true if the button is enabled.

setButtonRollover

void setButtonRollover(boolean b)
Sets the button part of the JideSplitButton as rollover.

Parameters:
b - true set the button as rollover, false set the button as not rollover

isButtonRollover

boolean isButtonRollover()
Indicates if the button part of the JideSplitButton is rollover.

Returns:
true if the button is rollover

JIDE 3.5.15