|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.cpl.style.IlpAbstractStyle
public abstract class IlpAbstractStyle
This class is the base class for all kinds of styles. It provides local key mechanisms, but does not generate notifications.
IlpStyle,
Serialized Form| Field Summary | |
|---|---|
protected static Object |
_StyleLock
Deprecated. THE style lock. |
protected IlpContext |
appContext
Deprecated. Application context where this style is present. |
protected ilog.util.internal.IlFastHashtable |
literals
Deprecated. A table IlpKey -> Object. |
static Object |
NotFound
Deprecated. This attribute defines the flag used when the style value is not found or cannot be calculated by the value providers. |
protected ilog.cpl.style.internal.IlpStyleSearchStrategy |
searchStrategy
Deprecated. The strategy used to search values in this style. |
| Constructor Summary | |
|---|---|
protected |
IlpAbstractStyle()
Deprecated. Constructor. |
| Method Summary | |
|---|---|
void |
addLiterals(Object[] keysAndValues)
Deprecated. Internally used to initialize static style values. |
void |
cleanLiterals()
Deprecated. Clean all literals without notifying. |
Object |
clone()
Deprecated. Clones the style object. |
protected Dictionary |
coerceFastHashtable(Dictionary badVector)
Deprecated. Used to deserialize, convert Dictionary to IlFastHashtable. |
protected Float[] |
convertFloatArray(float[] oldArray)
Deprecated. Converts float[] to Float[]. |
protected Integer[] |
convertIntegerArray(int[] oldArray)
Deprecated. Converts int[] to Integer[]. |
void |
copyAllValues(IlpAbstractStyle sourceStyle)
Deprecated. Copies all values from a given style. |
void |
dispose()
Deprecated. Cleans the local values and removes dependences. |
protected void |
doCleanLiterals()
Deprecated. Clear all literals Must be called from a synchronization block. |
protected void |
doClone(IlpAbstractStyle newStyle)
Deprecated. Create internal structures to prepare clone operation. |
protected void |
doCopyAllContext(IlpAbstractStyle sourceStyle)
Deprecated. Copies all values from a given style. |
protected boolean |
doCopyAllValues(IlpAbstractStyle sourceStyle)
Deprecated. Perform copy. |
protected void |
doDispose()
Deprecated. Clear all internal references Must be called from a synchronization block. |
protected boolean |
doHasLiteral(IlpKey key)
Deprecated. Returns true if there is a local literal value associated with
the key. |
protected void |
doMoveContents(IlpStyle style)
Deprecated. Move the contents of this style to the given style Must be called from a synchronization block. |
protected boolean |
doResetLiteral(IlpKey key)
Deprecated. Resets the literal value. |
protected Collection |
doResetLiterals()
Deprecated. Reset all literals Must be called from a synchronization block. |
protected void |
fireEndChangingStyleValues(Collection allListeners)
Deprecated. Fires endChangingStyleValues events to all listeners. |
protected void |
fireStartChangingStyleValues(Collection allListeners)
Deprecated. Fires startChangingStyleValues events to all listeners. |
protected void |
fireStyleNotification(Collection changedKeys)
Deprecated. Notifies the change on the given keys. |
protected void |
fireStyleValueChanged(IlpAbstractStyle source,
IlpKey key,
Collection allListeners)
Deprecated. Fires styleValueChanged events to all listeners. |
IlpContext |
getAppContext()
Deprecated. Returns the application context where this style is defined. |
boolean |
getBoolean(IlpBooleanKey key)
Deprecated. Returns the boolean value of a given key in this style. |
boolean |
getBoolean(IlpBooleanKey key,
boolean defaultValue)
Deprecated. Returns the boolean value of a given key in this style. |
Color |
getColor(IlpColorKey key)
Deprecated. Returns the Color value of a given key in this style. |
Color |
getColor(IlpColorKey key,
Color defaultValue)
Deprecated. Returns the Color value of a given key in this style. |
IlpDomain |
getDomain(IlpDomainKey key)
Deprecated. Returns the IlpDomain value of a given key in this style. |
IlpDomain |
getDomain(IlpDomainKey key,
IlpDomain defaultValue)
Deprecated. Returns the IlpDomain value of a given key in this style. |
IlEnum |
getEnum(IlpEnumKey key)
Deprecated. Returns the IlEnum value of a given key in this style. |
IlEnum |
getEnum(IlpEnumKey key,
IlEnum defaultValue)
Deprecated. Returns the IlEnum value of a given key in this style. |
Object |
getEnumArray(IlpEnumArrayKey key)
Deprecated. Returns the IlEnum[] array value of a given key in this style. |
Object |
getEnumArray(IlpEnumArrayKey key,
Object defaultValue)
Deprecated. Returns the IlEnum[] array value of a given key in this style. |
float |
getFloat(IlpFloatKey key)
Deprecated. Returns the float value of a given key in this style. |
float |
getFloat(IlpFloatKey key,
float defaultValue)
Deprecated. Returns the float value of a given key in this style. |
Float[] |
getFloatArray(IlpFloatArrayKey key)
Deprecated. Returns the Float[] value of a given key in this style. |
Float[] |
getFloatArray(IlpFloatArrayKey key,
float[] defaultValue)
Deprecated. Returns the Float[] value of a given key in this style. |
Float[] |
getFloatArray(IlpFloatArrayKey key,
Float[] defaultValue)
Deprecated. Returns the Float[] value of a given key in this style. |
Font |
getFont(IlpFontKey key)
Deprecated. Returns the Font value of a given key in this style. |
Font |
getFont(IlpFontKey key,
Font defaultValue)
Deprecated. Returns the Font value of a given key in this style. |
Format |
getFormat(IlpFormatKey key)
Deprecated. Returns the Format value of a given key in this style. |
Format |
getFormat(IlpFormatKey key,
Format defaultValue)
Deprecated. Returns the Format value of a given key in this style. |
Image |
getImage(IlpImageKey key)
Deprecated. Returns the Image value of a given key in this style. |
Image |
getImage(IlpImageKey key,
Image defaultValue)
Deprecated. Returns the Image value of a given key in this style. |
int |
getInteger(IlpIntegerKey key)
Deprecated. Returns the int value of a given key in this style. |
int |
getInteger(IlpIntegerKey key,
int defaultValue)
Deprecated. Returns the int value of a given key in this style. |
Integer[] |
getIntegerArray(IlpIntegerArrayKey key)
Deprecated. Returns the Integer[] value of a given key in this style. |
Integer[] |
getIntegerArray(IlpIntegerArrayKey key,
int[] defaultValue)
Deprecated. Returns the Integer[] value of a given key in this style. |
Integer[] |
getIntegerArray(IlpIntegerArrayKey key,
Integer[] defaultValue)
Deprecated. Returns the Integer[] value of a given key in this style. |
IlpInteractor |
getInteractor(IlpInteractorKey key)
Deprecated. Returns the IlpInteractor value of a given key in this style. |
IlpInteractor |
getInteractor(IlpInteractorKey key,
IlpInteractor defaultValue)
Deprecated. Returns the IlpInteractor value of a given key in this style. |
Collection |
getKeys()
Deprecated. Gets an enumeration of local and value provider keys. |
Object |
getLiteral(IlpKey key)
Deprecated. Retrieves the local literal value associated with the key or null, if there is no value for this key. |
Object |
getLiteralOrNotFound(IlpKey key)
Deprecated. Returns the literal value associated with the given key or IlpAbstractStyle.NotFound if none is found. |
ilog.util.internal.IlFastHashtable |
getLiterals()
Deprecated. Returns the table with all literals defined in this style. |
protected Collection |
getOwnKnownKeys()
Deprecated. Returns a modifiable collection with all the keys of this style. |
IlpPoint |
getPoint(IlpPointKey key)
Deprecated. Returns the IlpPoint value of a given key in this style. |
IlpPoint |
getPoint(IlpPointKey key,
IlpPoint defaultValue)
Deprecated. Returns the IlpPoint value of a given key in this style. |
IlpRect |
getRect(IlpRectKey key)
Deprecated. Returns the IlpRect value of a given key in this style. |
IlpRect |
getRect(IlpRectKey key,
IlpRect defaultValue)
Deprecated. Returns the IlpRect value of a given key in this style. |
IlpGraphicRenderer |
getRenderer(IlpRendererKey key)
Deprecated. Returns the IlpGraphicRenderer value of a given key in this
style. |
IlpGraphicRenderer |
getRenderer(IlpRendererKey key,
IlpGraphicRenderer defaultValue)
Deprecated. Returns the IlpGraphicRenderer value of a given key in this
style. |
ilog.cpl.style.internal.IlpStyleSearchStrategy |
getSearchStrategy()
Deprecated. Returns the search strategy used by this style. |
String |
getString(IlpStringKey key)
Deprecated. Returns the String value of a given key in this style. |
String |
getString(IlpStringKey key,
String defaultValue)
Deprecated. Returns the String value of a given key in this style. |
String[] |
getStringArray(IlpStringArrayKey key)
Deprecated. Returns the String[] value of a given key in this style. |
String[] |
getStringArray(IlpStringArrayKey key,
String[] defaultValue)
Deprecated. Returns the String[] value of a given key in this style. |
int |
getSwingConstant(IlpSwingConstantKey key)
Deprecated. Returns the int value of a given key in this style. |
int |
getSwingConstant(IlpSwingConstantKey key,
int defaultValue)
Deprecated. Returns the int value of a given key in this style. |
abstract Object |
getValue(IlpKey key)
Deprecated. |
Object |
getValue(IlpKey key,
Object defaultValue)
Deprecated. Returns the value of a given IlpKey in this style. |
IlpValueMap |
getValueMap(IlpValueMapKey key)
Deprecated. Returns the IlpValueMap value of a given key in this style. |
IlpValueMap |
getValueMap(IlpValueMapKey key,
IlpValueMap defaultValue)
Deprecated. Returns the IlpValueMap value of a given key in this style. |
protected abstract Object |
getValueOrNotFound(IlpKey key)
Deprecated. Returns the value associated with the given key or IlpAbstractStyle.NotFound,
if none is found. |
boolean |
hasLiteral(IlpKey key)
Deprecated. Returns true if there is a local literal value associated with
the key. |
abstract boolean |
hasValue(IlpKey key)
Deprecated. |
Enumeration |
keys()
Deprecated. Returns the properties that have a local value in this style. |
void |
moveContents(IlpStyle style)
Deprecated. This method is internally used to move the contents of this style to the given style. |
boolean |
resetLiteral(IlpKey key)
Deprecated. Resets the local value associated with this key. |
void |
resetLiterals()
Deprecated. Clean all literals without notifying. |
boolean |
resetLiteralSilently(IlpKey key)
Deprecated. Resets the local value associated with this key. |
void |
setAppContext(IlpContext c)
Deprecated. Sets the application context where the style is defined. |
void |
setBoolean(IlpBooleanKey key,
boolean value)
Deprecated. Changes the boolean local value of a given property in this
style. |
void |
setColor(IlpColorKey key,
Color value)
Deprecated. Changes the Color local value of a given property in this
style. |
void |
setDomain(IlpDomainKey key,
IlpDomain value)
Deprecated. Changes the IlpDomain local value of a given property in this
style. |
void |
setEnum(IlpEnumKey key,
IlEnum value)
Deprecated. Changes the IlEnum local value of a given property in this
style. |
void |
setEnumArray(IlpEnumArrayKey key,
IlEnum[] value)
Deprecated. Changes the IlEnum[] local value of a given property in this
style. |
void |
setFloat(IlpFloatKey key,
float value)
Deprecated. Changes the float local value of a given property in this
style. |
void |
setFloatArray(IlpFloatArrayKey key,
float[] value)
Deprecated. Changes the float[] local value of a given property in this
style. |
void |
setFloatArray(IlpFloatArrayKey key,
Float[] value)
Deprecated. Changes the Float[] local value of a given property in this
style. |
void |
setFont(IlpFontKey key,
Font value)
Deprecated. Changes the Font local value of a given property in this style. |
void |
setFormat(IlpFormatKey key,
Format value)
Deprecated. Changes the Format local value of a given property in this
style. |
void |
setImage(IlpImageKey key,
Image value)
Deprecated. Changes the Image local value of a given property in this
style. |
void |
setInteger(IlpIntegerKey key,
int value)
Deprecated. Changes the int local value of a given property in this style. |
void |
setIntegerArray(IlpIntegerArrayKey key,
int[] value)
Deprecated. Changes the int[] local value of a given property in this
style. |
void |
setIntegerArray(IlpIntegerArrayKey key,
Integer[] value)
Deprecated. Changes the Integer[] local value of a given property in this
style. |
void |
setInteractor(IlpInteractorKey key,
IlpInteractor value)
Deprecated. Changes the IlpInteractor local value of a given property in
this style. |
void |
setLiteral(IlpKey key,
Object value)
Deprecated. Changes the local literal value of a given key in this style. |
void |
setLiterals(Object[] keysAndValues)
Deprecated. Internally used to initialize static style values. |
void |
setLiteralSilently(IlpKey key,
Object value)
Deprecated. Changes the local literal value of a given key in this style without notifying this change. |
void |
setPoint(IlpPointKey key,
IlpPoint value)
Deprecated. Changes the IlpPoint local value of a given property in this
style. |
void |
setRect(IlpRectKey key,
IlpRect value)
Deprecated. Changes the IlpRect local value of a given property in this
style. |
void |
setRenderer(IlpRendererKey key,
IlpGraphicRenderer value)
Deprecated. Changes the IlpGraphicRenderer local value of a given property
in this style. |
void |
setSearchStrategy(ilog.cpl.style.internal.IlpStyleSearchStrategy strategy)
Deprecated. Sets a new search strategy to this style. |
void |
setString(IlpStringKey key,
String value)
Deprecated. Changes the String local value of a given property in this
style. |
void |
setStringArray(IlpStringArrayKey key,
String[] value)
Deprecated. Changes the String[] local value of a given property in this
style. |
void |
setSwingConstant(IlpSwingConstantKey key,
int value)
Deprecated. Changes the SwingConstant local value of a given property
in this style. |
abstract void |
setValue(IlpKey key,
Object value)
Deprecated. |
void |
setValueMap(IlpValueMapKey key,
IlpValueMap value)
Deprecated. Changes the IlpValueMap local value of a given property
in this style. |
protected void |
transientInit()
Deprecated. Initializes the context information |
protected boolean |
verifyNeededStyleKeys(Collection newKnownKeys)
Deprecated. Returns true if the new key collection contains all
the needed style keys. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface ilog.cpl.style.StyleListener |
|---|
endChangingStyleValues, startChangingStyleValues, styleValueChanged |
| Field Detail |
|---|
public static final Object NotFound
protected ilog.util.internal.IlFastHashtable literals
protected ilog.cpl.style.internal.IlpStyleSearchStrategy searchStrategy
protected IlpContext appContext
protected static final Object _StyleLock
| Constructor Detail |
|---|
protected IlpAbstractStyle()
| Method Detail |
|---|
public void setSearchStrategy(ilog.cpl.style.internal.IlpStyleSearchStrategy strategy)
public ilog.cpl.style.internal.IlpStyleSearchStrategy getSearchStrategy()
public IlpContext getAppContext()
public void setAppContext(IlpContext c)
public Object clone()
clone in class Objectpublic Enumeration keys()
public Collection getKeys()
public ilog.util.internal.IlFastHashtable getLiterals()
public void resetLiterals()
public void cleanLiterals()
public void setLiterals(Object[] keysAndValues)
public void addLiterals(Object[] keysAndValues)
public boolean hasLiteral(IlpKey key)
true if there is a local literal value associated with
the key.
key - Key for the value to check.
public Object getLiteral(IlpKey key)
key - Key for the literal value to retrieve.
null if the value does not
exist as a literal value.
public void setLiteral(IlpKey key,
Object value)
key - The key which value to set.value - The literal value to set. If this value is of type float[]
or int[], it will be converted to type java.lang.Float[]
or java.lang.Integer[], respectively.
IllegalArgumentException - if the value class does not correspond
to the key class.public boolean resetLiteral(IlpKey key)
key - The key for the value to reset.
true if the operation succeeded, false otherwise.public void dispose()
public abstract void setValue(IlpKey key,
Object value)
public abstract Object getValue(IlpKey key)
public abstract boolean hasValue(IlpKey key)
public Object getValue(IlpKey key,
Object defaultValue)
IlpKey in this style.
If this key is not present, the defaultValue is returned.
key - The style key with the value to retrieve.defaultValue - The default value to be used if the key is not present.
public boolean getBoolean(IlpBooleanKey key)
boolean value of a given key in this style.
key - The style key with the value to retrieve.
boolean value corresponding to the given key.
public boolean getBoolean(IlpBooleanKey key,
boolean defaultValue)
boolean value of a given key in this style.
If this key is not present, the defaultValue is returned.
key - The style key with the value to retrieve.defaultValue - The default value to be used if the key is not present.
boolean value corresponding to the given key, or the
default value if the key cannot be found.public Color getColor(IlpColorKey key)
Color value of a given key in this style.
key - The style key with the value to retrieve.
Color value corresponding to the given key.
public Color getColor(IlpColorKey key,
Color defaultValue)
Color value of a given key in this style.
If this key is not present, the defaultValue is returned.
key - The style key with the value to retrieve.defaultValue - The default value to be used if the key is not present.
Color value corresponding to the given key, or
the default value if the key cannot be found.public IlpDomain getDomain(IlpDomainKey key)
IlpDomain value of a given key in this style.
key - The style key with the value to retrieve.
IlpDomain value corresponding to the given key.
public IlpDomain getDomain(IlpDomainKey key,
IlpDomain defaultValue)
IlpDomain value of a given key in this style.
If this key is not present, the defaultValue is returned.
key - The style key with the value to retrieve.defaultValue - The default value to be used if the key is not present.
IlpDomain value corresponding to the given key, or the
default value if the key cannot be found.public IlEnum getEnum(IlpEnumKey key)
IlEnum value of a given key in this style.
key - The style key with the value to retrieve.
IlEnum value corresponding to the given key.
public IlEnum getEnum(IlpEnumKey key,
IlEnum defaultValue)
IlEnum value of a given key in this style.
key - The style key with the value to retrieve.defaultValue - The default value to be used if the key is not present.
IlEnum value corresponding to the given key, or
the default value if the key cannot be found.public Object getEnumArray(IlpEnumArrayKey key)
IlEnum[] array value of a given key in this style.
key - The style key with the value to retrieve.
IlEnum subclass.
public Object getEnumArray(IlpEnumArrayKey key,
Object defaultValue)
IlEnum[] array value of a given key in this style.
If this key is not present, the defaultValue is returned.
key - The style key with the value to retrieve.defaultValue - The default value to be used if the key is not present.
IlEnum subclass, or
the default value if the key cannot be found.public float getFloat(IlpFloatKey key)
float value of a given key in this style.
key - The style key with the value to retrieve.
float value corresponding to the given key.
public float getFloat(IlpFloatKey key,
float defaultValue)
float value of a given key in this style.
If this key is not present, the defaultValue is returned.
key - The style key with the value to retrieve.defaultValue - The default value to be used if the key is not present.
float value corresponding to the given key, or
the default value if the key cannot be found.public Float[] getFloatArray(IlpFloatArrayKey key)
Float[] value of a given key in this style.
key - The style key with the value to retrieve.
Float[] value corresponding to the given key.
public Float[] getFloatArray(IlpFloatArrayKey key,
float[] defaultValue)
Float[] value of a given key in this style.
If this key is not present, the defaultValue is returned.
key - The style key with the value to retrieve.defaultValue - The default value to be used if the key is not present. The
float[] value is converted to a Float[] value.
Float[] value corresponding to the given key, or
the default value if the key cannot be found.
public Float[] getFloatArray(IlpFloatArrayKey key,
Float[] defaultValue)
Float[] value of a given key in this style.
If this key is not present, the defaultValue is returned.
key - The style key with the value to retrieve.defaultValue - The default value to be used if the key is not present.
Float[] value corresponding to the given key, or
the default value if the key cannot be found.public Font getFont(IlpFontKey key)
Font value of a given key in this style.
key - The style key with the value to retrieve.
Font value corresponding to the given key.
public Font getFont(IlpFontKey key,
Font defaultValue)
Font value of a given key in this style.
If this key is not present, the defaultValue is returned.
key - The style key with the value to retrieve.defaultValue - The default value to be used if the key is not present.
Font value corresponding to the given key, or
the default value if the key cannot be found.public Format getFormat(IlpFormatKey key)
Format value of a given key in this style.
key - The style key with the value to retrieve.
Format value corresponding to the given key.
public Format getFormat(IlpFormatKey key,
Format defaultValue)
Format value of a given key in this style.
If this key is not present, the defaultValue is returned.
key - The style key with the value to retrieve.defaultValue - The default value to be used if the key is not present.
Format value corresponding to the given key, or
the default value if the key cannot be found.public Image getImage(IlpImageKey key)
Image value of a given key in this style.
key - The style key with the value to retrieve.
Image value corresponding to the given key.
public Image getImage(IlpImageKey key,
Image defaultValue)
Image value of a given key in this style.
If this key is not present, the defaultValue is returned.
key - The style key with the value to retrieve.defaultValue - The default value to be used if the key is not present.
Image value corresponding to the given key, or
the default value if the key cannot be found.public int getInteger(IlpIntegerKey key)
int value of a given key in this style.
key - The style key with the value to retrieve.
int value corresponding to the given key.
public int getInteger(IlpIntegerKey key,
int defaultValue)
int value of a given key in this style.
If this key is not present, the defaultValue is returned.
key - The style key with the value to retrieve.defaultValue - The default value to be used if the key is not present.
int value corresponding to the given key, or
the default value if the key cannot be found.public Integer[] getIntegerArray(IlpIntegerArrayKey key)
Integer[] value of a given key in this style.
key - The style key with the value to retrieve.
Integer[] value corresponding to the given key
public Integer[] getIntegerArray(IlpIntegerArrayKey key,
int[] defaultValue)
Integer[] value of a given key in this style.
If this key is not present, the defaultValue is returned.
key - The style key with the value to retrieve.defaultValue - The default value to be used if the key is not present. The
int[] value is converted to a Integer[] value.
Integer[] value corresponding to the given key,
or the default value if the key cannot be found.
public Integer[] getIntegerArray(IlpIntegerArrayKey key,
Integer[] defaultValue)
Integer[] value of a given key in this style.
If this key is not present, the defaultValue is returned.
key - The style key with the value to retrieve.defaultValue - The default value to be used if the key is not present.
Integer[] value corresponding to the given key,
or the default value if the key cannot be found.public IlpInteractor getInteractor(IlpInteractorKey key)
IlpInteractor value of a given key in this style.
key - The style key with the value to retrieve.
IlpInteractor value corresponding to the given
key.
public IlpInteractor getInteractor(IlpInteractorKey key,
IlpInteractor defaultValue)
IlpInteractor value of a given key in this style.
If this key is not present, the defaultValue is returned.
key - The style key with the value to retrieve.defaultValue - The default value to be used if the key is not present.
IlpInteractor value corresponding to the given
key, or the default value if the key cannot be found.public IlpPoint getPoint(IlpPointKey key)
IlpPoint value of a given key in this style.
key - The style key with the value to retrieve.
IlpPoint value corresponding to the given key.
public IlpPoint getPoint(IlpPointKey key,
IlpPoint defaultValue)
IlpPoint value of a given key in this style.
key - The style key with the value to retrieve.defaultValue - The default value to be used if the key is not present.
IlpPoint value corresponding to the given key,
or the default value if the key cannot be found.public IlpRect getRect(IlpRectKey key)
IlpRect value of a given key in this style.
key - The style key with the value to retrieve.
IlpRect value corresponding to the given key.
public IlpRect getRect(IlpRectKey key,
IlpRect defaultValue)
IlpRect value of a given key in this style.
key - The style key with the value to retrieve.defaultValue - The default value to be used if the key is not present.
IlpRect value corresponding to the given key,
or the default value if the key cannot be found.public IlpGraphicRenderer getRenderer(IlpRendererKey key)
IlpGraphicRenderer value of a given key in this
style.
key - The style key with the value to retrieve.
IlpGraphicRenderer value corresponding to the
given key.public IlpGraphicRenderer getRenderer(