ilog.tgo.composite
Class IltLogicalZoomPolicy

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

public class IltLogicalZoomPolicy
extends IltZoomPolicy

This class implements a logical zoom.

This is a display mode where the coordinates of the network elements change proportionally. The sizes of network elements are kept constant, whereas the sizes of groups change proportionally. Link layout is redone according to the modified coordinates and sizes.

The application can program additional actions in the framework of logical zoom, for example groups which are replaced with subnetworks when the user zooms in.

When the zoom factor is less than 1, i.e. during zoom out, this zoom policy will typically cause many objects to overlap. A zoom technique which produces nice displays also when zooming out is the IltMixedZoomPolicy.

Since:
JTGO 2.0
See Also:
IltMixedZoomPolicy

Field Summary
protected  double _additionalZoom
           
protected  IlvManagerView _targetView
           
 
Fields inherited from class ilog.tgo.composite.IltZoomPolicy
_ilvmanager, _manager
 
Constructor Summary
IltLogicalZoomPolicy()
          Creates a new zoom policy instance which implements logical zoom.
 
Method Summary
 void attachView(IlvManagerView view)
          This method is called when a view is added to the manager to which this instance is attached.
protected  void changeZoomTransformer(IlvTransformer oldtr, IlvTransformer newtr, IlvTransformer oldtrl, IlvTransformer newtrl)
          Change the zoom transformer from oldtrl to newtrl.
protected  IlvTransformer computeZoomTransformer(IlvTransformer t)
          Compute the appropriate zoom transformer for a given view transformer.
 void detachView(IlvManagerView view)
          This method is called when a view is removed from the manager to which this instance is attached.
 boolean equals(Object o)
           
 double getAdditionalZoom()
          Returns the additional zoom factor.
 IlvTransformer getGraphLayoutTransformer(IlvManager subgrapher)
          Returns the reference transformer for a graph layout in a subgrapher.
 IlvManagerView getTargetView()
          Returns the target view.
 void setAdditionalZoom(double factor)
          Sets the additional zoom factor.
 void setTargetView(IlvManagerView view)
          Sets the target view.
 void zoomTransformerChanged(IlvManagerView view, IlvTransformer oldtr, IlvTransformer newtr)
          When the zoom transformer changes, the ILOG JTGO objects are modified in such a way that the size of network elements remains the same.
 
Methods inherited from class ilog.tgo.composite.IltZoomPolicy
applyTransformerToManagerContents, attach, detach, getManager, getVisibilityThreshold, setManager
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_targetView

protected IlvManagerView _targetView
Internal method or field: do not use!

_additionalZoom

protected double _additionalZoom
Internal method or field: do not use!
Constructor Detail

IltLogicalZoomPolicy

public IltLogicalZoomPolicy()
Creates a new zoom policy instance which implements logical zoom.

This is a display mode where the coordinates of the network elements change proportionally. The sizes of network elements are kept constant, whereas the sizes of groups change proportionally. Link layout is redone according to the modified coordinates and sizes.

Since:
JTGO 2.0
Method Detail

getTargetView

public IlvManagerView getTargetView()
Returns the target view.


setTargetView

public void setTargetView(IlvManagerView view)
Sets the target view. If a target view already exists, it is replaced, i.e., it becomes a secondary view.

Note: The target view should be one of the views attached to the manager to which this zoom policy belongs. If it is not, the zoom policy is detached from its manager and attached to the view's manager instead.


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
Overrides:
attachView in class IltZoomPolicy

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
Overrides:
detachView in class IltZoomPolicy

getAdditionalZoom

public double getAdditionalZoom()
Returns the additional zoom factor.

See Also:
setAdditionalZoom(double)

setAdditionalZoom

public void setAdditionalZoom(double factor)
Sets the additional zoom factor.

When computeZoomTransformer() is used to decide about the logical zoom level, the additional zoom factor is implicitly multiplied with the view's transformer.

This can be useful when printing with unusual transformers.

See Also:
IltcCompositeManager.getZoomTransformer(), IlvManagerView.getTransformer()

computeZoomTransformer

protected IlvTransformer computeZoomTransformer(IlvTransformer t)
Compute the appropriate zoom transformer for a given view transformer.

Internal method or field: do not use!

changeZoomTransformer

protected void changeZoomTransformer(IlvTransformer oldtr,
                                     IlvTransformer newtr,
                                     IlvTransformer oldtrl,
                                     IlvTransformer newtrl)
Change the zoom transformer from oldtrl to newtrl. NB: All four arguments are non-null.

Internal method or field: do not use!

zoomTransformerChanged

public void zoomTransformerChanged(IlvManagerView view,
                                   IlvTransformer oldtr,
                                   IlvTransformer newtr)
When the zoom transformer changes, the ILOG JTGO objects are modified in such a way that the size of network elements remains the same.

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

getGraphLayoutTransformer

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

This method is used by IltGrapherAdapter.

Specified by:
getGraphLayoutTransformer in class IltZoomPolicy
Parameters:
subgrapher - The top level grapher or one of its subgraphers.

equals

public boolean equals(Object o)
Overrides:
equals in class Object
Since:
JViews 7.5


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