public class IltMixedZoomPolicy extends IltLogicalZoomPolicy
Here the zoom factor of a transformer is the square root of the absolute value of its determinant.
The default value of the determinant threshold is 1.
IltPhysicalZoomPolicy
,
IltLogicalZoomPolicy
_additionalZoom, _targetView
_ilvmanager, _manager
Constructor and Description |
---|
IltMixedZoomPolicy()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
void |
attach()
This method is called when the policy is attached to a manager.
|
protected IlvTransformer |
computeZoomTransformer(IlvTransformer t)
The mixed zoom is realized as follows:
It all depends on the target view's transformer tt, more precisely on its
scale factor (i.e.
|
void |
detach()
This method is called when the policy is detached from its manager.
|
boolean |
equals(Object o)
Compares two objects.
|
String[] |
getDecorationNames()
Returns the names of the decorations that may have visibility thresholds
specified in this zoom policy.
|
String |
getDecorationNames(int index)
Returns the name of the decoration at a given index in the list of names
of decorations that may have visibility thresholds specified in this zoom
policy.
|
double |
getSubNetworkZoomFactor()
Returns the additional zoom factor applied to subnetworks.
|
double[] |
getVisibilityThreshold(String name)
Returns the visibility thresholds defined in this zoom policy
for a given decoration name.
|
double[] |
getVisibilityThresholds()
Returns the list of all visibility thresholds defined in
this zoom policy.
|
double |
getVisibilityThresholds(int index)
Returns the visibility thresholds defined in this zoom policy
for a given decoration name.
|
double |
getZoomThreshold()
Returns the value of the determinant threshold.
|
void |
setDecorationNames(int index,
String key)
Sets the name for one of the decorations that have visibility thresholds
specified in this zoom policy.
|
void |
setDecorationNames(String[] keys)
Sets the names of the decorations that have visibility thresholds
specified in this zoom policy.
|
void |
setSubNetworkZoomFactor(double subnetworkZoomFactor)
Sets the additional zoom factor that gets applied to expanded subnetworks.
|
void |
setVisibilityThresholds(double[] visibilityThresholds)
Sets the visibility thresholds below which decorations with specific
names are automatically hidden.
|
void |
setVisibilityThresholds(int index,
double visibilityThreshold)
Sets the visibility thresholds below which decorations with a specific
name are automatically hidden.
|
void |
setZoomThreshold(double threshold)
Sets the value of the zoom threshold determining when the physical
zoom policy or the logical zoom policy must be used.
|
attachView, changeZoomTransformer, detachView, getAdditionalZoom, getGraphLayoutTransformer, getTargetView, setAdditionalZoom, setTargetView, zoomTransformerChanged
applyTransformerToManagerContents, getManager, setManager
protected IlvTransformer computeZoomTransformer(IlvTransformer t)
computeZoomTransformer
in class IltLogicalZoomPolicy
public double getZoomThreshold()
public void setZoomThreshold(double threshold)
The default threshold is 1.
public double getSubNetworkZoomFactor()
public void setSubNetworkZoomFactor(double subnetworkZoomFactor)
public void attach()
attach
in interface IlpZoomPolicy
attach
in class IltZoomPolicy
public void detach()
detach
in interface IlpZoomPolicy
detach
in class IltZoomPolicy
public void setDecorationNames(String[] keys)
See IltGraphicElementName
for the
list of decoration names.
See IltrZoom.SetVisibilityThreshold(ilog.tgo.graphic.IltGraphicElementName, double)
for an explanation of visibility thresholds.
keys
- The decoration names.public void setDecorationNames(int index, String key) throws ArrayIndexOutOfBoundsException
See IltGraphicElementName
for the
list of decoration names.
See IltrZoom.SetVisibilityThreshold(ilog.tgo.graphic.IltGraphicElementName, double)
for an explanation of visibility thresholds.
index
- The index of the key being set.key
- The key value.ArrayIndexOutOfBoundsException
public String[] getDecorationNames()
public String getDecorationNames(int index) throws ArrayIndexOutOfBoundsException
index
- The index of the decoration name to be retrieved.index
.ArrayIndexOutOfBoundsException
public void setVisibilityThresholds(double[] visibilityThresholds)
The indices of the visibility thresholds in this array must match the indices in the decoration name array.
Refer to IltrZoom.SetVisibilityThreshold(ilog.tgo.graphic.IltGraphicElementName, double)
for an explanation of visibility thresholds.
A visibility setting in this zoom policy overrides the corresponding global setting.
visibilityThresholds
- Visibility thresholds, in the same order as
the specified decoration names.setDecorationNames(java.lang.String[])
,
IltrZoom.SetVisibilityThreshold(ilog.tgo.graphic.IltGraphicElementName, double)
public void setVisibilityThresholds(int index, double visibilityThreshold) throws ArrayIndexOutOfBoundsException
The decorations that are hidden are the ones that are identified by the decoration name that is positioned AT the same index in the decoration name structure.
See IltrZoom.SetVisibilityThreshold(ilog.tgo.graphic.IltGraphicElementName, double)
for an explanation of visibility thresholds.
A visibility setting in this zoom policy overrides the corresponding global setting.
index
- The index of the value being set.visibilityThreshold
- The visibility threshold.ArrayIndexOutOfBoundsException
setDecorationNames(java.lang.String[])
,
IltrZoom.SetVisibilityThreshold(ilog.tgo.graphic.IltGraphicElementName, double)
public double[] getVisibilityThresholds()
See IltrZoom.SetVisibilityThreshold(ilog.tgo.graphic.IltGraphicElementName, double)
for an explanation of visibility thresholds.
setVisibilityThresholds(int, double)
public double getVisibilityThresholds(int index) throws ArrayIndexOutOfBoundsException
setDecorationNames(int, String)
for more
information.
See IltrZoom.SetVisibilityThreshold(ilog.tgo.graphic.IltGraphicElementName, double)
for an explanation of visibility thresholds.
index
- The index in the list of decoration names.ArrayIndexOutOfBoundsException
public double[] getVisibilityThreshold(String 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
.
Refer to IltrZoom.SetVisibilityThreshold(ilog.tgo.graphic.IltGraphicElementName, double)
for an explanation of visibility thresholds.
getVisibilityThreshold
in class IltZoomPolicy
name
- Decoration namesetDecorationNames(java.lang.String[])
,
setVisibilityThresholds(double[])
public boolean equals(Object o)
IltLogicalZoomPolicy
equals
in class IltLogicalZoomPolicy
o
- The object to compare totrue
if the object is the same as this object
false
otherwise© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.