ilog.cpl.interactor
Class IlpAbstractPopupMenuFactory

java.lang.Object
  extended by ilog.cpl.interactor.IlpAbstractPopupMenuFactory
All Implemented Interfaces:
IlpPopupMenuFactory
Direct Known Subclasses:
IlpDefaultTableHeaderMenuFactory, IlpDefaultTableMenuFactory

public abstract class IlpAbstractPopupMenuFactory
extends Object
implements IlpPopupMenuFactory

Abstract implementation of IlpPopupMenuFactory for creating pop-up menus.

The method createPopupMenu(ilog.cpl.util.selection.IlpObjectSelectionModel) must be redefined either to return a pop-up menu, or to return null.

One of the createPopupMenu methods can be redefined depending on whether the need is:

Since:
JTGO 3.0

Constructor Summary
IlpAbstractPopupMenuFactory()
           
 
Method Summary
 JPopupMenu createPopupMenu(IlpInteractionContext ctxt)
          Delegates the menu creation to the method createPopupMenu(IlpRepresentationObjectSelectionModel) after having retrieved the selection model used by the view.
 JPopupMenu createPopupMenu(IlpObjectSelectionModel ilpSelectionModel)
          Redefine this method if you want to create your pop-up menu, knowing the selected business objects in the view the menu is made for.
 JPopupMenu createPopupMenu(IlpRepresentationObjectSelectionModel rpSelectionModel)
          Redefine this method if you want to create your pop-up menu, knowing the selected representation objects in the view the menu is made for.
 IlpInteractionContext getInteractionContext()
          Returns the interaction context containing information needed to create the pop-up menu.
 IlpGraphicView getView()
          Returns the view in which the pop-up menu is to be displayed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlpAbstractPopupMenuFactory

public IlpAbstractPopupMenuFactory()
Method Detail

getInteractionContext

public IlpInteractionContext getInteractionContext()
Returns the interaction context containing information needed to create the pop-up menu.


getView

public IlpGraphicView getView()
Returns the view in which the pop-up menu is to be displayed.


createPopupMenu

public JPopupMenu createPopupMenu(IlpInteractionContext ctxt)
Delegates the menu creation to the method createPopupMenu(IlpRepresentationObjectSelectionModel) after having retrieved the selection model used by the view.

Specified by:
createPopupMenu in interface IlpPopupMenuFactory
Parameters:
ctxt - The interaction context that references the view for which the popup menu is to be created.

createPopupMenu

public JPopupMenu createPopupMenu(IlpRepresentationObjectSelectionModel rpSelectionModel)
Redefine this method if you want to create your pop-up menu, knowing the selected representation objects in the view the menu is made for.

Otherwise redefine the method createPopupMenu(IlpObjectSelectionModel).

Parameters:
rpSelectionModel - The selection model used by the view this menu is made for. This selection model allows you to find the selected representation objects.

createPopupMenu

public JPopupMenu createPopupMenu(IlpObjectSelectionModel ilpSelectionModel)
Redefine this method if you want to create your pop-up menu, knowing the selected business objects in the view the menu is made for.

By default this method returns an empty popup menu.

Parameters:
ilpSelectionModel - The selection model used by the view this menu is made for. This selection model allows you to find the selected business objects.


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