public class IltPhysicalZoomPolicy extends IltZoomPolicy
This is a display mode where the sizes and coordinates of all objects change proportionally with a zoom factor.
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
.
IltMixedZoomPolicy
_ilvmanager, _manager
Constructor and Description |
---|
IltPhysicalZoomPolicy()
Creates a new zoom policy instance that implements physical zoom.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
Compares two objects.
|
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 JTGO objects are modified
in such a way that the size of network elements remains the same.
|
applyTransformerToManagerContents, attach, attachView, detach, detachView, getManager, setManager
public IltPhysicalZoomPolicy()
This is a display mode where the sizes and coordinates of all objects change proportionally with a zoom factor.
public boolean equals(Object o)
public void zoomTransformerChanged(IlvManagerView view, IlvTransformer oldTransformer, IlvTransformer newTransformer)
zoomTransformerChanged
in interface IlpZoomPolicy
zoomTransformerChanged
in class IltZoomPolicy
view
- the target viewoldTransformer
- the manager's old zoom transformernewTransformer
- the manager's new zoom transformerIltcCompositeManager.getZoomTransformer()
public IlvTransformer getGraphLayoutTransformer(IlvManager subgrapher)
This method is used by IltGrapherAdapter
.
getGraphLayoutTransformer
in class IltZoomPolicy
subgrapher
- The top level grapher or one of its subgraphers.public void setDecorationNames(String[] k)
Refer to IltGraphicElementName
for the
list of decoration names.
k
- Decoration names.public void setDecorationNames(int index, String key) throws ArrayIndexOutOfBoundsException
Refer to IltGraphicElementName
for the
list of decoration names.
index
- Index of the key being set.key
- Key value.ArrayIndexOutOfBoundsException
public String[] getDecorationNames()
public String getDecorationNames(int index) throws ArrayIndexOutOfBoundsException
index
- The index of the property to be retrieved.ArrayIndexOutOfBoundsException
public void setVisibilityThresholds(double[] k)
The index of the visibility threshold in this array must match the index in the decoration name array.
k
- Visibility thresholdssetDecorationNames(java.lang.String[])
public void setVisibilityThresholds(int index, double v) throws ArrayIndexOutOfBoundsException
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.
index
- The index of the value being set.v
- The visibility threshold.ArrayIndexOutOfBoundsException
setDecorationNames(java.lang.String[])
public double[] getVisibilityThresholds()
public double getVisibilityThresholds(int index) throws ArrayIndexOutOfBoundsException
index
- Index of the property to be retrieved.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
.
getVisibilityThreshold
in class IltZoomPolicy
name
- Decoration namesetDecorationNames(java.lang.String[])
,
setVisibilityThresholds(double[])
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.