|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.event.adapter.IlvLinkVisibilityHandler
public class IlvLinkVisibilityHandler
The IlvLinkVisibilityHandler ensures that links are only
visible if their end nodes are visible. It is a contents changed listener
that must be installed at a grapher.
The handler influences only the global visibility of the objects in the managers. It does not influence the layer visibility per manager view, i.e. if the end nodes of a link are visible in the manager but not visible in a layer of a specific manager view, the link is still visible in the manager.
The handler can be installed as manager listener on a flat grapher, or as tree listener on the top level grapher of a nesting hierarchy of graphers.
It is possible to selectively disable the behavior of the manager per
object. If an object is marked as managed (see setManaged(ilog.views.IlvGraphic, boolean)),
its visibility is only controlled by the handler.
If the object is marked as unmanaged, its visibility is not anymore
influenced by the handler and can be controlled independently via
IlvManager.setVisible(IlvGraphic, boolean, boolean).
By default, all objects are managed.
IlvManager.addManagerContentChangedListener(ilog.views.event.ManagerContentChangedListener),
IlvManager.removeManagerContentChangedListener(ilog.views.event.ManagerContentChangedListener),
IlvManager.addManagerTreeContentChangedListener(ilog.views.event.ManagerContentChangedListener),
IlvManager.removeManagerTreeContentChangedListener(ilog.views.event.ManagerContentChangedListener)| Constructor Summary | |
|---|---|
IlvLinkVisibilityHandler()
Creates a new link visibility handler. |
|
| Method Summary | |
|---|---|
void |
contentsChanged(ManagerContentChangedEvent evt)
This method is called by the manager, to notify content modifications. |
static void |
coupleLinkToNodeVisibility(IlvManager grapher,
boolean traverse,
boolean redraw)
Ensures that managed links that are currently in the grapher are visible if and only if both end nodes are visible. |
static boolean |
isManaged(IlvGraphic g)
Returns whether the visibility of the object is managed by a link visibility handler. |
static void |
setManaged(IlvGraphic g,
boolean managed)
Sets whether the visibility of the object is managed by a link visibility handler. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IlvLinkVisibilityHandler()
| Method Detail |
|---|
public void contentsChanged(ManagerContentChangedEvent evt)
contentsChanged in interface ManagerContentChangedListenerevt - the "content changed" event.IlvManager.addManagerContentChangedListener(ilog.views.event.ManagerContentChangedListener),
IlvManager.removeManagerContentChangedListener(ilog.views.event.ManagerContentChangedListener),
IlvManager.addManagerTreeContentChangedListener(ilog.views.event.ManagerContentChangedListener),
IlvManager.removeManagerTreeContentChangedListener(ilog.views.event.ManagerContentChangedListener)
public static void setManaged(IlvGraphic g,
boolean managed)
IlvLinkVisibilityHandler is installed as listener on
a grapher.
If an object is marked as managed, its visibility is only controlled by the handler. A managed link is invisible if one of its end nodes is invisible, and visible if both end nodes are visible. If the object is marked as unmanaged, its visibility is not anymore influenced by the handler and can be controlled independently. By default, all objects are managed.
g - The graphic objectmanaged - Whether the visibility of the object is managed or not.isManaged(ilog.views.IlvGraphic)public static boolean isManaged(IlvGraphic g)
IlvLinkVisibilityHandler is installed as listener on
a grapher.
If an object is marked as managed, its visibility is only controlled by the handler. A managed link is invisible if one of its end nodes is invisible, and visible if both end nodes are visible. If the object is marked as unmanaged, its visibility is not anymore influenced by the handler and can be controlled independently. By default, all objects are managed.
g - The graphic objectsetManaged(ilog.views.IlvGraphic, boolean)
public static void coupleLinkToNodeVisibility(IlvManager grapher,
boolean traverse,
boolean redraw)
IlvLinkVisibilityHandler.
The purpose of this method is the following:
When a IlvLinkVisibilityHandler is installed at a nonempty
grapher, the visibility of links of this grapher does not change right
away. The handler affects only subsequent operations when nodes are made
visible or invisible.
In order to change the link visibility right away to create a situation
consistent to the visibility-policy of the handler, this method can be
called just after installing the IlvLinkVisibilityHandler.
It is not necessary to call this method when a
IlvLinkVisibilityHandler is installed at an empty grapher.
grapher - The grapher whose links should be examined.traverse - If true, the links of submanager are
examined as well.redraw - Whether to redraw when changing visibility.setManaged(ilog.views.IlvGraphic, boolean)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||