ilog.tgo.composite
Class IltPhysicalZoomPolicy

java.lang.Object
  extended by ilog.tgo.composite.IltZoomPolicy
      extended by ilog.tgo.composite.IltPhysicalZoomPolicy
All Implemented Interfaces:
IlpZoomPolicy

public class IltPhysicalZoomPolicy
extends IltZoomPolicy

This class implements a physical zoom.

This is a display mode where the sizes and coordinates of all objects change proportionally with a zoom factor.

ILOG JTGO supports this zoom technique only for zoom factors less than 1, i.e., for zoom out, not zoom in.

A zoom technique which works fine also for zoom factors less than 1 is the IltMixedZoomPolicy.

Since:
JTGO 2.0
See Also:
IltMixedZoomPolicy

Field Summary
 
Fields inherited from class ilog.tgo.composite.IltZoomPolicy
_ilvmanager, _manager
 
Constructor Summary
IltPhysicalZoomPolicy()
          Creates a new zoom policy instance that implements physical zoom.
 
Method Summary
 boolean equals(Object o)
           
 String[] getDecorationNames()
          Returns the names of the decorations that are handled by this zoom policy.
 String getDecorationNames(int index)
          Returns the name of the decoration that is placed in the given index.
 IlvTransformer getGraphLayoutTransformer(IlvManager subgrapher)
          Returns the reference transformer for a graph layout in a subgrapher.
 double[] getVisibilityThreshold(String name)
          Returns the visibility threshold for the given decoration name.
 double[] getVisibilityThresholds()
          Returns list of all visibility thresholds defined in this zoom policy.
 double getVisibilityThresholds(int index)
          Returns the value present in the value map at the given index.
 void setDecorationNames(int index, String key)
          Sets the names of the decorations that are handled by this zoom policy.
 void setDecorationNames(String[] k)
          Sets the names of the decorations that are handled by this zoom policy.
 void setVisibilityThresholds(double[] k)
          Sets the threshold below which the decoration will be automatically hidden.
 void setVisibilityThresholds(int index, double v)
          Sets the threshold below which the decorations are hidden.
 void zoomTransformerChanged(IlvManagerView view, IlvTransformer oldTransformer, IlvTransformer newTransformer)
          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, attachView, detach, detachView, getManager, setManager
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IltPhysicalZoomPolicy

public IltPhysicalZoomPolicy()
Creates a new zoom policy instance that implements physical zoom.

This is a display mode where the sizes and coordinates of all objects change proportionally with a zoom factor.

Since:
JTGO 2.0
Method Detail

equals

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

zoomTransformerChanged

public void zoomTransformerChanged(IlvManagerView view,
                                   IlvTransformer oldTransformer,
                                   IlvTransformer newTransformer)
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
oldTransformer - the manager's old zoom transformer
newTransformer - 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.

setDecorationNames

public void setDecorationNames(String[] k)
Sets the names of the decorations that are handled by this zoom policy. The decoration names are used to customize the zoom level below which the corresponding decorations are automatically hidden.

Refer to IltGraphicElementName for the list of decoration names.

Parameters:
k - Decoration names.
Since:
JTGO 4.0

setDecorationNames

public void setDecorationNames(int index,
                               String key)
                        throws ArrayIndexOutOfBoundsException
Sets the names of the decorations that are handled by this zoom policy. The decoration names are used to customize the zoom level below which the corresponding decorations are automatically hidden.

Refer to IltGraphicElementName for the list of decoration names.

Parameters:
index - Index of the key being set.
key - Key value.
Throws:
ArrayIndexOutOfBoundsException
Since:
JTGO 4.0

getDecorationNames

public String[] getDecorationNames()
Returns the names of the decorations that are handled by this zoom policy.

Returns:
An array with the decoration names.
Since:
JTGO 4.0

getDecorationNames

public String getDecorationNames(int index)
                          throws ArrayIndexOutOfBoundsException
Returns the name of the decoration that is placed in the given index.

Parameters:
index - The index of the property to be retrieved.
Returns:
The decoration name that is defined in the given index.
Throws:
ArrayIndexOutOfBoundsException
Since:
JTGO 4.0

setVisibilityThresholds

public void setVisibilityThresholds(double[] k)
Sets the threshold below which the decoration will be automatically hidden.

The index of the visibility threshold in this array must match the index in the decoration name array.

Parameters:
k - Visibility thresholds
See Also:
setDecorationNames(java.lang.String[])
Internal method or field: do not use!

setVisibilityThresholds

public void setVisibilityThresholds(int index,
                                    double v)
                             throws ArrayIndexOutOfBoundsException
Sets the threshold below which the decorations are hidden.

The decorations that are hidden are identified by the decoration name. The decoration name is positioned in the same index, in the decoration name structure.

Parameters:
index - The index of the value being set.
v - The visibility threshold.
Throws:
ArrayIndexOutOfBoundsException
Since:
JTGO 4.0
See Also:
setDecorationNames(java.lang.String[])

getVisibilityThresholds

public double[] getVisibilityThresholds()
Returns list of all visibility thresholds defined in this zoom policy.

Returns:
Visibility threshold list.

getVisibilityThresholds

public double getVisibilityThresholds(int index)
                               throws ArrayIndexOutOfBoundsException
Returns the value present in the value map at the given index.

Parameters:
index - Index of the property to be retrieved.
Returns:
Key that is defined at the given index
Throws:
ArrayIndexOutOfBoundsException

getVisibilityThreshold

public double[] getVisibilityThreshold(String name)
Returns the visibility threshold for the given decoration name.

The value returned has been previously registered in this zoom policy using setVisibilityThresholds(double[]). If the value has not been registered, or if the given name does not correspond to a valid decoration name, this method returns null.

Overrides:
getVisibilityThreshold in class IltZoomPolicy
Parameters:
name - Decoration name
Returns:
Visibility threshold
See Also:
setDecorationNames(java.lang.String[]), setVisibilityThresholds(double[])
Internal method or field: do not use!


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