yu.ac.bg.etf.javaqx.qswing
Interface ButtonModel

All Known Implementing Classes:
DefaultButtonModel, DefaultButtonModel.EmptyModel

public interface ButtonModel

Button Model.

Version:
0.2.0
Author:
Slobodan Vrkacevic (slobodan.vrkacevic@gmail.com)

Method Summary
 void addChangeListener(ChangeListener listener)
          Adds change listener.
 boolean isEnabled()
          Returns true if the button is enabled.
 boolean isPressed()
          Returns true if the button is pressed.
 boolean isSelected()
          Returns true if the button is selected.
 void removeChangeListener(ChangeListener listener)
          Removes change listener.
 void setEnabled(boolean enabled)
          Enables/ disables the button.
 void setPressed(boolean pressed)
          Pressed/unpressed the button.
 void setSelected(boolean selected)
          Selects/deselects the button.
 

Method Detail

isEnabled

public boolean isEnabled()
Returns true if the button is enabled.

Returns:
true if the button is enabled

isPressed

public boolean isPressed()
Returns true if the button is pressed.

Returns:
true if the button is pressed

isSelected

public boolean isSelected()
Returns true if the button is selected.

Returns:
true if the button is selected

setEnabled

public void setEnabled(boolean enabled)
Enables/ disables the button.

Parameters:
enabled - true if enabled

setPressed

public void setPressed(boolean pressed)
Pressed/unpressed the button.

Parameters:
pressed - true if pressed

setSelected

public void setSelected(boolean selected)
Selects/deselects the button.

Parameters:
selected - true if selected

addChangeListener

public void addChangeListener(ChangeListener listener)
Adds change listener.

Parameters:
listener - the change listener

removeChangeListener

public void removeChangeListener(ChangeListener listener)
Removes change listener.

Parameters:
listener - the component listener


Copyright © 2007 ETF and contributors. All Rights Reserved.