|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.actf.model.AbstractModel
public abstract class AbstractModel
provides basic services for any model instance. Note that the IGuiModel interface must be implemented as well by clients that wish to validate structures via validation documents using the ACTF Engine.
org.eclipse.actf.core.model.IGuiModel
Field Summary | |
---|---|
protected String |
baseType
|
protected IConfiguration |
configuration
|
protected INodeLocator |
locator
|
protected IRuntimeContext |
runtimeContext
|
protected ITreeNodeWalker |
treeNodeWalker
|
Constructor Summary | |
---|---|
AbstractModel(String type)
create a new model |
Method Summary | |
---|---|
void |
addModelChangeListener(IModelChangeListener listener)
adds a listener to receive notifications when this model's structure or properties of its nodes are changed |
protected void |
fireModelChangeEvent(ModelChangeEvent mce)
fire a ModelChangeEvent notification for this model |
String |
getBaseType()
|
String |
getDefaultAliasPrefix()
returns the default alias prefix. |
String |
getName()
return the type of the model. |
String |
getNodeId(Object element)
default implementation returns the hexadecimal representation of System.identityHashCode of
the given element. |
INodeLocator |
getNodeLocator()
retrieves a locator for finding and identifying nodes in the model. |
String |
getNodeName(Object element)
return the short name of this element. returns the qualified class name (i.e. without the package name) of the given element |
int |
getOrder(Object head)
get the order of the graph-based model starting at the given head. |
String[] |
getPackageNames()
returns empty array |
ITreeNodeWalker |
getTreeWalker()
retrieve the NodeWalker for traversing elements in this model |
void |
removeModelChangeListener(IModelChangeListener listener)
remove the given listener from the list of listeners to be notified when this model is updated |
protected void |
setFilters()
|
protected void |
setModelType(String type)
|
void |
setNodeID(Object comp,
String id)
set the id for a component in the hierarchy |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected IConfiguration configuration
protected IRuntimeContext runtimeContext
protected INodeLocator locator
protected ITreeNodeWalker treeNodeWalker
protected String baseType
Constructor Detail |
---|
public AbstractModel(String type)
type
- -
type of modelMethod Detail |
---|
public String getName()
org.eclipse.actf.core.config.Configuration
.
getName
in interface IModel
IConfiguration
protected void setModelType(String type)
public String[] getPackageNames()
getPackageNames
in interface IModel
org.eclipse.actf.core.processor.CodeProcessor
public void setNodeID(Object comp, String id)
setNodeID
in interface IModel
comp
- - component for which id is to be setid
- - id for componentpublic String getNodeId(Object element)
System.identityHashCode
of
the given element.
getNodeId
in interface IModel
element
- - element for which id is desired
System.identityHashCode(Object)
public String getNodeName(Object element)
getNodeName
in interface IModel
element
- - element for which name is desired
null
if not availablepublic String getDefaultAliasPrefix()
getDefaultAliasPrefix
in interface IModel
public ITreeNodeWalker getTreeWalker()
NodeWalker
for traversing elements in this model
getTreeWalker
in interface IModel
null
if
no walker is availablepublic INodeLocator getNodeLocator()
getNodeLocator
in interface IModel
public void addModelChangeListener(IModelChangeListener listener)
addModelChangeListener
in interface IModel
listener
- - listener to be notified of updates to the modelpublic void removeModelChangeListener(IModelChangeListener listener)
removeModelChangeListener
in interface IModel
listener
- - listener to be removedprotected void fireModelChangeEvent(ModelChangeEvent mce)
mce
- the ModelChangeEvent
The method triggered will vary
depending on the event type: NODE_INSERTED, NODE_REMOVED,
NODE_MODIFIEDprotected void setFilters()
public String getBaseType()
getBaseType
in interface IModel
public int getOrder(Object head)
IModel
getOrder
in interface IModel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |