public class IltLogicalZoomPolicy extends IltZoomPolicy
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
.
IltMixedZoomPolicy
Modifier and Type | Field and Description |
---|---|
protected double |
_additionalZoom |
protected IlvManagerView |
_targetView |
_ilvmanager, _manager
Constructor and Description |
---|
IltLogicalZoomPolicy()
Creates a new zoom policy instance which implements logical
zoom.
|
Modifier and Type | Method and Description |
---|---|
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)
Compares two objects.
|
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 JTGO objects are modified
in such a way that the size of network elements remains the same.
|
applyTransformerToManagerContents, attach, detach, getManager, getVisibilityThreshold, setManager
protected IlvManagerView _targetView
protected double _additionalZoom
public IltLogicalZoomPolicy()
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.
public IlvManagerView getTargetView()
public void setTargetView(IlvManagerView 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.
public void attachView(IlvManagerView view)
attachView
in interface IlpZoomPolicy
attachView
in class IltZoomPolicy
public void detachView(IlvManagerView view)
detachView
in interface IlpZoomPolicy
detachView
in class IltZoomPolicy
public double getAdditionalZoom()
setAdditionalZoom(double)
public void setAdditionalZoom(double 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.
protected IlvTransformer computeZoomTransformer(IlvTransformer t)
protected void changeZoomTransformer(IlvTransformer oldtr, IlvTransformer newtr, IlvTransformer oldtrl, IlvTransformer newtrl)
public void zoomTransformerChanged(IlvManagerView view, IlvTransformer oldtr, IlvTransformer newtr)
zoomTransformerChanged
in interface IlpZoomPolicy
zoomTransformerChanged
in class IltZoomPolicy
view
- the target viewoldtr
- the manager's old zoom transformernewtr
- 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.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.