|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.tgo.model.internal.IltBaseSystem
ilog.tgo.model.IltStateSystem
public class IltStateSystem
This class defines the model of states which will be used by a telecom object.
| Field Summary | |
|---|---|
protected Collection |
_primaryStates
|
| Fields inherited from class ilog.tgo.model.internal.IltBaseSystem |
|---|
_batchNestingCount, _listenerSupport, _mapper, _name |
| Method Summary | |
|---|---|
boolean |
add(IltState state)
Adds a new state to the collection. |
boolean |
add(ilog.tgo.model.internal.IltStatePath parentPath,
IltState state)
Adds a new state in the collection in the position given by the parentPath. |
ilog.tgo.model.internal.IltStatePath |
addPrimary(IltState state)
Adds the given state as a primary state, inserting it in the model and creating a state mapper responsible for mapping this state into a change of base style. |
ilog.tgo.model.internal.IltStatePath |
addPrimary(ilog.tgo.model.internal.IltStatePath parent,
IltState state)
Adds the given state as a primary state, inserting it in the model and creating a state mapper responsible for mapping this state into a change of base style. |
void |
addPrimaryStatePath(ilog.tgo.model.internal.IltStatePath path)
|
ilog.tgo.model.internal.IltStatePath |
addSecondary(IltState state)
Adds the given state as a secondary state, inserting it in the model and creating a state mapper responsible for mapping this state into a new decoration icon, which is positioned in the secondary state position. |
ilog.tgo.model.internal.IltStatePath |
addSecondary(ilog.tgo.model.internal.IltStatePath parent,
IltState state)
Adds the given state as a secondary state, inserting it in the model and creating a state mapper responsible for mapping this state into a new decoration, which is positioned in the secondary state position. |
Object |
clone()
Returns a copy of this model |
protected ilog.tgo.mapper.IltMapper |
createMapper()
Creates and sets the mapper to the state system. |
void |
fireStateAdded(ilog.tgo.model.state.event.IltStateSystemEvent event)
Notify all listeners that a certain state was added to the state system. |
void |
fireStateRemoved(ilog.tgo.model.state.event.IltStateSystemEvent event)
Notify all listeners that a certain state was removed from the state system. |
void |
fireStateSystemAdded(ilog.tgo.model.state.event.IltStateSystemEvent event)
Notify all listeners that a certain state system is being used by this one. |
void |
fireStateSystemRemoved(ilog.tgo.model.state.event.IltStateSystemEvent event)
Notify all listeners that a certain state system is no longer being used by this one. |
void |
fixDependencies()
This method establishes the relationship between dependent state systems after deserialization. |
ilog.tgo.model.internal.IltStatePath[] |
getAllPaths(IlpFilter filter)
Returns all the paths found which corresponds to the criteria given by the filter. |
ilog.tgo.model.internal.IltStatePath[] |
getAllPaths(IltState state)
Returns all the paths found which corresponds to the given state. |
ilog.tgo.model.internal.IltStatePath |
getPath(String name)
Returns the state from the model that corresponds the given name. |
Collection |
getPrimaryStates()
Returns an unmodifiable collection of primary states. |
boolean |
has(IltState state)
Returns true if the given state is part of the collection. |
boolean |
has(IltState state,
boolean all)
Returns true if the given state is part of the collection. |
boolean |
has(ilog.tgo.model.internal.IltStatePath path)
Returns true if the given state is part of the collection. |
boolean |
has(ilog.tgo.model.internal.IltStatePath path,
boolean all)
Returns true if the given state is part of the collection. |
boolean |
hasLocal(IltState state)
Verifies if the given state is present in the state table. |
boolean |
hasLocal(ilog.tgo.model.internal.IltStatePath path)
Verifies if the given state path is present in this state system. |
boolean |
hasRecursivelly(IltState state)
Verifies if the given state is part of the whole subtree. |
protected void |
initialize()
|
void |
map(IltObject object,
IltCompositeGraphic graphic)
Maps an entire IltObjectState. |
void |
mapState(IltObject object,
IltCompositeGraphic graphic,
ilog.tgo.model.internal.IltStatePath path,
Object value)
Maps a specific state in the system |
void |
merge(IltStateSystem other)
Adds all the states which are in the other state system and are not in this state system. |
static IltStateSystem |
New(String name)
Factory method responsible for creating a new state model instance, and registering this new instance in the controller. |
static IltStateSystem |
New(String name,
ilog.tgo.mapper.state.IltStateSystemMapper mapper)
|
Enumeration |
otherStateSystems()
Returns all the state systems used by this one. |
boolean |
remove(IltState state)
Removes a state from the collection. |
boolean |
remove(ilog.tgo.model.internal.IltStatePath parentPath,
IltState state)
Removes a state from the collection from the position given by the parent path. |
Enumeration |
states()
Returns an enumeration of the states in this dictionary. |
String |
toString()
Returns the String representation of this IltStateSystem's values. |
void |
unUseStateSystem(IltStateSystem other)
Removes the dependency between this state system and the given one. |
void |
useStateSystem(IltStateSystem other)
Indicates that this state system uses state information from another state system. |
protected boolean |
validateListener(EventListener listener)
This method should be overwritten by the subclasses to define which are the listeners which are allowed. |
protected boolean |
validateMapper(ilog.tgo.mapper.IltMapper mapper)
Verifies if the given mapper can be set or not. |
| Methods inherited from class ilog.tgo.model.internal.IltBaseSystem |
|---|
addListener, createListenerSupport, endBatch, getMapper, getName, hasListeners, notify, notifyEndChangingSystem, removeListener, resetMapper, setMapper, startBatch |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Collection _primaryStates
| Method Detail |
|---|
public static IltStateSystem New(String name)
public static IltStateSystem New(String name,
ilog.tgo.mapper.state.IltStateSystemMapper mapper)
name - State system namemapper - State system mapper
protected void initialize()
public boolean add(IltState state)
add in interface ilog.tgo.model.internal.IltStateCollectionstate - State to be added to the modelpublic boolean remove(IltState state)
remove in interface ilog.tgo.model.internal.IltStateCollectionstate - state to be removed from the modelpublic boolean has(IltState state)
has in interface ilog.tgo.model.internal.IltStateCollectionstate - state being tested
true when the state is part of the collection.
public boolean has(IltState state,
boolean all)
true if the given state is part of the collection.
This method not only verifies in the states that are in the collection
table, but also searches recursively in the model to see if the state is
in any of the sub-states.
state - state being verifiedall - flag indicating if the state will be looked in this system
and all the other used systems or just locally.public Enumeration states()
states in interface ilog.tgo.model.internal.IltStateCollection
public boolean add(ilog.tgo.model.internal.IltStatePath parentPath,
IltState state)
parentPath.
If parentPath is null, the given state is added in the model's
first level of states.
parentPath - Path indicating the state where the given state will be
added. The parent state must be an
IltAggregateStatestate - State to be added in the model
public boolean remove(ilog.tgo.model.internal.IltStatePath parentPath,
IltState state)
parentPath is null, the given state is removed from the
model's first level of states.
parentPath - path indicating which is the state from where the given
state will be removed. The parent state must be an
IltAggregateStatestate - state to be removed from the modelpublic boolean has(ilog.tgo.model.internal.IltStatePath path)
true if the given state is part of the collection.
If state is not valid or does not contain any state, this method will
return false. This method also verifies if the given path is
present in the state systems being currently used by this one.
path - path which indicates the state being searched
public boolean has(ilog.tgo.model.internal.IltStatePath path,
boolean all)
true if the given state is part of the collection.
If state is not valid or does not contain any state, this method will
return false. This method also verifies if the given path is
present in the state systems being currently used by this one.
path - path which indicates the state being searchedall - flag which indicates if the state will be searched in the
other state systems too.public boolean hasRecursivelly(IltState state)
public boolean hasLocal(IltState state)
public boolean hasLocal(ilog.tgo.model.internal.IltStatePath path)
public ilog.tgo.model.internal.IltStatePath[] getAllPaths(IlpFilter filter)
filter - criteria to match the state instances.public ilog.tgo.model.internal.IltStatePath[] getAllPaths(IltState state)
state - state being queriedpublic ilog.tgo.model.internal.IltStatePath getPath(String name)
name - complete state name, formed by the concatenation of the states
which compose the path inside the model, separated by the
character '.'public String toString()
toString in class Objectpublic void addPrimaryStatePath(ilog.tgo.model.internal.IltStatePath path)
public Collection getPrimaryStates()
IltStatePath representing
each primary state.public ilog.tgo.model.internal.IltStatePath addPrimary(IltState state)
IltPrimaryStateMapper.
null.
public ilog.tgo.model.internal.IltStatePath addPrimary(ilog.tgo.model.internal.IltStatePath parent,
IltState state)
IltPrimaryStateMapper is
created, which contains a mapping that changes the base style of the
object's graphical representation depending on a
IltBaseStyleValueGetter instance. To configure the base style
used to represent this state, the user must retrieve the state mapper
instance and set the appropriate base style value getter, or any new
graphic updates if desired.
null.IltPrimaryStateMapper,
IltStateSystemMapper.get(ilog.tgo.model.internal.IltStatePath)public ilog.tgo.model.internal.IltStatePath addSecondary(IltState state)
(IltStatePath parent, IltState state),
IltStateSystemMapper.get(ilog.tgo.model.internal.IltStatePath)
public ilog.tgo.model.internal.IltStatePath addSecondary(ilog.tgo.model.internal.IltStatePath parent,
IltState state)
The state mapper is created automatically using the default state mapper
factory. By default, an instance of the class
IltSecondaryStateMapper is created, which contains a mapping
that adds a secondary state icon to the object's graphical representation
depending on a IltImageMappingValueGetter instance.
To configure the image used to create the icon decoration, the user must retrieve the state mapper instance and set the appropriate image value getter, or any new graphic updates, if desired.
Using this secondary state mapper, the user can also define different types of decorations, according to the state type. The possible decoration types are Icon, Gauge, Chart or Counter.
The user must define an IltDecorationTypeValueGetter
instance, which is responsible for defining the decoration type that will
be used. For each possible decoration type, the user can register a
decoration configuration, which is used to create the decoration during the
mapping operation.
null.IltSecondaryStateMapper,
IltStateSystemMapper.get(ilog.tgo.model.internal.IltStatePath)
public void map(IltObject object,
IltCompositeGraphic graphic)
object - the telecom object containing this semantic stategraphic - a graphic object representing the telecom object
public void mapState(IltObject object,
IltCompositeGraphic graphic,
ilog.tgo.model.internal.IltStatePath path,
Object value)
object - the telecom object containing this semantic stategraphic - a graphic object representing the telecom objectpath - the pathvalue - the valueprotected boolean validateListener(EventListener listener)
validateListener in class ilog.tgo.model.internal.IltBaseSystempublic void fireStateAdded(ilog.tgo.model.state.event.IltStateSystemEvent event)
public void fireStateRemoved(ilog.tgo.model.state.event.IltStateSystemEvent event)
public void fireStateSystemAdded(ilog.tgo.model.state.event.IltStateSystemEvent event)
public void fireStateSystemRemoved(ilog.tgo.model.state.event.IltStateSystemEvent event)
protected boolean validateMapper(ilog.tgo.mapper.IltMapper mapper)
validateMapper in class ilog.tgo.model.internal.IltBaseSystemprotected ilog.tgo.mapper.IltMapper createMapper()
createMapper in class ilog.tgo.model.internal.IltBaseSystempublic void useStateSystem(IltStateSystem other)
public void unUseStateSystem(IltStateSystem other)
public Enumeration otherStateSystems()
public Object clone()
clone in class ilog.tgo.model.internal.IltBaseSystempublic void fixDependencies()
public void merge(IltStateSystem other)
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||