ilog.views.graphlayout.hierarchical
Class IlvHierarchicalLayoutNodeProperty

java.lang.Object
  extended by ilog.views.IlvNamedProperty
      extended by ilog.views.graphlayout.IlvGraphLayoutNodeProperty
          extended by ilog.views.graphlayout.hierarchical.IlvHierarchicalLayoutNodeProperty
All Implemented Interfaces:
IlvPersistentObject, Serializable

public class IlvHierarchicalLayoutNodeProperty
extends IlvGraphLayoutNodeProperty

The class IlvHierarchicalLayoutNodeProperty allows you to store the settings of an instance of IlvHierarchicalLayout for an individual node as a named property in the node. This is used by IlvGrapherAdapter.saveParametersToNamedProperties(IlvGraphLayout, boolean) which is an auxiliary to be used before IlvManager.write(IlvOutputStream) if you want to store layout parameter settings in .ivl files.

Since:
JViews 3.5
See Also:
IlvGrapherAdapter.saveParametersToNamedProperties(IlvGraphLayout, boolean), IlvGrapherAdapter.loadParametersFromNamedProperties(IlvGraphLayout), IlvGrapherAdapter.removeParametersFromNamedProperties(), IlvGraphLayout.createLayoutNodeProperty(String, IlvGraphic, boolean), Serialized Form

Constructor Summary
IlvHierarchicalLayoutNodeProperty(IlvHierarchicalLayoutNodeProperty source)
          Creates a new IlvHierarchicalLayoutNodeProperty by copying an existing one.
IlvHierarchicalLayoutNodeProperty(IlvInputStream stream)
          Creates a new IlvHierarchicalLayoutNodeProperty from an IlvInputStream.
IlvHierarchicalLayoutNodeProperty(String name, IlvHierarchicalLayout layout, IlvGraphic node, boolean withDefaults)
          Creates a new IlvHierarchicalLayoutNodeProperty that stores layout parameter settings of the layout for the node.
 
Method Summary
 IlvNamedProperty copy()
          Copies the named property.
 void dispose(IlvGrapherAdapter adapter)
          Disposes of the property and releases any resources that it is using.
 boolean isPersistent()
          Returns true if the property must be saved to an .ivl file.
 void transfer(IlvGraphLayout graphLayout, IlvGraphic node)
          Transfers the layout parameter settings stored in this named property back to the input layout for the input node.
 void write(IlvOutputStream stream)
          Writes the property to the output stream.
 
Methods inherited from class ilog.views.graphlayout.IlvGraphLayoutNodeProperty
getLayout, isWritten, omitDefaults
 
Methods inherited from class ilog.views.IlvNamedProperty
getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvHierarchicalLayoutNodeProperty

public IlvHierarchicalLayoutNodeProperty(String name,
                                         IlvHierarchicalLayout layout,
                                         IlvGraphic node,
                                         boolean withDefaults)
Creates a new IlvHierarchicalLayoutNodeProperty that stores layout parameter settings of the layout for the node.

Parameters:
name - The name of the property.
layout - The layout instance to be stored.
node - The node whose layout parameters are to be stored.
withDefaults - If true, the layout property is always persistent. If false, it is persistent only if nondefault parameter settings exist (that is, if the the property is saved to an .ivl file, the default parameter settings are not saved).

IlvHierarchicalLayoutNodeProperty

public IlvHierarchicalLayoutNodeProperty(IlvHierarchicalLayoutNodeProperty source)
Creates a new IlvHierarchicalLayoutNodeProperty by copying an existing one.

Parameters:
source - The origin of the copy.

IlvHierarchicalLayoutNodeProperty

public IlvHierarchicalLayoutNodeProperty(IlvInputStream stream)
                                  throws IOException,
                                         IlvReadFileException
Creates a new IlvHierarchicalLayoutNodeProperty from an IlvInputStream.

Parameters:
stream - The input stream from which the property must be read.
Throws:
IlvReadFileException - if an error occurs while reading.
IOException
Method Detail

copy

public IlvNamedProperty copy()
Copies the named property.

Overrides:
copy in class IlvGraphLayoutNodeProperty

isPersistent

public boolean isPersistent()
Returns true if the property must be saved to an .ivl file.

Overrides:
isPersistent in class IlvGraphLayoutNodeProperty

write

public void write(IlvOutputStream stream)
           throws IOException
Writes the property to the output stream.

Specified by:
write in interface IlvPersistentObject
Overrides:
write in class IlvGraphLayoutNodeProperty
Parameters:
stream - The output stream.
Throws:
IOException - standard IO error.

transfer

public void transfer(IlvGraphLayout graphLayout,
                     IlvGraphic node)
Transfers the layout parameter settings stored in this named property back to the input layout for the input node.

Overrides:
transfer in class IlvGraphLayoutNodeProperty
Parameters:
graphLayout - The layout instance whose parameters are to be recovered from this named property.
node - The node whose layout parameters are to be recovered from this named property.

dispose

public void dispose(IlvGrapherAdapter adapter)
Disposes of the property and releases any resources that it is using. This is called if the property was loaded and removed from the grapher.

Overrides:
dispose in class IlvGraphLayoutNodeProperty
Parameters:
adapter - The grapher adapter.
Since:
JViews 5.0
See Also:
IlvGrapherAdapter.loadParametersFromNamedProperties(IlvGraphLayout), IlvGrapherAdapter.removeParametersFromNamedProperties()


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