ilog.cpl.table.interactor
Class IlpDefaultTableHeaderInteractor

java.lang.Object
  extended by ilog.cpl.interactor.IlpAbstractInteractor
      extended by ilog.cpl.table.interactor.IlpDefaultTableHeaderInteractor
All Implemented Interfaces:
IlpInteractor

public class IlpDefaultTableHeaderInteractor
extends IlpAbstractInteractor

This class models the default table header interactor.

This interactor provides support to define actions associated to gestures, as well as, to create pop-up menus associated to the different table columns.

By default, this interactor associates an action to gesture BUTTON1_CLICKED.

Since:
JTGO 3.0
See Also:
IlpToggleSortingCriterion

Constructor Summary
IlpDefaultTableHeaderInteractor()
          Creates a new table header interactor.
IlpDefaultTableHeaderInteractor(IlpPopupMenuFactory menuFactory)
          Creates a new interactor with the given pop-up menu factory.
 
Method Summary
protected  ActionEvent createActionEvent(IlpInteractionContext ctxt, IlpInteractionState state, int modifiers)
          Deprecated. Please use IlpActionEventFactory instead.
protected  boolean displayPopupMenu(IlpInteractionContext ctxt, MouseEvent e)
          Displays a pop-up menu on the source and at the location given by the specified mouse event if this event corresponds to a pop-up trigger and a pop-up menu factory is set for this interactor and if this factory does not return null.
static IlpActionEventFactory GetDefaultActionEventFactory()
          Returns the action event factory that is used by default in this table header interactor.
protected  IlpInteractionState getInteractionState(IlpInteractionContext ctxt)
          Looks up the interaction state corresponding to the given context.
 
Methods inherited from class ilog.cpl.interactor.IlpAbstractInteractor
createActionEvent, delegateEvent, getAction, getAction, getActionEventFactory, getGestureAction, getGestureAction, getGestureButton, getGestureModifiers, getKeyStrokeAction, getPopupMenuFactory, manageSelection, processEvent, processGesture, processKeyEvent, processMouseOrFocusEvent, setAction, setAction, setActionEventFactory, setGestureAction, setGestureAction, setKeyStrokeAction, setPopupMenuFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlpDefaultTableHeaderInteractor

public IlpDefaultTableHeaderInteractor()
Creates a new table header interactor.

This interactor has a predefined action associated to gesture BUTTON1_CLICKED. This action executes the sorting of the column where the event has occurred.

See Also:
IlpToggleSortingCriterion

IlpDefaultTableHeaderInteractor

public IlpDefaultTableHeaderInteractor(IlpPopupMenuFactory menuFactory)
Creates a new interactor with the given pop-up menu factory.

This interactor has a predefined action associated to gesture BUTTON1_CLICKED. This action executes the sorting of the column where the event has occurred.

Parameters:
menuFactory - The pop-up menu factory for the table header.
See Also:
IlpPopupMenuFactory, IlpToggleSortingCriterion
Method Detail

GetDefaultActionEventFactory

public static IlpActionEventFactory GetDefaultActionEventFactory()
Returns the action event factory that is used by default in this table header interactor.

The default action event factory creates IlpDefaultTableHeaderActionEvent events.

Since:
JTGO 4.0
See Also:
IlpDefaultTableHeaderActionEvent

createActionEvent

protected ActionEvent createActionEvent(IlpInteractionContext ctxt,
                                        IlpInteractionState state,
                                        int modifiers)
Deprecated. Please use IlpActionEventFactory instead.

Returns a new ActionEvent. Redefined to provide an IlpDefaultTableHeaderActionEvent instance.

Overrides:
createActionEvent in class IlpAbstractInteractor
Parameters:
ctxt - The context where the event occurred.
state - The interaction state.
modifiers - The modifiers associated with the recognized gesture.
See Also:
IlpAbstractInteractor.setActionEventFactory(ilog.cpl.interactor.IlpActionEventFactory), IlpDefaultTableHeaderActionEvent
Deprecated Since:
JTGO 4.0

getInteractionState

protected IlpInteractionState getInteractionState(IlpInteractionContext ctxt)
Looks up the interaction state corresponding to the given context.

Specified by:
getInteractionState in class IlpAbstractInteractor
Parameters:
ctxt - The context where the event occurred.

displayPopupMenu

protected boolean displayPopupMenu(IlpInteractionContext ctxt,
                                   MouseEvent e)
Displays a pop-up menu on the source and at the location given by the specified mouse event if this event corresponds to a pop-up trigger and a pop-up menu factory is set for this interactor and if this factory does not return null. When a pop-up menu is triggered, the selection is updated by calling the method IlpAbstractInteractor.manageSelection(ilog.cpl.interactor.IlpInteractionContext, ilog.cpl.util.selection.IlpRepresentationObjectSelectionModel, ilog.cpl.model.IlpRepresentationObject).

Overrides:
displayPopupMenu in class IlpAbstractInteractor
Parameters:
ctxt - The interaction context of the event.
e - The mouse event which may correspond to a pop-up trigger.
Returns:
true if a pop-up menu has been shown.
See Also:
IlpInteractionContext


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