public abstract class IltState extends Object implements IltDecorationSource, IlWithProperties
When creating a subclass of IltState
, you have to
statically allocate a new IltStateInfo
instance for it;
by convention this is assigned to a variable called metainfo
.
Modifier and Type | Field and Description |
---|---|
protected String |
_message
Catalog message used to retrieve the state description for a
specific locale
|
static IltStateInfo |
metainfo
Contains metainformation about this
IltState class. |
Modifier | Constructor and Description |
---|---|
protected |
IltState(String name,
String description,
String message)
Creates an
IltState . |
Modifier and Type | Method and Description |
---|---|
void |
copy(IltState from)
Copy the values from the source state
|
static IlpFilter |
CreateNameFilter(String name)
Filter which accepts state path that match a given string representation.
|
static IlpFilter |
CreateStateFilter(IltState state)
Filter which accepts state path whose last component matches a given state.
|
Object |
createValue()
The following methods are implemented in those states that can contain other
states, such as an aggregate state.
|
boolean |
equals(Object obj)
Support for hash tables
|
String[] |
getAliases()
Returns all names for the state.
|
void |
getAllPaths(Vector result,
ilog.tgo.model.internal.IltStatePath parentPath,
IlpFilter filter,
boolean all)
This method verifies if the state being searched is this one, and if so it
adds this state to the path list.
|
protected String |
getAltName()
Returns the alternate name of this symbolic value.
|
Object |
getDefault() |
String |
getDescription(IlpContext context)
Returns a description of the state for the application context.
|
String |
getName()
Returns the name of this symbolic value.
|
Object |
getProperty(Object name)
Returns the named property.
|
IltStateInfo |
getStateInfo()
Returns the
IltStateInfo describing the class of this state. |
String |
getToolTipText(IlpContext context,
IltObject obj)
Returns a description of the state for the given application context.
|
String |
getToolTipText(IltObject obj)
Deprecated.
|
boolean |
hasDefault() |
protected boolean |
hasDescription(IlpContext context)
Returns
true if the state contains a non-empty description. |
int |
hashCode()
Support for hash tables
|
IltState |
intern()
Returns a canonical representation for this object.
|
boolean |
isInside(IltStateInfo superclass)
Tests whether this state belongs to a given state class.
|
static boolean |
IsPropertyTransient(Object name)
Returns whether a given named property is omitted by serialization.
|
boolean |
isValid(Object value)
Returns if the given value is valid for this state.
|
void |
list(IlpContext context,
IltStateListing listing,
Object value)
Generates a plain text listing of a state.
|
void |
removeProperty(Object name)
Removes the named property.
|
protected void |
setAltName(String name)
Sets the alternate name of this symbolic value.
|
void |
setDescription(String d)
Sets a new description to the state.
|
void |
setMessage(String message)
Sets the localized message that describes this state.
|
protected void |
setName(String name)
Sets the name of this symbolic value.
|
void |
setProperty(Object name,
Object value)
Sets the named property.
|
static void |
SetPropertyTransient(Object name,
boolean isTransient)
Changes whether a given named property shall be omitted by serialization.
|
String |
toString()
Returns the String representation of this IltState's values.
|
public static IltStateInfo metainfo
IltState
class.protected String _message
protected IltState(String name, String description, String message)
IltState
.name
- Name of the state.description
- Default description of the state, used to represent the
state as a text. It is used when message
is not null
.message
- Catalog message entry, used to retrieve the localized
description of the state.public IltStateInfo getStateInfo()
IltStateInfo
describing the class of this state.public boolean isInside(IltStateInfo superclass)
public IltState intern()
This function is typically used after deserialization of a state. Its use is necessary with JDK 1.1.x, and not needed any more with JDK 1.2.
public String toString()
public void setMessage(String message)
public void setDescription(String d)
The description is displayed as tooltip when the state is graphically represented in the object as a secondary state.
public String getDescription(IlpContext context)
protected boolean hasDescription(IlpContext context)
true
if the state contains a non-empty description.
When a description exists, the state can be represented as a text inside
a information window for instance.public String getName()
protected void setName(String name)
protected String getAltName()
protected void setAltName(String name)
public String[] getAliases()
public void copy(IltState from)
public void list(IlpContext context, IltStateListing listing, Object value)
public Object createValue()
public boolean hasDefault()
public Object getDefault()
public boolean isValid(Object value)
public boolean equals(Object obj)
public int hashCode()
public static IlpFilter CreateNameFilter(String name)
public static IlpFilter CreateStateFilter(IltState state)
public void getAllPaths(Vector result, ilog.tgo.model.internal.IltStatePath parentPath, IlpFilter filter, boolean all)
result
- vector with the IltStatePath instances foundparentPath
- path to the parent statefilter
- criteria used to match the stateall
- flag which indicates whether the query is stopped when
the first path is found or not.@Deprecated public String getToolTipText(IltObject obj)
getToolTipText
in interface IltDecorationSource
public String getToolTipText(IlpContext context, IltObject obj)
getToolTipText
in interface IltDecorationSource
public Object getProperty(Object name)
getProperty
in interface IlWithProperties
name
- Property identifierpublic void setProperty(Object name, Object value)
setProperty
in interface IlWithProperties
name
- Property identifiervalue
- Property valuepublic void removeProperty(Object name)
removeProperty
in interface IlWithProperties
public static boolean IsPropertyTransient(Object name)
By default, all named properties are serialized.
public static void SetPropertyTransient(Object name, boolean isTransient)
By default, all named properties are serialized.
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.