|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpl.edu.agh.cast.model.attributes.Attribute
public class Attribute
Stores information about a single attribute registered in an attribute manager.
Two Attribute
s are considered equal if their names are equal.
Field Summary | |
---|---|
static String |
PROPERTY_SHOW_AS_LABEL
ID of the ShowAsLabel property. |
Constructor Summary | |
---|---|
Attribute(String name,
boolean nameIsLocalizable,
ValueType type,
Object defaultValue,
boolean permanent,
boolean editable,
boolean showAsLabel,
String ownerTypeName,
String modelExtensionId)
Constructor. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener l)
Add a property change listener to the object. |
int |
compareTo(Attribute o)
|
Attribute |
copy()
Returns a copy of this Attribute instance. |
boolean |
equals(Object obj)
Two Attribute s are considered equal if their names are equal. |
protected void |
firePropertyChange(String property,
Object oldValue,
Object newValue)
|
AttributeMergePolicy |
getDefaultMergePolicy()
|
Object |
getDefaultValue()
|
String |
getDisplayName()
The human readable name of the attribute. |
String |
getName()
|
ValueType |
getType()
|
int |
hashCode()
|
boolean |
isEditable()
|
boolean |
isNameLocalizable()
|
boolean |
isPermanent()
|
boolean |
isShowAsLabel()
|
protected Object |
readResolve()
|
void |
removePropertyChangeListener(PropertyChangeListener l)
Remove a property change listener to the object. |
void |
setDefaultMergePolicy(AttributeMergePolicy defaultMergePolicy)
|
void |
setShowAsLabel(boolean showAsLabel)
Sets new value of showAsLabel flag. |
String |
toString()
|
boolean |
validateValue(Object value)
Checks if given value is valid for this attribute. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String PROPERTY_SHOW_AS_LABEL
Constructor Detail |
---|
public Attribute(String name, boolean nameIsLocalizable, ValueType type, Object defaultValue, boolean permanent, boolean editable, boolean showAsLabel, String ownerTypeName, String modelExtensionId)
name
- name of the attributenameIsLocalizable
- whether the name is localizabletype
- value typedefaultValue
- default attribute valuepermanent
- whether the attribute is permanenteditable
- whether the attribute can be editedshowAsLabel
- whether the attribute should be displayed in labelownerTypeName
- the name of the type (in some domain model) which defines this attribute - it might be null, if the
attribute is created, but it doesn't matter since such attributes are not localizablemodelExtensionId
- the ID of the model extension in which this attribute is defined. It might be null if the attribute is
created by user or it is some predefined attribute. In the first case, the attribute is not
localizable, in the second, the localized message is taken from the Core plug-in.Method Detail |
---|
public ValueType getType()
public boolean isPermanent()
public boolean isNameLocalizable()
public boolean isEditable()
public boolean isShowAsLabel()
public String getName()
public Object getDefaultValue()
public String getDisplayName()
public boolean validateValue(Object value)
value
- value to check
public boolean equals(Object obj)
Attribute
s are considered equal if their names are equal.
equals
in class Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
public int compareTo(Attribute o)
compareTo
in interface Comparable<Attribute>
Comparable.compareTo(java.lang.Object)
public String toString()
toString
in class Object
Object.toString()
public void setShowAsLabel(boolean showAsLabel)
PROPERTY_SHOW_AS_LABEL
event.
showAsLabel
- new showAsLabel valuepublic Attribute copy()
Attribute
instance.
protected Object readResolve()
public void addPropertyChangeListener(PropertyChangeListener l)
addPropertyChangeListener
in interface IPropertyChangeProvider
l
- property change listenerIPropertyChangeProvider.addPropertyChangeListener(java.beans.PropertyChangeListener)
public void removePropertyChangeListener(PropertyChangeListener l)
removePropertyChangeListener
in interface IPropertyChangeProvider
l
- property change listener#removePropertyChangeListener(java.beans.PropertyChangeListener)
protected void firePropertyChange(String property, Object oldValue, Object newValue)
public AttributeMergePolicy getDefaultMergePolicy()
public void setDefaultMergePolicy(AttributeMergePolicy defaultMergePolicy)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |