public class IlpExtendedAttributeGroup extends IlpDefaultAttributeGroup implements AttributeGroupListener, ilog.cpl.model.internal.IlpAttributeGroupHierarchy
| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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<IlpAttributeGroup> |
getAttributeGroups()
Returns the list of all attribute groups being used by this one.
|
Collection<IlpAttribute> |
getAttributes()
Returns the collection of visible attributes present in this model.
|
Collection<IlpAttribute> |
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.
|
addAttribute, addAttributeGroupListener, endChangingAttributeGroup, fireEvent, removeAttribute, removeAttributeGroupListener, startChangingAttributeGrouppublic IlpExtendedAttributeGroup()
public IlpExtendedAttributeGroup(IlpAttributeGroup defaultModel)
public IlpExtendedAttributeGroup(String name)
public Collection<IlpAttribute> 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<IlpAttribute> 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 IlpDefaultAttributeGrouppublic 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.IlpAttributeGroupHierarchypublic 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<IlpAttributeGroup> getAttributeGroups()
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.