ilog.tgo.composite
Class IltZoomPolicy

java.lang.Object
  extended by ilog.tgo.composite.IltZoomPolicy
All Implemented Interfaces:
IlpZoomPolicy
Direct Known Subclasses:
IltLogicalZoomPolicy, IltPhysicalZoomPolicy

public abstract class IltZoomPolicy
extends Object
implements IlpZoomPolicy

This class controls the behavior of the zoom on ILOG JTGO views. Subclasses exist that provide physical and logical zooms. An instance of this class is associated with every IlvManager instance. It receives an event when the zoom transformer of any view changes.

Since:
JTGO 2.0

Field Summary
protected  IlvManager _ilvmanager
          Its underlying IlvManager.
protected  IltcCompositeManager _manager
          The manager whose zoom we manage.
 
Constructor Summary
protected IltZoomPolicy()
          Creates a new zoom policy instance.
 
Method Summary
 void applyTransformerToManagerContents(IlvTransformer t)
          This is a utility function which applies a given transformer to the ILOG JTGO objects in a manager.
 void attach()
          This method is called when the policy is attached to a manager.
 void attachView(IlvManagerView view)
          This method is called when a view is added to the manager to which this instance is attached.
 void detach()
          This method is called when the policy is detached from its manager.
 void detachView(IlvManagerView view)
          This method is called when a view is removed from the manager to which this instance is attached.
abstract  IlvTransformer getGraphLayoutTransformer(IlvManager subgrapher)
          Returns the reference transformer for a graph layout in a subgrapher.
 IltcCompositeManager getManager()
          Returns the IltcCompositeManager to which this instance is attached.
 double[] getVisibilityThreshold(String name)
          This method is overridden in the zoom policy subclasses that support visibility threshold on decorations.
 void setManager(IltcCompositeManager manager)
          Attaches this instance to an IltcCompositeManager.
abstract  void zoomTransformerChanged(IlvManagerView view, IlvTransformer oldTransformer, IlvTransformer newTransformer)
          This function is called when a zoom change occurs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_manager

protected IltcCompositeManager _manager
The manager whose zoom we manage. Null outside of attach()..detach() periods.

Internal method or field: do not use!

_ilvmanager

protected IlvManager _ilvmanager
Its underlying IlvManager. Null outside of attach()..detach() periods.

Internal method or field: do not use!
Constructor Detail

IltZoomPolicy

protected IltZoomPolicy()
Creates a new zoom policy instance.

Since:
JTGO 2.0
Method Detail

getManager

public IltcCompositeManager getManager()
Returns the IltcCompositeManager to which this instance is attached.


setManager

public void setManager(IltcCompositeManager manager)
Attaches this instance to an IltcCompositeManager. If it was previously attached to another IltcCompositeManager, it is first detached. If the IltcCompositeManager argument already has a zoom policy, it is removed.


attach

public void attach()
This method is called when the policy is attached to a manager. The manager is already accessible as getManager(). You should not call this method directly.

Specified by:
attach in interface IlpZoomPolicy

detach

public void detach()
This method is called when the policy is detached from its manager. The manager is still accessible as getManager(). You should not call this method directly.

Specified by:
detach in interface IlpZoomPolicy

attachView

public void attachView(IlvManagerView view)
This method is called when a view is added to the manager to which this instance is attached.

Specified by:
attachView in interface IlpZoomPolicy

detachView

public void detachView(IlvManagerView view)
This method is called when a view is removed from the manager to which this instance is attached.

Specified by:
detachView in interface IlpZoomPolicy

zoomTransformerChanged

public abstract void zoomTransformerChanged(IlvManagerView view,
                                            IlvTransformer oldTransformer,
                                            IlvTransformer newTransformer)
This function is called when a zoom change occurs. You should not call this method directly.

Specified by:
zoomTransformerChanged in interface IlpZoomPolicy
Parameters:
view - the target view
oldTransformer - the manager's old zoom transformer
newTransformer - the manager's new zoom transformer
See Also:
IltcCompositeManager.getZoomTransformer()

applyTransformerToManagerContents

public void applyTransformerToManagerContents(IlvTransformer t)
This is a utility function which applies a given transformer to the ILOG JTGO objects in a manager. Non-JTGO objects are not affected.

Parameters:
t - transformer to apply to the manager contents

getGraphLayoutTransformer

public abstract IlvTransformer getGraphLayoutTransformer(IlvManager subgrapher)
Returns the reference transformer for a graph layout in a subgrapher.

This function is used by IltGrapherAdapter.

Parameters:
subgrapher - The top level grapher or one of its subgraphers.

getVisibilityThreshold

public double[] getVisibilityThreshold(String name)
This method is overridden in the zoom policy subclasses that support visibility threshold on decorations.

Internal method or field: do not use!


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