ilog.views.swing
Class IlvPopupMenuContext

java.lang.Object
  extended by ilog.views.swing.IlvPopupMenuContext

public class IlvPopupMenuContext
extends Object

The context of a popup menu that is managed by a IlvPopupMenuManager. The action listener of a popup menu can retrieve the context of the popup menu in order to decide how the action must be performed.

Since:
JViews 7.5
See Also:
IlvPopupMenuManager

Constructor Summary
IlvPopupMenuContext(IlvPoint point, JComponent component, IlvGraphic graphic, IlvTransformer transformer, IlvManagerView view)
          Creates a new popup menu context.
 
Method Summary
 JComponent getComponent()
          Returns the Swing component that triggered the popup menu.
 IlvGraphic getGraphic()
          Returns the graphic object that has the popup menu.
 IlvManagerView getManagerView()
          Returns the manager view that triggered the popup menu.
 IlvPoint getPoint()
          Returns the location of the mouse when the display of the popup menu was triggered (in view coordinates).
 IlvTransformer getTransformer()
          Returns the transformer that converts the coordinate system of the graphic object (the manager coordinates) into the coordinate system of the manager view in which the tooltip is about to be displayed (the view coordinates).
 MouseEvent getTriggerEvent()
          Returns the mouse event that triggered the display of the popup menu.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvPopupMenuContext

public IlvPopupMenuContext(IlvPoint point,
                           JComponent component,
                           IlvGraphic graphic,
                           IlvTransformer transformer,
                           IlvManagerView view)
Creates a new popup menu context.

Parameters:
point - The location of the mouse when the display of the popup menu was triggered (in view coordinates).
component - The Swing component that triggered the popup menu.
graphic - The graphic object that has the popup menu.
transformer - The transformer that converts the coordinate system of the graphic object (the manager coordinates) into the coordinate system of the manager view in which the tooltip is about to be displayed (the view coordinates).
view - The manager view that triggered the popup menu.
See Also:
IlvGraphic.setPopupMenu(javax.swing.JPopupMenu), IlvGraphic.setPopupMenuName(java.lang.String)
Method Detail

getPoint

public IlvPoint getPoint()
Returns the location of the mouse when the display of the popup menu was triggered (in view coordinates).


getComponent

public JComponent getComponent()
Returns the Swing component that triggered the popup menu.


getGraphic

public IlvGraphic getGraphic()
Returns the graphic object that has the popup menu. If the popup menu belongs to a graphic object displayed in the view, it returns this graphic object. If the popup menu belongs to the main manager of the view, it returns this manager. If the popup menu is triggered on a Swing component that does not contain a manager view, it returns null.

See Also:
IlvGraphic.setPopupMenu(javax.swing.JPopupMenu), IlvGraphic.setPopupMenuName(java.lang.String), getManagerView()

getTransformer

public IlvTransformer getTransformer()
Returns the transformer that converts the coordinate system of the graphic object (the manager coordinates) into the coordinate system of the manager view in which the tooltip is about to be displayed (the view coordinates). If the popup menu is triggered on a Swing component that does not contain a manager view, it returns null.

See Also:
getGraphic(), getManagerView()

getManagerView

public IlvManagerView getManagerView()
Returns the manager view that triggered the popup menu. If the popup menu is triggered on a Swing component that does not contain a manager view, it returns null.


getTriggerEvent

public MouseEvent getTriggerEvent()
Returns the mouse event that triggered the display of the popup menu.



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