ilog.cpl.interactor
Class IlpDefaultObjectInteractionContext

java.lang.Object
  extended by ilog.cpl.interactor.IlpDefaultInteractionContext
      extended by ilog.cpl.interactor.IlpDefaultObjectInteractionContext
All Implemented Interfaces:
IlpInteractionContext, IlpObjectInteractionContext

public class IlpDefaultObjectInteractionContext
extends IlpDefaultInteractionContext
implements IlpObjectInteractionContext

Provides a default implementation of IlpObjectInteractionContext. An object interaction context is used to store contextual information about the events that occur over a single object. This object can be an IlpGraphic representing an IlpRepresentationObject or directly an IlpRepresentationObject.

Since:
JTGO 3.0
See Also:
IlpObjectInteractionContext, IlpDefaultInteractionContext, IlpGraphic, IlpRepresentationObject

Constructor Summary
IlpDefaultObjectInteractionContext(IlpGraphicView view, IlpGraphic graphic)
          Constructs an interaction context dedicated to a view and a single object in this view.
IlpDefaultObjectInteractionContext(IlpGraphicView view, IlpGraphic graphic, AWTEvent event)
          Constructs an interaction context dedicated to a view and a single object in this view.
IlpDefaultObjectInteractionContext(IlpGraphicView view, IlpRepresentationObject representationObject)
          Constructs an interaction context dedicated to a view and a single object in this view.
IlpDefaultObjectInteractionContext(IlpGraphicView view, IlpRepresentationObject representationObject, IlpAttribute attribute)
          Constructs an interaction context dedicated to a view, a single object and a single attribute in this view.
IlpDefaultObjectInteractionContext(IlpGraphicView view, IlpRepresentationObject ro, IlpGraphic graphic, AWTEvent event)
          Constructs an interaction context dedicated to a view and a single object in this view.
 
Method Summary
 IlpAttribute getAttribute()
          Returns the attribute on which the interaction occurs.
 IlpGraphic getGraphic()
          Returns the graphic object on which the interaction occurs.
 IlpRepresentationObject getRepresentationObject()
          Returns the representation object on which the interaction occurred.
 
Methods inherited from class ilog.cpl.interactor.IlpDefaultInteractionContext
getPosition, getView, reset, setPosition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ilog.cpl.interactor.IlpInteractionContext
getPosition, getView, reset, setPosition
 

Constructor Detail

IlpDefaultObjectInteractionContext

public IlpDefaultObjectInteractionContext(IlpGraphicView view,
                                          IlpRepresentationObject representationObject)
Constructs an interaction context dedicated to a view and a single object in this view.

Parameters:
view - The view this context is dedicated to.
representationObject - The representation object this context is dedicated to.
Throws:
IllegalArgumentException - if the given view is null.
IllegalArgumentException - if the given representation object is null.

IlpDefaultObjectInteractionContext

public IlpDefaultObjectInteractionContext(IlpGraphicView view,
                                          IlpRepresentationObject representationObject,
                                          IlpAttribute attribute)
Constructs an interaction context dedicated to a view, a single object and a single attribute in this view.

Parameters:
view - The view this context is dedicated to.
representationObject - The representation object this context is dedicated to.
attribute - The business attribute
Throws:
IllegalArgumentException - if the given view is null.
IllegalArgumentException - if the given representation object is null.

IlpDefaultObjectInteractionContext

public IlpDefaultObjectInteractionContext(IlpGraphicView view,
                                          IlpGraphic graphic)
Constructs an interaction context dedicated to a view and a single object in this view.

Parameters:
view - The view this context is dedicated to.
graphic - The graphic representation of the object this context is dedicated to.
Throws:
IllegalArgumentException - if the given view is null.
IllegalArgumentException - if the given graphic is null.

IlpDefaultObjectInteractionContext

public IlpDefaultObjectInteractionContext(IlpGraphicView view,
                                          IlpGraphic graphic,
                                          AWTEvent event)
Constructs an interaction context dedicated to a view and a single object in this view.

Parameters:
view - the view this context is dedicated to
graphic - the graphic representation of the object this context is dedicated to
event - event used to initialized the position where the interaction occurred
Throws:
IllegalArgumentException - if the given view is null
IllegalArgumentException - if the given graphic is null
See Also:
IlpInteractionContext.setPosition(ilog.cpl.graphic.IlpPoint)

IlpDefaultObjectInteractionContext

public IlpDefaultObjectInteractionContext(IlpGraphicView view,
                                          IlpRepresentationObject ro,
                                          IlpGraphic graphic,
                                          AWTEvent event)
Constructs an interaction context dedicated to a view and a single object in this view.

Parameters:
view - The view where the event has occurred
ro - The representation object
graphic - The graphic representation of the object
event - The event used to initialize the position where the interaction occurred
Throws:
IllegalArgumentException - if the given view is null
IllegalArgumentException - if the given graphic is null
Since:
JViews 7.5
See Also:
IlpInteractionContext.setPosition(ilog.cpl.graphic.IlpPoint)
Method Detail

getRepresentationObject

public IlpRepresentationObject getRepresentationObject()
Returns the representation object on which the interaction occurred.

Specified by:
getRepresentationObject in interface IlpObjectInteractionContext

getGraphic

public IlpGraphic getGraphic()
Returns the graphic object on which the interaction occurs.

Returns null if the representation object is not graphically represented with an IlpGraphic.

Specified by:
getGraphic in interface IlpObjectInteractionContext

getAttribute

public IlpAttribute getAttribute()
Returns the attribute on which the interaction occurs.

Specified by:
getAttribute in interface IlpObjectInteractionContext


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