|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.actf.model.AbstractModel
org.eclipse.actf.model.AbstractRenderableModel
org.eclipse.actf.model.mozdom.DomBrowserGuiModel
public abstract class DomBrowserGuiModel
implementation for an embedded browser widget. The widget is assumed to
extend org.eclipse.swt.widgets.Composite
and the DOM exposed
by this widget is assumed to implement the W3C HTML 4.01 DOM specification.
Field Summary | |
---|---|
protected static List |
BASE_ELEMENT_TAGNAMES
|
protected static String[] |
PACKAGE_LIST
|
Fields inherited from class org.eclipse.actf.model.AbstractRenderableModel |
---|
eventIdMap |
Fields inherited from class org.eclipse.actf.model.AbstractModel |
---|
baseType, configuration, locator, nodeToTypeNameMap, runtimeContext, treeNodeWalker |
Constructor Summary | |
---|---|
DomBrowserGuiModel(String type)
|
Method Summary | |
---|---|
void |
asyncInvokeOnUIThread(Runnable runnable)
asyncronously executes the given Runnable from within the UI thread. uses org.eclipse.swt.widgets.Display methods |
String |
getDefaultAliasPrefix()
returns the default alias prefix. The default alias prefix (usually a package name) is used when a fully-qualified name is not used in the 'value' attribute of an <alias> tag |
protected String |
getDomTypesPackage()
|
String[] |
getPackageNames()
returns an array of the names of packages to be imported by CodeProcessors. Includes packages: java.lang org.w3c.dom org.w3c.dom.html |
String |
getTypeName(String nodeName)
returns the type name associated with this nodeName. The nodeName parameter is most frequently formed by calling 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 |
protected String |
getTypeNamePrefix()
|
protected String |
getTypeNameSuffix()
|
Object |
invokeGetter(Object obj,
String name)
invoke the getter method on the specified object. |
Object |
invokeGetter(Object obj,
String name,
Object arg)
invoke the specified getter method on the given object, passing it the single parameter. |
void |
invokeOnUIThread(Runnable runnable)
executes the given Runnable from within the UI thread. uses org.eclipse.swt.widgets.Display methods |
boolean |
isUIThread()
returns whether or not the currently executing thread is the UI thread. uses org.eclipse.swt.widgets.Display methods |
String |
tagNameToTypeName(String tagName)
get the DOM class/interface type name for the given HTML tag name |
Methods inherited from class org.eclipse.actf.model.AbstractRenderableModel |
---|
getBoundingRectangle, getModelEventType, getModelEventTypes, highlight, initEventIdMap, initEventIdMap, isValid, isVisible, registerModelEventListener, registerModelEventListener, requestFocusFor, unregisterModelEventListener |
Methods inherited from class org.eclipse.actf.model.AbstractModel |
---|
addModelChangeListener, fireModelChangeEvent, getBaseType, getName, getNodeId, getNodeLocator, getNodeName, getNodeWalker, getOrder, removeModelChangeListener, setFilters, setModelType, setNodeID |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.actf.model.IModel |
---|
addModelChangeListener, getBaseType, getName, getNodeId, getNodeLocator, getNodeName, getNodeWalker, getOrder, removeModelChangeListener, setNodeID |
Field Detail |
---|
protected static String[] PACKAGE_LIST
protected static List BASE_ELEMENT_TAGNAMES
Constructor Detail |
---|
public DomBrowserGuiModel(String type)
Method Detail |
---|
public String getDefaultAliasPrefix()
getDefaultAliasPrefix
in interface IModel
getDefaultAliasPrefix
in class AbstractModel
public String[] 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').
Includes packages:
public boolean isUIThread()
false
, the client will typically need to invoke the invokeOnUIThread
method in order to effect the GUI.
uses org.eclipse.swt.widgets.Display
methods
true
if the current thread is the UI thread, false
otherwiseIRenderableModel.invokeOnUIThread(Runnable)
public void invokeOnUIThread(Runnable runnable)
isUIThread
returns false
.
uses org.eclipse.swt.widgets.Display
methods
runnable
- - Runnable to be invoked in UI threadIRenderableModel.isUIThread()
public void asyncInvokeOnUIThread(Runnable runnable)
Runnable
is placed in a queue and control is returned immediately to the calling thread.
uses org.eclipse.swt.widgets.Display
methods
runnable
- - Runnable to be invoked in UI threadIRenderableModel.invokeOnUIThread(Runnable)
public Object invokeGetter(Object obj, String name) throws Exception
Note: If the specified method is found and returns a boolean
,
then an unsuccessful invocation will result in a return value of
false
.
obj
- -
receivername
- -
method name
Exception
public Object invokeGetter(Object obj, String name, Object arg) throws Exception
Note: If the specified method is found and returns a boolean
,
then an unsuccessful invocation will result in a return value of
false
. *
obj
- -
the receivername
- -
the method namearg
- -
single argument to method
Exception
protected String getDomTypesPackage()
protected String getTypeNamePrefix()
protected String getTypeNameSuffix()
public String tagNameToTypeName(String tagName)
tagName
- HTML 4.01 tag name
public String 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
.
getTypeName
in interface IModel
getTypeName
in class AbstractModel
nodeName
- - as returned by getNodeName
#getNodeName(Object)Object)
,
IModel.getPackageNames()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |