|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.cpl.model.IlpDefaultAttributeGroup
ilog.cpl.model.IlpExtendedAttributeGroup
public class IlpExtendedAttributeGroup
This class defines an attribute model that contains local attributes and also attributes from other attribute models.
| Constructor Summary | |
|---|---|
IlpExtendedAttributeGroup()
Default constructor. |
|
IlpExtendedAttributeGroup(IlpAttributeGroup defaultModel)
Creates a new group with the given attribute group as a default group. |
|
IlpExtendedAttributeGroup(String name)
Creates a new attribute group with the given name. |
|
| Method Summary | |
|---|---|
void |
addAttributeGroup(IlpAttributeGroup model)
Adds the given model to be used by this one. |
void |
attributeAdded(AttributeGroupEvent ev)
Is called when an attribute is added to an IlpAttributeGroup. |
void |
attributeChanged(AttributeGroupEvent ev)
Is called when an attribute is changed in an IlpAttributeGroup. |
void |
attributeRemoved(AttributeGroupEvent ev)
Is called when an attribute is removed from an IlpAttributeGroup. |
IlpAttribute |
getAttribute(String name)
Returns a class instance attribute. |
Collection |
getAttributeGroups()
Returns the list of all attribute groups being used by this one. |
Collection |
getAttributes()
Returns the collection of visible attributes present in this model. |
Collection |
getDeclaredAttributes()
Returns the collection of attributes declared in this model. |
IlpAttributeGroup |
getDefaultAttributeGroup()
Returns the default attribute group. |
String |
getGroupName()
Returns the name of this group, otherwise returns null; |
String |
getName()
Returns the Attribute Group name, if one exist. |
boolean |
hasAttribute(IlpAttribute attr)
Indicates whether the given attribute is part of the model. |
boolean |
hasAttributeGroup(IlpAttributeGroup model)
Indicates whether this extended attribute model is using another model. |
boolean |
isAttributeVisible(IlpAttribute attr)
Checks whether the given attribute is visible or not. |
void |
modelStructureChanged(AttributeGroupEvent ev)
Is called when the attribute model has undergone several modifications. |
void |
removeAttributeGroup(IlpAttributeGroup model)
Removes the given model from the list of models. |
void |
setAttributeVisible(IlpAttribute attr,
boolean visible)
Sets whether the given attribute should be visible to users of the model. |
void |
setDefaultAttributeGroup(IlpAttributeGroup group)
Sets the default attribute group. |
| Methods inherited from class ilog.cpl.model.IlpDefaultAttributeGroup |
|---|
addAttribute, addAttributeGroupListener, endChangingAttributeGroup, fireEvent, removeAttribute, removeAttributeGroupListener, startChangingAttributeGroup |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IlpExtendedAttributeGroup()
public IlpExtendedAttributeGroup(IlpAttributeGroup defaultModel)
public IlpExtendedAttributeGroup(String name)
| Method Detail |
|---|
public Collection getAttributes()
This implementation returns a collection where the attributes are in the following order:
When an attribute is made invisible and then visible again, its position in the collection will be the same as if the attribute had been removed and inserted in the group.
getAttributes in interface IlpAttributeGroupgetAttributes in class IlpDefaultAttributeGroupIlpAttribute instances.public Collection getDeclaredAttributes()
The attributes are returned in the insertion order. When an attribute is made invisible and then visible again, its position in the list will be the same as if the attribute had been removed and added to the group.
getDeclaredAttributes in interface IlpAttributeGroupgetDeclaredAttributes in class IlpDefaultAttributeGroupIlpAttribute instances.IlpDefaultAttributeGroup.getAttributes()public IlpAttribute getAttribute(String name)
getAttribute in interface IlpAttributeGroupgetAttribute in class IlpDefaultAttributeGroupname - The name of the class instance attribute to be retrieved.
null
if there is no matching attribute.public boolean hasAttribute(IlpAttribute attr)
hasAttribute in interface IlpAttributeGrouphasAttribute in class IlpDefaultAttributeGroup
public void setAttributeVisible(IlpAttribute attr,
boolean visible)
Attributes that are not visible will not be included in
the list returned by getAttributes, but they will be
accessible through the other APIs.
Used to hide certain attributes from the reference model.
This method fires ATTRIBUTE_ADDED or ATTRIBUTE_REMOVED
events according to the given visibility status.
setAttributeVisible in class IlpDefaultAttributeGroupIllegalArgumentException - if the given attribute is not
part of the model.public boolean isAttributeVisible(IlpAttribute attr)
isAttributeVisible in class IlpDefaultAttributeGrouptrue if the attribute is contained in the model and visible.public String getName()
getName in interface IlpAttributeGroupgetName in class IlpDefaultAttributeGrouppublic String getGroupName()
getGroupName in interface ilog.cpl.model.internal.IlpAttributeGroupHierarchypublic void attributeAdded(AttributeGroupEvent ev)
IlpAttributeGroup.
attributeAdded in interface AttributeGroupListenerpublic void attributeRemoved(AttributeGroupEvent ev)
IlpAttributeGroup.
attributeRemoved in interface AttributeGroupListenerpublic void attributeChanged(AttributeGroupEvent ev)
IlpAttributeGroup.
attributeChanged in interface AttributeGroupListenerpublic void modelStructureChanged(AttributeGroupEvent ev)
modelStructureChanged in interface AttributeGroupListenerpublic boolean hasAttributeGroup(IlpAttributeGroup model)
model - The model that may be used by this extended attribute model.
true if the model is used by this extended attribute model.public void addAttributeGroup(IlpAttributeGroup model)
This method fires a MODEL_STRUCTURE_CHANGE event
to the listeners.
public void removeAttributeGroup(IlpAttributeGroup model)
This method fires a MODEL_STRUCTURE_CHANGE event
to the listeners.
public IlpAttributeGroup getDefaultAttributeGroup()
The default attribute group is the first one used by this extended attribute group, which can be set or passed at construction time.
getDefaultAttributeGroup in interface ilog.cpl.model.internal.IlpAttributeGroupHierarchy
public void setDefaultAttributeGroup(IlpAttributeGroup group)
throws IllegalArgumentException
The default attribute group must be contained in this attribute group
otherwise, an IllegalArgumentException is thrown.
IllegalArgumentException - when the given attribute group is unknown.public Collection getAttributeGroups()
addAttributeGroup(ilog.cpl.model.IlpAttributeGroup)
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||