public class IlvTreeLayoutNodeProperty extends IlvGraphLayoutNodeProperty
IlvTreeLayoutNodeProperty
allows you to store
the settings of an instance of IlvTreeLayout
for an
individual node as a named property in the node. This is used by
IlvGrapherPropertyAdapter.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.IlvGrapherPropertyAdapter.saveParametersToNamedProperties(IlvGraphLayout, boolean)
,
IlvGrapherPropertyAdapter.loadParametersFromNamedProperties(IlvGraphLayout)
,
IlvGrapherPropertyAdapter.removeParametersFromNamedProperties()
,
IlvGraphLayout.createLayoutNodeProperty(String, IlvGraphic, boolean)
,
Serialized FormModifier | Constructor and Description |
---|---|
|
IlvTreeLayoutNodeProperty(IlvInputStream stream)
Creates a new
IlvTreeLayoutNodeProperty from an
IlvInputStream . |
protected |
IlvTreeLayoutNodeProperty(IlvInputStream stream,
boolean fromSubclass)
Creates a new
IlvTreeLayoutNodeProperty from an
IlvInputStream . |
|
IlvTreeLayoutNodeProperty(IlvTreeLayoutNodeProperty source)
Creates a new
IlvTreeLayoutNodeProperty by copying an
existing one. |
|
IlvTreeLayoutNodeProperty(String name,
IlvTreeLayout layout,
IlvGraphic node,
boolean withDefaults)
Creates a new
IlvTreeLayoutNodeProperty that stores
layout parameter settings of the layout for the
node . |
Modifier and Type | Method and Description |
---|---|
IlvNamedProperty |
copy()
Copies the named property.
|
void |
dispose(IlvGrapherPropertyAdapter 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. |
protected boolean |
readProperties(IlvInputStream stream)
Reads the properties from an
IlvInputStream . |
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.
|
dispose, getLayout, isWritten, omitDefaults
getName
public IlvTreeLayoutNodeProperty(String name, IlvTreeLayout layout, IlvGraphic node, boolean withDefaults)
IlvTreeLayoutNodeProperty
that stores
layout parameter settings of the layout
for the
node
.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).public IlvTreeLayoutNodeProperty(IlvTreeLayoutNodeProperty source)
IlvTreeLayoutNodeProperty
by copying an
existing one.source
- The origin of the copy.public IlvTreeLayoutNodeProperty(IlvInputStream stream) throws IOException, IlvReadFileException
IlvTreeLayoutNodeProperty
from an
IlvInputStream
.stream
- The input stream from which the property must be read.IlvReadFileException
- if an error occurs while reading.IOException
protected IlvTreeLayoutNodeProperty(IlvInputStream stream, boolean fromSubclass) throws IOException, IlvReadFileException
IlvTreeLayoutNodeProperty
from an
IlvInputStream
. This method is for internal purpose.stream
- The input stream from which the property must be read.fromSubclass
- Whether this constructor is called from a subclass.IlvReadFileException
- if an error occurs while reading.IOException
protected boolean readProperties(IlvInputStream stream) throws IOException, IlvReadFileException
IlvInputStream
. This method
is for internal purpose.readProperties
in class IlvGraphLayoutNodeProperty
stream
- The input stream from which the property must be read.IlvReadFileException
- if an error occurs while reading.IOException
public IlvNamedProperty copy()
copy
in class IlvGraphLayoutNodeProperty
public boolean isPersistent()
true
if the property must be saved to an
.ivl
file.isPersistent
in class IlvGraphLayoutNodeProperty
public void write(IlvOutputStream stream) throws IOException
write
in interface IlvPersistentObject
write
in class IlvGraphLayoutNodeProperty
stream
- The output stream.IOException
- standard IO error.public void transfer(IlvGraphLayout graphLayout, IlvGraphic node)
transfer
in class IlvGraphLayoutNodeProperty
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.public void dispose(IlvGrapherPropertyAdapter adapter)
dispose
in class IlvGraphLayoutNodeProperty
adapter
- The grapher property adapter.IlvGrapherPropertyAdapter.loadParametersFromNamedProperties(IlvGraphLayout)
,
IlvGrapherPropertyAdapter.removeParametersFromNamedProperties()
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.