ilog.cpl.table
Class IlpDefaultTableRow

java.lang.Object
  extended by ilog.cpl.table.IlpDefaultTableRow
All Implemented Interfaces:
ilog.cpl.css.internal.IlpCSSObject, IlpAttributeValueHolder, IlpRepresentationObject, IlpTableRow

public class IlpDefaultTableRow
extends Object
implements IlpTableRow, ilog.cpl.css.internal.IlpCSSObject

This is the default representation object to be used to represent rows in a table. This object can directly hold values for attributes or use an IlpObject which holds these values.

Since:
JTGO 3.0

Field Summary
 
Fields inherited from interface ilog.cpl.model.IlpAttributeValueHolder
VALUE_NOT_SET
 
Constructor Summary
IlpDefaultTableRow(IlpAttributeGroup model)
          Creates a table representation object.
IlpDefaultTableRow(IlpObject object, IlpExtendedAttributeGroup model)
          Creates a table representation object from an IlpObject.
 
Method Summary
 void addAttributeValueListener(AttributeValueListener l)
          Adds a listener to attribute value changes.
 void fireEvent(AttributeValueEvent ev)
          Fires an event to the listeners.
 IlpAttributeGroup getAttributeGroup()
          Returns the model that defines which attributes are allowed in this instance.
 Object getAttributeValue(IlpAttribute a)
          Retrieves the value of an attribute of this object.
 Object getAttributeValue(String name)
          Returns the value of an attribute of this object.
 String getCSSClasses()
          Returns the CSS classes of the object.
 String getCSSID(IlpContext appc)
          Returns the ID of the object.
 String getCSSType()
          Returns the type of the object.
 ilog.cpl.model.edit.IlpRepresentationObjectEditor getEditor()
          Get the editor for this object.
 IlpObject getIlpObject()
          Retrieves the IlpObject of this representation.
 boolean hasAttributeValue(IlpAttribute a)
          Returns true if the requested attribute is part of the attribute group of this instance and if a value has been set for this attribute.
 void removeAttributeValueListener(AttributeValueListener l)
          Removes the given listener from the attribute value changes notifications.
 void setAttributeValue(IlpAttribute attribute, Object value)
          Sets the value of an attribute of this object.
 void setAttributeValue(String name, Object value)
          Sets the value of an attribute of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlpDefaultTableRow

public IlpDefaultTableRow(IlpObject object,
                          IlpExtendedAttributeGroup model)
Creates a table representation object from an IlpObject.

Parameters:
object - The business object which will be represented as a row in the table.
model - The group of attributes managed by this table representation object.

IlpDefaultTableRow

public IlpDefaultTableRow(IlpAttributeGroup model)
Creates a table representation object.

Parameters:
model - The group of attributes managed by this table representation object.
Method Detail

getIlpObject

public IlpObject getIlpObject()
Retrieves the IlpObject of this representation.

Specified by:
getIlpObject in interface IlpRepresentationObject
Returns:
The IlpObject of this representation.

getAttributeGroup

public IlpAttributeGroup getAttributeGroup()
Returns the model that defines which attributes are allowed in this instance.

Specified by:
getAttributeGroup in interface IlpAttributeValueHolder

getAttributeValue

public Object getAttributeValue(IlpAttribute a)
Retrieves the value of an attribute of this object.

Specified by:
getAttributeValue in interface IlpAttributeValueHolder
Parameters:
a - The attribute whose value is to be retrieved.
Returns:
The value of the attribute or VALUE_NOT_SET if no value has been set.

hasAttributeValue

public boolean hasAttributeValue(IlpAttribute a)
Returns true if the requested attribute is part of the attribute group of this instance and if a value has been set for this attribute.

Specified by:
hasAttributeValue in interface IlpAttributeValueHolder

setAttributeValue

public void setAttributeValue(IlpAttribute attribute,
                              Object value)
Sets the value of an attribute of this object. To remove the value of an attribute, you can pass VALUE_NOT_SET for the value argument.

Specified by:
setAttributeValue in interface IlpAttributeValueHolder
Parameters:
attribute - The attribute whose value is set.
value - The new value of the attribute or VALUE_NOT_SET to remove the value of the attribute.
Throws:
IllegalArgumentException - if the attribute cannot have its value modified.

getAttributeValue

public Object getAttributeValue(String name)
Returns the value of an attribute of this object.

Specified by:
getAttributeValue in interface IlpAttributeValueHolder
Parameters:
name - The name of the attribute.
Returns:
The value of the attribute.
Since:
JTGO 4.0

setAttributeValue

public void setAttributeValue(String name,
                              Object value)
Sets the value of an attribute of this object. If the attribute does not exist, a default attribute with the given name will be created and added to the local attribute model.

Specified by:
setAttributeValue in interface IlpAttributeValueHolder
Parameters:
name - The name of the attribute.
value - The new value of the attribute.
Since:
JTGO 4.0

addAttributeValueListener

public void addAttributeValueListener(AttributeValueListener l)
Adds a listener to attribute value changes.

Specified by:
addAttributeValueListener in interface IlpAttributeValueHolder

removeAttributeValueListener

public void removeAttributeValueListener(AttributeValueListener l)
Removes the given listener from the attribute value changes notifications.

Specified by:
removeAttributeValueListener in interface IlpAttributeValueHolder

fireEvent

public void fireEvent(AttributeValueEvent ev)
Fires an event to the listeners.

Specified by:
fireEvent in interface IlpAttributeValueHolder

getEditor

public ilog.cpl.model.edit.IlpRepresentationObjectEditor getEditor()
Description copied from interface: IlpRepresentationObject
Get the editor for this object. Should never return null. When the representation object is being updated, it should delegate all calls to getAttributeValue to the editor. In this case it should also stop propagating attribute value change events received from the BO.

Specified by:
getEditor in interface IlpRepresentationObject
Internal method or field: do not use!

getCSSType

public String getCSSType()
Returns the type of the object.

Specified by:
getCSSType in interface ilog.cpl.css.internal.IlpCSSObject
Returns:
The string representing the type of the object in the model. Null is accepted.
Since:
JTGO 3.5
Internal method or field: do not use!

getCSSID

public String getCSSID(IlpContext appc)
Returns the ID of the object.

Specified by:
getCSSID in interface ilog.cpl.css.internal.IlpCSSObject
Parameters:
appc - The context
Returns:
The string representing the ID. null is accepted
Since:
JTGO 3.5
Internal method or field: do not use!

getCSSClasses

public String getCSSClasses()
Returns the CSS classes of the object.

Specified by:
getCSSClasses in interface ilog.cpl.css.internal.IlpCSSObject
Returns:
The string representing the css classes, separated by ' '. Null is accepted.
Since:
JTGO 3.5
Internal method or field: do not use!


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