ilog.cpl.interactor
Class IlpDefaultInteractionContext

java.lang.Object
  extended by ilog.cpl.interactor.IlpDefaultInteractionContext
All Implemented Interfaces:
IlpInteractionContext
Direct Known Subclasses:
IlpDefaultObjectInteractionContext, IlpDefaultViewInteractionContext

public class IlpDefaultInteractionContext
extends Object
implements IlpInteractionContext

Default implementation for IlpInteractionContext. Describes the context of user interactions. An interaction context is used to store contextual information about the events that an IlpGraphicController delegates to an IlpInteractor. It is dedicated to a view.

Since:
JTGO 3.0
See Also:
IlpInteractionContext, IlpGraphicController, IlpInteractor, IlpAbstractInteractor

Constructor Summary
IlpDefaultInteractionContext(IlpGraphicView view)
          Constructs an interaction context dedicated to a view.
 
Method Summary
 IlpPoint getPosition()
          Returns the location where a gesture ended, in view coordinates.
 IlpGraphicView getView()
          Returns the graphic view.
 void reset()
          Resets the context as follows: Sets position to null
 void setPosition(IlpPoint position)
          Sets the location where a gesture ended, in view coordinates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlpDefaultInteractionContext

public IlpDefaultInteractionContext(IlpGraphicView view)
Constructs an interaction context dedicated to a view.

Parameters:
view - The view this context is dedicated to.
Throws:
IllegalArgumentException - if the given view is null.
Method Detail

getView

public IlpGraphicView getView()
Returns the graphic view.

Specified by:
getView in interface IlpInteractionContext
Returns:
Graphic view

getPosition

public IlpPoint getPosition()
Returns the location where a gesture ended, in view coordinates. Is null until a complete gesture has been recognized.

Specified by:
getPosition in interface IlpInteractionContext
See Also:
setPosition(ilog.cpl.graphic.IlpPoint)

setPosition

public void setPosition(IlpPoint position)
Sets the location where a gesture ended, in view coordinates.

Specified by:
setPosition in interface IlpInteractionContext
Parameters:
position - The location where the gesture ended.
See Also:
getPosition()

reset

public void reset()
Resets the context as follows:

Specified by:
reset in interface IlpInteractionContext


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