|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.etools.iseries.edit.language.model.LanguageModelElement
public class LanguageModelElement
This element is used to represent a node in a tree of elements. This element knows about its children, and its parent. A programmer may associate any object with this element by using the setData and getData methods. Elements are presented in the Outline view. The element may have attributes that are shown in the Properties view.
Field Summary | |
---|---|
protected LanguageModelElement |
_elementParent
|
protected int |
_iLineNumberFirst
|
protected int |
_iLineNumberLast
|
protected LanguageModel |
_model
|
protected String |
_name
|
protected Object |
_objData
|
protected String |
_strImage
|
protected String |
_strName
|
protected Vector |
_vectorAttributes
|
protected Vector |
_vectorChildElements
|
static String |
Copyright
|
Constructor Summary | |
---|---|
LanguageModelElement(LanguageModel model,
LanguageModelElement elementParent,
String strName,
String strImage,
int iLineNumberFirst,
int iLineNumberLast)
Constructor. |
|
LanguageModelElement(String name,
LanguageModel model,
LanguageModelElement elementParent,
String strName,
String strImage,
int iLineNumberFirst,
int iLineNumberLast)
Constructor. |
|
LanguageModelElement(String name,
LanguageModel model,
LanguageModelElement elementParent,
String strName,
String strImage,
int iLineNumberFirst,
int iLineNumberLast,
int iIndex)
Constructor. |
Method Summary | |
---|---|
void |
addAttribute(LanguageModelAttribute attribute)
Adds an attribute to this element. |
protected void |
addChildElement(LanguageModelElement element)
Adds a child element to the end of the element list. |
protected void |
addChildElement(LanguageModelElement element,
int iIndex)
Adds a child element to the specified location in the zero based list. |
LanguageModelElement |
findElementFromHashValue(int iHashValue)
Searches the element tree for an element with the hash value. |
Object |
getAdapter(Class adapter)
Returns an object which is an instance of the given class associated with this object. |
LanguageModelAttribute |
getAttribute(String strAttributeName)
Returns the attribute given the attribute name. |
String |
getAttributeValue(String strAttributeName)
Returns the value of an attribute given the attribute's name. |
LanguageModelElement |
getChildElement(String strElementName)
Returns the first child element with the given name. |
LanguageModelElement |
getChildElementAt(int iIndex)
Returns the element at the given position in the list. |
int |
getChildElementIndex(LanguageModelElement elementChild)
Returns the position of the given child element in the list of child elements. |
Iterator |
getChildren()
Returns the children in the form of an iterator. |
void |
getData(Object objData)
Obtains the associated user data of this element. |
Object |
getEditableValue()
Returns a value for this object that can be edited in a property sheet. |
LanguageModelElement |
getElementFromLineNumber(int iLineNumber)
Returns the farthest element branch in the tree that is at this line number. |
String |
getImageName()
Returns the name of the image file. |
int |
getLineRangeExtent()
Returns the number of lines that this element covers. |
int |
getLineRangeOrigin()
Returns the first line number that this element covers. |
LanguageModel |
getModel()
Returns the model that contains this element. |
String |
getName()
|
int |
getNumberOfAttributes()
Returns the number of attributes that this element contains. |
int |
getNumberOfChildElements()
Returns the number of child elements that this element contains. |
LanguageModelElement |
getParent()
Returns the parent element of this element. |
IPropertyDescriptor[] |
getPropertyDescriptors()
Returns an array of property descriptors, ne for each attribute. |
Object |
getPropertyValue(Object objName)
Returns the current value for the named property. |
boolean |
hasChildren()
Returns whether this element contains child elements. |
boolean |
hasDescendent(LanguageModelElement element)
Determines whether the given element is a descendent of this one. |
boolean |
isPropertySet(Object property)
Returns whether the property value has changed from the default. |
void |
printElementTree()
Debug function that prints the entire element tree, and each element's attributes starting at this element. |
void |
printElementTree(int iIndentation)
Debug function that prints the entire element tree, and each element's attributes starting at this element. |
void |
removeAllChildElements()
Removes all child elements of this element. |
void |
removeChildElement(LanguageModelElement elementChild)
Removes the given child element from this element. |
void |
resetPropertyValue(Object id)
Resets the property with the given id to its default value if possible. |
void |
setData(Object objData)
Associates user data with this element. |
void |
setPropertyValue(Object objName,
Object objValue)
Sets the named property (attribute) to the given value (string). |
String |
toString()
Returns the name of the element. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String Copyright
protected LanguageModel _model
protected LanguageModelElement _elementParent
protected Object _objData
protected String _strImage
protected String _strName
protected String _name
protected Vector _vectorChildElements
protected Vector _vectorAttributes
protected int _iLineNumberFirst
protected int _iLineNumberLast
Constructor Detail |
---|
public LanguageModelElement(LanguageModel model, LanguageModelElement elementParent, String strName, String strImage, int iLineNumberFirst, int iLineNumberLast)
public LanguageModelElement(String name, LanguageModel model, LanguageModelElement elementParent, String strName, String strImage, int iLineNumberFirst, int iLineNumberLast)
public LanguageModelElement(String name, LanguageModel model, LanguageModelElement elementParent, String strName, String strImage, int iLineNumberFirst, int iLineNumberLast, int iIndex)
Method Detail |
---|
public String getName()
public void addAttribute(LanguageModelAttribute attribute)
protected void addChildElement(LanguageModelElement element)
protected void addChildElement(LanguageModelElement element, int iIndex)
public LanguageModelElement findElementFromHashValue(int iHashValue)
public Object getAdapter(Class adapter)
null
if
no such object can be found. This class is an IPropertySource.
public LanguageModelAttribute getAttribute(String strAttributeName)
public String getAttributeValue(String strAttributeName)
public LanguageModelElement getChildElement(String strElementName)
public LanguageModelElement getChildElementAt(int iIndex)
public int getChildElementIndex(LanguageModelElement elementChild)
public Iterator getChildren()
public void getData(Object objData)
public Object getEditableValue()
public LanguageModelElement getElementFromLineNumber(int iLineNumber)
public LanguageModel getModel()
public String getImageName()
public int getLineRangeExtent()
public int getLineRangeOrigin()
public int getNumberOfAttributes()
public int getNumberOfChildElements()
public LanguageModelElement getParent()
public IPropertyDescriptor[] getPropertyDescriptors()
public Object getPropertyValue(Object objName)
public boolean hasChildren()
public boolean hasDescendent(LanguageModelElement element)
public boolean isPropertySet(Object property)
public void printElementTree()
public void printElementTree(int iIndentation)
public void removeAllChildElements()
public void removeChildElement(LanguageModelElement elementChild)
public void resetPropertyValue(Object id)
public void setPropertyValue(Object objName, Object objValue)
public void setData(Object objData)
public String toString()
toString
in class Object
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |