ilog.views.graphlayout
Class GraphLayoutParameterEvent

java.lang.Object
  extended by java.util.EventObject
      extended by ilog.views.graphlayout.GraphLayoutParameterEvent
All Implemented Interfaces:
Serializable

public final class GraphLayoutParameterEvent
extends EventObject

Provides data for the parameter event on layout instances. 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.

Since:
JViews 3.5
See Also:
GraphLayoutParameterEventListener, IlvGraphLayout.addGraphLayoutParameterEventListener(GraphLayoutParameterEventListener), IlvGraphLayout.setParametersUpToDate(boolean), Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
GraphLayoutParameterEvent(IlvGraphLayout layout, boolean parametersUpToDate)
          Creates the event.
GraphLayoutParameterEvent(IlvGraphLayout layout, Object nodeOrLink, String parameterName, boolean parametersUpToDate)
          Creates the event.
 
Method Summary
 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.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GraphLayoutParameterEvent

public GraphLayoutParameterEvent(IlvGraphLayout layout,
                                 boolean parametersUpToDate)
Creates the event.

Parameters:
layout - The layout instance source of the event.
parametersUpToDate - true if the layout parameters are set up-to-date; false if a layout parameter changed.

GraphLayoutParameterEvent

public GraphLayoutParameterEvent(IlvGraphLayout layout,
                                 Object nodeOrLink,
                                 String parameterName,
                                 boolean parametersUpToDate)
Creates the event.

Parameters:
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.
Since:
JViews 8.1
Method Detail

getGraphLayout

public IlvGraphLayout getGraphLayout()
Returns the graph layout instance of the event.


isParametersUpToDate

public boolean isParametersUpToDate()
Returns whether the parameters are up to date. 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.

See Also:
IlvGraphLayout.performLayout(), IlvGraphLayout.setParametersUpToDate(boolean)

getParameterName

public String getParameterName()
Returns the name of the parameter that has been changed. Returns null if the layout became up to date but no specific parameter has changed.

Since:
JViews 8.1

getNodeOrLink

public Object getNodeOrLink()
Returns the node or link that is affected by the layout parameter. For layout parameters that affect a single node or link, this node or link is returned. Returns null if the layout parameter is global or affects many or all nodes and links.

Since:
JViews 8.1


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.