public final class GraphLayoutParameterEvent extends EventObject
If you install a GraphLayoutParameterEventListener
on a layout
instance, a GraphLayoutParameterEvent
is delivered to the
listener each time the method IlvGraphLayout.setParametersUpToDate(boolean)
is called; that is, each time a
layout parameter changes and each time the layout is successfully
performed.
This allows you to react when a layout parameter changes; for instance, to update a display that shows the current values of the layout parameters or to update a flag indicating whether the set of layout parameters must be saved to file.
source
Constructor and Description |
---|
GraphLayoutParameterEvent(IlvGraphLayout layout,
boolean parametersUpToDate)
Creates the event.
|
GraphLayoutParameterEvent(IlvGraphLayout layout,
Object nodeOrLink,
String parameterName,
boolean parametersUpToDate)
Creates the event.
|
Modifier and Type | Method and Description |
---|---|
IlvGraphLayout |
getGraphLayout()
Returns the graph layout instance of the event.
|
Object |
getNodeOrLink()
Returns the node or link that is affected by the layout parameter.
|
String |
getParameterName()
Returns the name of the parameter that has been changed.
|
boolean |
isParametersUpToDate()
Returns whether the parameters are up to date.
|
getSource, toString
public GraphLayoutParameterEvent(IlvGraphLayout layout, boolean parametersUpToDate)
layout
- The layout instance source of the event.parametersUpToDate
- true
if the layout parameters are
set up-to-date; false
if a layout parameter has
changed.public GraphLayoutParameterEvent(IlvGraphLayout layout, Object nodeOrLink, String parameterName, boolean parametersUpToDate)
layout
- The layout instance source of the event.nodeOrLink
- The node or link that is affected, or
null
if all nodes and links are affected.parameterName
- The name of the layout parameter that has changed,
or null
, when the layout was successfully performed.parametersUpToDate
- If the layout parameters are set up-to-date,
true
is returned. If a layout parameter has changed,
false
is returned.public IlvGraphLayout getGraphLayout()
public boolean isParametersUpToDate()
Returns true
if IlvGraphLayout.setParametersUpToDate(boolean)
was called with a
true
argument . This usually happens only after the
layout was successfully performed.
Returns false
if IlvGraphLayout.setParametersUpToDate(boolean)
was called with a
false
argument . This usually happens when a layout
parameter changed.
public String getParameterName()
null
if the layout became up to date but no specific
parameter has changed.public Object getNodeOrLink()
null
if the layout parameter
is global or affects many or all nodes and links.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.