public class IlvPersistentSDMModelProperty extends IlvNamedProperty
IlvSDMEngine
instance, which will store symbol model data when the map is saved.
When the data is loaded, it will replace the symbol model attached to the tree view, creating symbols through the tree view action methods
and setting up the properties of the symbol with what was saved.
You should not create an instance of that class directly, but rather use the GetPersistentSDMModel(IlvSDMEngine, IlvPersistentSDMNodeFactory, boolean)
factory method.Constructor and Description |
---|
IlvPersistentSDMModelProperty(IlvInputStream stream)
Creates a new
SymbolModelProperty . |
Modifier and Type | Method and Description |
---|---|
protected void |
attach(IlvSDMEngine engine)
Attaches the engine to the property.
|
IlvNamedProperty |
copy()
Copies the named property.
|
static IlvPersistentSDMModelProperty |
GetPersistentSDMModel(IlvSDMEngine engine,
IlvPersistentSDMNodeFactory symbolFactory,
boolean listenToChanges)
Finds or creates a persistent model and stores it as a property of the engine manager.
|
IlvPersistentSDMModelXMLConnector |
getXMLConnector()
Returns the
IlvPersistentSDMModelXMLConnector that reads and writes data. |
boolean |
isPersistent()
Tells if the property must be saved to an IVL file.
|
void |
setXMLConnector(IlvPersistentSDMModelXMLConnector connector)
Overrides the
IlvXMLConnector that reads and writes data. |
void |
write(IlvOutputStream stream)
Writes the property to an
IlvOutputStream . |
getName
public IlvPersistentSDMModelProperty(IlvInputStream stream) throws IlvReadFileException
SymbolModelProperty
.stream
- IlvReadFileException
public void write(IlvOutputStream stream) throws IOException
IlvOutputStream
.
You must override this method if specific data is to be stored.
Note that the first instruction in your implementation of the method must be
super.write(stream)
.write
in interface IlvPersistentObject
write
in class IlvNamedProperty
stream
- the output stream.IOException
- standard IO error.IlvNamedProperty.write(ilog.views.io.IlvOutputStream)
public IlvPersistentSDMModelXMLConnector getXMLConnector()
IlvPersistentSDMModelXMLConnector
that reads and writes data.IlvPersistentSDMModelXMLConnector
that reads and writes datapublic void setXMLConnector(IlvPersistentSDMModelXMLConnector connector)
IlvXMLConnector
that reads and writes data.connector
- The XML connector.public IlvNamedProperty copy()
copy
),
the named properties
associated with this object are also copied using this method. The
only way to avoid the copy is to return null in this method.copy
in class IlvNamedProperty
IlvNamedProperty.copy()
public boolean isPersistent()
true
, the property
is saved; otherwise it is not saved.isPersistent
in class IlvNamedProperty
IlvNamedProperty.isPersistent()
public static IlvPersistentSDMModelProperty GetPersistentSDMModel(IlvSDMEngine engine, IlvPersistentSDMNodeFactory symbolFactory, boolean listenToChanges)
engine
- The SDM EnginesymbolFactory
- A factory used to create and store model nodeslistenToChanges
- If true
, this will additionally attach a listener that changes the engine model
whenever the property changes (for example, when a new value is read from a file).protected void attach(IlvSDMEngine engine)
engine
- The SDM engine to attach.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.