ilog.views.graphic
Class IlvGraphicHandleInteractor

java.lang.Object
  extended by ilog.views.IlvObjectInteractor
      extended by ilog.views.graphic.IlvGraphicHandleInteractor
All Implemented Interfaces:
Serializable

public class IlvGraphicHandleInteractor
extends IlvObjectInteractor

This class is an object interactor that delegates to another object interactor. It allows to adapt the coordinate system so that the delegated object interactor can run in another coordinate system, the virtual view coordinate system. This is used by IlvGraphicHandleSelection.

Since:
JViews 8.0
See Also:
Serialized Form

Constructor Summary
IlvGraphicHandleInteractor()
          Creates a new IlvGraphicHandleInteractor.
 
Method Summary
protected  boolean acceptObject(IlvGraphic obj)
          Returns whether the interactor should deal with the object.
protected  IlvTransformer getVirtualToRealViewTransformer(IlvGraphicHandleSelection obj, IlvTransformer t)
          Deprecated. Use getVirtualToRealViewTransformer(IlvGraphic, IlvTransformer).
protected  IlvTransformer getVirtualToRealViewTransformer(IlvGraphic obj, IlvTransformer t)
          Returns the transformer that converts the virtual view coordinate system to the real view coordinate system.
protected  IlvTransformer getVirtualViewTransformer(IlvGraphicHandleSelection obj, IlvTransformer t)
          Deprecated. Use getVirtualViewTransformer(IlvGraphic, IlvTransformer).
protected  IlvTransformer getVirtualViewTransformer(IlvGraphic obj, IlvTransformer t)
          Returns the transformer that converts the manager coordinate system of the wrapped object into a virtual view coordinate system.
 void handleExpose(IlvGraphic obj, Graphics g, IlvObjectInteractorContext context)
          Called by the view when the view is drawn.
 boolean processEvent(IlvGraphic obj, AWTEvent event, IlvObjectInteractorContext context)
          Processes the events.
 
Methods inherited from class ilog.views.IlvObjectInteractor
Get, onEnter, onExit, Put
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvGraphicHandleInteractor

public IlvGraphicHandleInteractor()
Creates a new IlvGraphicHandleInteractor.

Method Detail

acceptObject

protected boolean acceptObject(IlvGraphic obj)
Returns whether the interactor should deal with the object. The default implementation returns true for objects of type IlvGraphicHandleSelection

Since:
JViews 8.1

processEvent

public boolean processEvent(IlvGraphic obj,
                            AWTEvent event,
                            IlvObjectInteractorContext context)
Processes the events.

Specified by:
processEvent in class IlvObjectInteractor
Parameters:
obj - The graphic object.
event - The event to process.
context - The context in which the event occurred.
Returns:
true if the event was handled by this processEvent invocation, false otherwise.

handleExpose

public void handleExpose(IlvGraphic obj,
                         Graphics g,
                         IlvObjectInteractorContext context)
Called by the view when the view is drawn. You normally do not need to call it.

Overrides:
handleExpose in class IlvObjectInteractor
Parameters:
obj - The graphic object to which the object interactor is associated.
g - The Graphics where obj is drawn.
context - The interactor context.

getVirtualViewTransformer

protected IlvTransformer getVirtualViewTransformer(IlvGraphic obj,
                                                   IlvTransformer t)
Returns the transformer that converts the manager coordinate system of the wrapped object into a virtual view coordinate system. This allows to draw wrapped objects in a virtual view that has a different transformer than the real view. The input transformer is the transformer of the real view. If no virtual view is needed, the method returns the real view transformer.

The default implementation works for objects of type IlvGraphicHandleSelection. The method can be overridden to work for other objects.

Parameters:
obj - The graphic object to which the object interactor is associated.
t - The transformer of the real view.
Returns:
The transformer of the virtual view.
Since:
JViews 8.1

getVirtualViewTransformer

protected IlvTransformer getVirtualViewTransformer(IlvGraphicHandleSelection obj,
                                                   IlvTransformer t)
Deprecated. Use getVirtualViewTransformer(IlvGraphic, IlvTransformer).

Returns the transformer that converts the manager coordinate system of the wrapped object into a virtual view coordinate system.

Parameters:
obj - The graphic object to which the object interactor is associated.
t - The transformer of the real view.
Returns:
The transformer of the virtual view.

getVirtualToRealViewTransformer

protected IlvTransformer getVirtualToRealViewTransformer(IlvGraphic obj,
                                                         IlvTransformer t)
Returns the transformer that converts the virtual view coordinate system to the real view coordinate system. This allows to draw wrapped objects in a virtual view that has a different transformer than the real view. The input transformer is the transformer of the real view. If no virtual view is needed, the method returns the identity transformer.

The default implementation works for objects of type IlvGraphicHandleSelection. The method can be overridden to work for other objects.

Parameters:
obj - The graphic object to which the object interactor is associated.
t - The transformer of the real view.
Returns:
The transformer that transforms the real view to the virtual view.
Since:
JViews 8.1

getVirtualToRealViewTransformer

protected IlvTransformer getVirtualToRealViewTransformer(IlvGraphicHandleSelection obj,
                                                         IlvTransformer t)
Deprecated. Use getVirtualToRealViewTransformer(IlvGraphic, IlvTransformer).

Returns the transformer that converts the virtual view coordinate system to the real view coordinate system.

Parameters:
obj - The graphic object to which the object interactor is associated.
t - The transformer of the real view.
Returns:
The transformer that transforms the real view to the virtual view.


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