ilog.cpl.style
Class IlpBoundAttributeStyleValueProvider

java.lang.Object
  extended by ilog.cpl.style.IlpAbstractStyleValueProvider
      extended by ilog.cpl.style.IlpAttributeStyleValueProvider
          extended by ilog.cpl.style.IlpBoundAttributeStyleValueProvider
All Implemented Interfaces:
AttributeValueListener, IlpStyleValueProvider, StyleChangeListener, Serializable, Cloneable, EventListener

Deprecated. The Style API has been replaced by the Cascading Style Sheet mechanism. Refer to the User's Manual for further information.

public class IlpBoundAttributeStyleValueProvider
extends IlpAttributeStyleValueProvider
implements AttributeValueListener

Returns the value of an attribute in a specific instance of IlpAttributeValueHolder.

Attribute value changes are automatically notified to the style, where this instance is registered.

Note that instances of this class are not persistent.

Since:
JTGO 3.0
See Also:
Serialized Form
Deprecated Since:
JTGO 3.5

Field Summary
protected  WeakReference attributeHolderReference
          Deprecated. The object that holds the attribute values
 
Fields inherited from class ilog.cpl.style.IlpAttributeStyleValueProvider
valueAttribute, valueType
 
Fields inherited from class ilog.cpl.style.IlpAbstractStyleValueProvider
dependentStyles, styleListeners, supportNotification
 
Constructor Summary
IlpBoundAttributeStyleValueProvider(IlpAttribute attr, IlpAttributeValueHolder holder)
          Deprecated. IlpBoundAttributeStyleValueProvider constructor.
 
Method Summary
 void addDependentStyle(IlpKey key, IlpStyle style)
          Deprecated. Indicates that the given style is using this style value provider for the given key.
 void attributeValueChange(AttributeValueEvent ev)
          Deprecated. Listens to attribute value changes, and notifies it to the listeners.
 Object getAttributeValue(IlpStyleContext styleContext)
          Deprecated. Returns the current value of the attribute in the local attribute value holder.
protected  IlpAttributeValueHolder getHolder()
          Deprecated. Returns the attribute value holder where we look for the attribute value.
 String getStringValue()
          Deprecated. Returns the value of the given style as a string.
 void removeDependentStyle(IlpKey key, IlpStyle style)
          Deprecated. Indicates that the given style is no longer using this style value provider for the given key.
 
Methods inherited from class ilog.cpl.style.IlpAttributeStyleValueProvider
clone, getValue, getValueAttribute, getValueType, toString
 
Methods inherited from class ilog.cpl.style.IlpAbstractStyleValueProvider
addStyleChangeListener, fireStyleChangeEvent, fireStyleChangeEvent, hasDependentStyles, removeStyleChangeListener, setSupportNotification, specificAddDependentStyle, specificRemoveDependentStyle, styleChanged
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

attributeHolderReference

protected WeakReference attributeHolderReference
Deprecated. 
The object that holds the attribute values

Internal method or field: do not use!
Constructor Detail

IlpBoundAttributeStyleValueProvider

public IlpBoundAttributeStyleValueProvider(IlpAttribute attr,
                                           IlpAttributeValueHolder holder)
Deprecated. 
IlpBoundAttributeStyleValueProvider constructor. Creates a value provider which listens to attribute value changes in the given IlpAttributeValueHolder. These changes are notified to all the dependent styles.

Parameters:
attr - Attribute being listened
holder - Object which contains the attributes
Method Detail

getHolder

protected IlpAttributeValueHolder getHolder()
Deprecated. 
Returns the attribute value holder where we look for the attribute value.

Internal method or field: do not use!

addDependentStyle

public void addDependentStyle(IlpKey key,
                              IlpStyle style)
Deprecated. 
Indicates that the given style is using this style value provider for the given key.

This method is called whenever we set this instance in a style, using IlpStyle.setValueProvider.

Specified by:
addDependentStyle in interface IlpStyleValueProvider
Overrides:
addDependentStyle in class IlpAbstractStyleValueProvider
Parameters:
key - The key which is dependent on this style value provider.
style - The style with the dependent key.
See Also:
IlpStyle.setValueProvider(ilog.cpl.style.key.IlpKey, ilog.cpl.style.IlpStyleValueProvider, boolean)

removeDependentStyle

public void removeDependentStyle(IlpKey key,
                                 IlpStyle style)
Deprecated. 
Indicates that the given style is no longer using this style value provider for the given key.

This method is called whenever we remove this instance from a style, either calling IlpStyle.resetToDefaultValue or IlpStyle.setValueProvider.

Specified by:
removeDependentStyle in interface IlpStyleValueProvider
Overrides:
removeDependentStyle in class IlpAbstractStyleValueProvider
Parameters:
key - The key that was dependent on this style value provider.
style - The style with the dependent key.
See Also:
IlpStyle.setValueProvider(ilog.cpl.style.key.IlpKey, ilog.cpl.style.IlpStyleValueProvider, boolean)

attributeValueChange

public void attributeValueChange(AttributeValueEvent ev)
Deprecated. 
Listens to attribute value changes, and notifies it to the listeners.

Specified by:
attributeValueChange in interface AttributeValueListener
Internal method or field: do not use!

getAttributeValue

public Object getAttributeValue(IlpStyleContext styleContext)
Deprecated. 
Returns the current value of the attribute in the local attribute value holder.

Overrides:
getAttributeValue in class IlpAttributeStyleValueProvider
Parameters:
styleContext - Style context.
Returns:
Current value of the attribute.

getStringValue

public String getStringValue()
Deprecated. 
Returns the value of the given style as a string. This method is not used by attribute style value providers and simply returns null.

Specified by:
getStringValue in interface IlpStyleValueProvider
Overrides:
getStringValue in class IlpAttributeStyleValueProvider
Returns:
Value correctly formatted as a string.


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.