ilog.views.appframe.event
Class IlvCheckableActionHandler

java.lang.Object
  extended by ilog.views.appframe.event.IlvSingleActionHandler
      extended by ilog.views.appframe.event.IlvCheckableActionHandler
All Implemented Interfaces:
ActionHandler, ActionListener, EventListener
Direct Known Subclasses:
IlvComponentVisibilityActionHandler

public abstract class IlvCheckableActionHandler
extends IlvSingleActionHandler

Action handler that handles checkable actions.


Constructor Summary
IlvCheckableActionHandler(String command)
          Constructs a new IlvCheckableActionHandler that handles the checkable action with the specified command key.
 
Method Summary
protected  void checkStateChanged(boolean check)
          Invoked after the action handled by this object has been checked or unchecked, depending on the value of the check parameter.
 String getGroup()
          Returns the check group that the checkable action that this object handles belongs to.
 boolean isChecked()
          Determines whether the action handled by this object is checked.
 boolean isLocked()
          Determines whether the action handled by this object is locked.
 boolean isOneShot()
          Determines whether the checkable action handled by this object is one-shot.
protected  void lockStateChanged(boolean lock)
          Invoked when the lock state of the action handled by this object has changed.
 void setAction(Action action)
          Sets the action that this instance handles.
 void setChecked(boolean check)
          Checks or unchecks the checkable action handled by this object, depending on the value of the check parameter.
 void setLocked(boolean lock)
          Locks or unlocks the checkable action handled by this object, depending on the value of the lock parameter.
 void setOneShot(boolean oneShot)
          Sets the action one-shot or not, depending on the value of the oneShot parameter.
 
Methods inherited from class ilog.views.appframe.event.IlvSingleActionHandler
actionPerformed, getAction, getCommand, isProcessingAction, setCommand, updateAction, updateSingleAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvCheckableActionHandler

public IlvCheckableActionHandler(String command)
Constructs a new IlvCheckableActionHandler that handles the checkable action with the specified command key.

Parameters:
command - The command key of the action handled by this action handler.
Method Detail

isChecked

public boolean isChecked()
Determines whether the action handled by this object is checked.

Returns:
true if the action is checked; false otherwise.
See Also:
setChecked(boolean), checkStateChanged(boolean)

setChecked

public void setChecked(boolean check)
Checks or unchecks the checkable action handled by this object, depending on the value of the check parameter.

Parameters:
check - If true, the action will be checked; if false, the action will be unchecked.
See Also:
isChecked(), checkStateChanged(boolean)

checkStateChanged

protected void checkStateChanged(boolean check)
Invoked after the action handled by this object has been checked or unchecked, depending on the value of the check parameter.

Parameters:
check - The new check state of the action. If true, the action will be checked; if false, the action will be unchecked.

getGroup

public String getGroup()
Returns the check group that the checkable action that this object handles belongs to. Only one action can be checked at the same time in a check group. When an action is checked, the previously checked action of the group is unchecked.

Returns:
The check group of the action or null if the checkable action does not belong to any check group.

isOneShot

public boolean isOneShot()
Determines whether the checkable action handled by this object is one-shot. See the IlvAction class for detailed explanations on one-shot actions.

Returns:
true if the action is one-shot; false otherwise.
See Also:
setOneShot(boolean), getGroup(), setLocked(boolean), isLocked()

setOneShot

public void setOneShot(boolean oneShot)
Sets the action one-shot or not, depending on the value of the oneShot parameter.

Parameters:
oneShot - if true, the action will be set one-shot; if false, the action will be set to the default check mode.
See Also:
isOneShot()

lockStateChanged

protected void lockStateChanged(boolean lock)
Invoked when the lock state of the action handled by this object has changed. For more details on locking one-shot actions, see the class IlvAction.

Parameters:
lock - The new lock state of the action. If true, the action has been locked; if false the action has been unlocked.
See Also:
isLocked()

isLocked

public boolean isLocked()
Determines whether the action handled by this object is locked. For more details on locking one-shot actions, see the class IlvAction.

Returns:
true if the action is locked; false otherwise.
See Also:
setLocked(boolean)

setLocked

public void setLocked(boolean lock)
Locks or unlocks the checkable action handled by this object, depending on the value of the lock parameter.

Parameters:
lock - If true the action will be locked; if false the action will be unlocked.
See Also:
isLocked()

setAction

public void setAction(Action action)
Sets the action that this instance handles. This method overrides the command key previously set with the IlvSingleActionHandler.setCommand(java.lang.String) method.

Overrides:
setAction in class IlvSingleActionHandler
Parameters:
action - the new action that this instance handles.
See Also:
IlvSingleActionHandler.getAction(), IlvSingleActionHandler.setCommand(java.lang.String)


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.