|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IModel
a model embodies any object that can be represented as a directed graph. Such a structure possesses the following characteristics:
This abstraction allows ACTF componentry to examine and manipulate structures
composed of a variety of nodes and or created and assembled in a multitude of runtime platforms. Supported
models are declared using the org.eclipse.actf.model.modelTypes
extension point.
The IRenderableModel
sub-interface is used by ACTF to examine and manipulate structures that can be
rendered, like a graphical user interface (GUI) or Document Object Model (DOM) tree in a browser. Besides
the properties of a general model structure, it reveals more GUI-specific behaviors
and attributes.
IRenderableModel
Method Summary | |
---|---|
void |
addModelChangeListener(IModelChangeListener listener)
adds a listener to receive notifications when this model's structure or properties of its nodes are changed |
String |
getBaseType()
|
String |
getDefaultAliasPrefix()
returns the default alias prefix. |
String |
getName()
return the type of the model. |
String |
getNodeId(Object element)
return the id for this component. |
INodeLocator |
getNodeLocator()
retrieves a locator for finding and identifying nodes in the model. |
String |
getNodeName(Object element)
return the short name of this element. |
INodeWalker |
getNodeWalker()
retrieve the NodeWalker for traversing elements in this model |
int |
getOrder(Object head)
get the order of the graph-based model starting at the given head. |
String[] |
getPackageNames()
returns an array of the names of packages to be imported by CodeProcessors. |
String |
getTypeName(String nodeName)
returns the type name associated with this nodeName. |
void |
removeModelChangeListener(IModelChangeListener listener)
remove the given listener from the list of listeners to be notified when this model is updated |
void |
setNodeID(Object comp,
String id)
set the id for a component in the model |
Method Detail |
---|
String getName()
org.eclipse.actf.core.config.Configuration
.
IConfiguration
int getOrder(Object head)
INodeLocator getNodeLocator()
INodeWalker getNodeWalker()
NodeWalker
for traversing elements in this model
null
if
no walker is availablevoid setNodeID(Object comp, String id)
comp
- - component for which id is to be setid
- - id for componentString getNodeId(Object element)
Note: This method should never return null
and should always make an attempt to
return a unique id that identifies this node from all other nodes in this model.
element
- - element for which id is desired
String getNodeName(Object element)
element
- - element for which name is desired
null
if not availableString getTypeName(String nodeName)
getNodeName
. The name returned identifies
the type that is represented by this node name in the graph.
If the specified nodeName was not obtained from getNodeName
, then
implementers should make a rough guess regarding the underlying type on the basis of the package names
associated with this model via getPackageNames
.
nodeName
- - as returned by getNodeName
#getNodeName(Object)Object)
,
getPackageNames()
String getDefaultAliasPrefix()
void addModelChangeListener(IModelChangeListener listener)
listener
- - listener to be notified of updates to the modelvoid removeModelChangeListener(IModelChangeListener listener)
listener
- - listener to be removedString[] getPackageNames()
IModel
will, upon its
instantiation and initialization, import the list of packages and make their traditional short-forms available.
(Of course, short-forms are language-dependent.) Each element of the array is only a name for a
package (e.g. 'my.java.package').
String getBaseType()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |