public class IlvClusterInfoProperty extends IlvNamedProperty
IlvGrapher, the identifiers of the clusters to which the
node belongs and the corresponding indexes of the node on each
cluster. A boolean value that corresponds to the "star center"
attribute of the node is also stored. This class can be used to
implement the persistence of the clustering information for the
Circular Layout algorithm. (See the class
IlvCircularLayout.)
Since this class extends IlvNamedProperty, the attribute
values stored by an instance of IlvClusterInfoProperty
are automatically saved in the .ivl file if they are
attached to a graphic object using the method
setNamedProperty.
| Modifier and Type | Field and Description |
|---|---|
static String |
NAME
A default name of the property.
|
| Constructor and Description |
|---|
IlvClusterInfoProperty(IlvClusterId[] clusterIds,
int[] indexes,
boolean isStarCenter)
Creates a new
IlvClusterInfoProperty. |
IlvClusterInfoProperty(IlvClusterInfoProperty source)
Creates a new
IlvClusterInfoProperty by copying an
existing one. |
IlvClusterInfoProperty(IlvInputStream stream)
Creates a new
IlvClusterInfoProperty from an
IlvInputStream. |
IlvClusterInfoProperty(String name,
IlvClusterId[] clusterIds,
int[] indexes,
boolean isStarCenter)
Creates a new
IlvClusterInfoProperty. |
| Modifier and Type | Method and Description |
|---|---|
IlvNamedProperty |
copy()
Copies the property.
|
IlvClusterId[] |
getClusterIds()
Returns the array of cluster identifiers stored in the property.
|
int[] |
getIndexes()
Returns the array of indexes stored in the property
|
boolean |
isPersistent()
Indicates if the property must be saved to the
.ivl file. |
boolean |
isStarCenter()
Returns the value of the "star center" attribute stored in the
property.
|
void |
setPersistent(boolean persistent)
Specifies whether the property must be saved in the
.ivl
file. |
void |
write(IlvOutputStream stream)
Writes the property to an
IlvOutputStream. |
getNamepublic static final String NAME
public IlvClusterInfoProperty(IlvClusterId[] clusterIds, int[] indexes, boolean isStarCenter)
IlvClusterInfoProperty. The default name
stored in the variable NAME is used.clusterIds - The identifiers of the cluster to which a node belongsindexes - the corresponding indexes of the node on each clusterisStarCenter - If true, the node is the center of a
star clusterIllegalArgumentException - If the arrays of cluster identifiers
and indexes have different lengths.public IlvClusterInfoProperty(String name, IlvClusterId[] clusterIds, int[] indexes, boolean isStarCenter)
IlvClusterInfoProperty.name - the name of the propertyclusterIds - the identifiers of the cluster to which a node belongsindexes - the corresponding indexes of the node on each clusterisStarCenter - if true, the node is the center of a
star clusterIllegalArgumentException - if the arrays of cluster identifiers
and indexes have different lengths.public IlvClusterInfoProperty(IlvClusterInfoProperty source)
IlvClusterInfoProperty by copying an
existing one.source - the origin of the copy.public IlvClusterInfoProperty(IlvInputStream stream) throws IlvReadFileException
IlvClusterInfoProperty from an
IlvInputStream.stream - the input streamIlvReadFileException - if an error occurs while reading.public void write(IlvOutputStream stream) throws IOException
IlvOutputStream.write in interface IlvPersistentObjectwrite in class IlvNamedPropertystream - the output stream.IOException - standard IO error.public IlvNamedProperty copy()
copy in class IlvNamedPropertypublic void setPersistent(boolean persistent)
.ivl
file. By default, the property is persistent.persistent - true if the property must be saved in an
.ivl file, and false otherwise.public boolean isPersistent()
.ivl file.isPersistent in class IlvNamedPropertypublic IlvClusterId[] getClusterIds()
public int[] getIndexes()
public boolean isStarCenter()
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.