|
||||||||||
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
org.eclipse.actf.model.mozdom.MozillaDomBrowserGuiModel
public class MozillaDomBrowserGuiModel
implementation for the Mozilla DOM browser.
Field Summary | |
---|---|
static String |
EVENT_DOM_ACTIVATE
|
static String |
EVENT_DOM_ATTRMODIFIED
|
static String |
EVENT_DOM_CHARDATAMODIFIED
|
static String |
EVENT_DOM_FOCUSIN
|
static String |
EVENT_DOM_FOCUSOUT
|
static String |
EVENT_DOM_MOUSECLICK
|
static String |
EVENT_DOM_MOUSEDOWN
|
static String |
EVENT_DOM_MOUSEMOVE
|
static String |
EVENT_DOM_MOUSEOUT
|
static String |
EVENT_DOM_MOUSEOVER
|
static String |
EVENT_DOM_MOUSEUP
|
static String |
EVENT_DOM_NODEINSERTED
|
static String |
EVENT_DOM_NODEINSERTEDINTODOC
|
static String |
EVENT_DOM_NODEREMOVED
|
static String |
EVENT_DOM_NODEREMOVEDFROMDOC
|
static String |
EVENT_DOM_SUBTREEMODIFIED
|
static String |
MOZDOM_ADAPTOR_CLASS
|
static String |
MOZDOM_MODEL
|
protected static String[] |
PACKAGE_LIST
|
Fields inherited from class org.eclipse.actf.model.mozdom.DomBrowserGuiModel |
---|
BASE_ELEMENT_TAGNAMES |
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 | |
---|---|
MozillaDomBrowserGuiModel()
|
Method Summary | |
---|---|
Rectangle |
getBoundingRectangle(Object element)
gets the rectangle bounding the given element default implementation returns null |
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 |
getIIDForTagName(String tagName)
|
ModelEventType |
getModelEventType(Object eventId)
get the ModelEventType instances associated with the given event id. |
ModelEventType[] |
getModelEventTypes(Class c)
get the model event types for the given source type. default implementation returns null |
INodeLocator |
getNodeLocator()
retrieves a locator for finding and identifying nodes in the model. |
String |
getNodeName(Object element)
return the short name of this element. The id for an element is model-specific. For example, it may be the tag name of an element of a model representing a structure that conforms to W3the C DOM specification or the simple class name of the object. returns the qualified class name (i.e. without the package name) of the given element returns the tag name for the given HTML element (e.g. anchor, input) |
INodeWalker |
getNodeWalker()
retrieve the NodeWalker for traversing elements in this model |
String[] |
getPackageNames()
returns an array of the names of packages to be imported by CodeProcessors. Any CodeProcessor used in the context of an 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:
|
protected String |
getTypeNamePrefix()
|
protected String |
getTypeNameSuffix()
|
void |
highlight(Object element)
highlight or visually indicate the element that is being examined. |
protected void |
initEventIdMap()
used to initialize the eventId map, which is keyed by eventId that corresponds to a ModelEventType
instance. |
boolean |
isGuiRootType(Class c)
|
boolean |
isVisible(Object comp)
returns whether or not the specified component is currently visible |
void |
registerModelEventListener(IModelEventListener listener,
ModelEventType[] eventTypes)
register a listener to receive notification when events with the given eventTypes are fired within this model. equivalent to calling registerModelEventListener(listener, eventTypes, null) |
void |
registerModelEventListener(IModelEventListener listener,
ModelEventType[] eventTypes,
Object[] params)
register a listener to receive notification when events with the given eventTypes are fired within this model. |
boolean |
requestFocusFor(Object comp)
request the focus for the specified component. This method should be invoked, for example, just prior to validation for a report that reflects the state of the component while visible. |
String |
tagNameToTypeName(String tagName)
get the DOM class/interface type name for the given HTML tag name cache the infor so we only need to build it once |
void |
unregisterModelEventListener(IModelEventListener listener,
ModelEventType[] eventTypes)
unregister a previously registered listener. |
Methods inherited from class org.eclipse.actf.model.mozdom.DomBrowserGuiModel |
---|
asyncInvokeOnUIThread, getTypeName, invokeGetter, invokeGetter, invokeOnUIThread, isUIThread |
Methods inherited from class org.eclipse.actf.model.AbstractRenderableModel |
---|
initEventIdMap, isValid |
Methods inherited from class org.eclipse.actf.model.AbstractModel |
---|
addModelChangeListener, fireModelChangeEvent, getBaseType, getName, getNodeId, 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, getOrder, removeModelChangeListener, setNodeID |
Field Detail |
---|
public static final String MOZDOM_MODEL
public static final String MOZDOM_ADAPTOR_CLASS
public static final String EVENT_DOM_FOCUSIN
public static final String EVENT_DOM_FOCUSOUT
public static final String EVENT_DOM_ACTIVATE
public static final String EVENT_DOM_MOUSECLICK
public static final String EVENT_DOM_MOUSEUP
public static final String EVENT_DOM_MOUSEDOWN
public static final String EVENT_DOM_MOUSEOVER
public static final String EVENT_DOM_MOUSEOUT
public static final String EVENT_DOM_MOUSEMOVE
public static final String EVENT_DOM_SUBTREEMODIFIED
public static final String EVENT_DOM_NODEINSERTED
public static final String EVENT_DOM_NODEINSERTEDINTODOC
public static final String EVENT_DOM_NODEREMOVED
public static final String EVENT_DOM_NODEREMOVEDFROMDOC
public static final String EVENT_DOM_ATTRMODIFIED
public static final String EVENT_DOM_CHARDATAMODIFIED
protected static String[] PACKAGE_LIST
Constructor Detail |
---|
public MozillaDomBrowserGuiModel()
Method Detail |
---|
public String getDefaultAliasPrefix()
getDefaultAliasPrefix
in interface IModel
getDefaultAliasPrefix
in class DomBrowserGuiModel
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:
Includes packages:
getPackageNames
in interface IModel
getPackageNames
in class DomBrowserGuiModel
public boolean isVisible(Object comp)
isVisible
in interface IRenderableModel
isVisible
in class AbstractRenderableModel
comp
- - component to be tested
public boolean requestFocusFor(Object comp)
requestFocusFor
in interface IRenderableModel
requestFocusFor
in class AbstractRenderableModel
comp
- - component for which focus is desired
true
if focus is successful, false
otherwisepublic boolean isGuiRootType(Class c)
protected String getDomTypesPackage()
getDomTypesPackage
in class DomBrowserGuiModel
protected String getTypeNamePrefix()
getTypeNamePrefix
in class DomBrowserGuiModel
protected String getTypeNameSuffix()
getTypeNameSuffix
in class DomBrowserGuiModel
public String getNodeName(Object element)
getNodeName
in interface IModel
getNodeName
in class AbstractModel
element
- - element for which name is desired
null
if not availablepublic String getIIDForTagName(String tagName)
public String tagNameToTypeName(String tagName)
tagNameToTypeName
in class DomBrowserGuiModel
tagName
- HTML 4.01 tag name
protected void initEventIdMap()
AbstractRenderableModel
ModelEventType
instance. Event ids are model-specific and typically defined as part of that model's definition.
initEventIdMap
in class AbstractRenderableModel
ModelEventType
,
AbstractRenderableModel.registerModelEventListener(IModelEventListener, ModelEventType[])
public void unregisterModelEventListener(IModelEventListener listener, ModelEventType[] eventTypes)
IRenderableModel
getModelEventTypes
methods.
unregisterModelEventListener
in interface IRenderableModel
unregisterModelEventListener
in class AbstractRenderableModel
listener
- listener to be unregisteredeventTypes
- event types for which listener is to be unregisteredIRenderableModel.registerModelEventListener(IModelEventListener, ModelEventType[])
,
ModelEventType
public ModelEventType[] getModelEventTypes(Class c)
AbstractRenderableModel
ModelEventType
object
describes the types of events that can be fired within the context of this runtime model. If the sourceType is null
,
then all of the event types of which this model is aware will be returned else only events that can be fired by the given sourceType
will be returned.
default implementation returns null
getModelEventTypes
in interface IRenderableModel
getModelEventTypes
in class AbstractRenderableModel
c
- type to be queried for events
ModelEventType
public ModelEventType getModelEventType(Object eventId)
AbstractRenderableModel
ModelEventType
instances associated with the given event id. The event id is model-specific
and will usually be presented in the model's API. What constitutes an event id and how they are determined should be
specified in clients that implement this model.
getModelEventType
in interface IRenderableModel
getModelEventType
in class AbstractRenderableModel
eventId
- model-specific event id
ModelEventType
instances associated with this event id or null
if no event types are associated with this idpublic INodeWalker getNodeWalker()
NodeWalker
for traversing elements in this model
getNodeWalker
in interface IModel
getNodeWalker
in class AbstractModel
null
if
no walker is availablepublic Rectangle getBoundingRectangle(Object element)
AbstractRenderableModel
null
getBoundingRectangle
in interface IRenderableModel
getBoundingRectangle
in class AbstractRenderableModel
element
- - element for which bounds are desired
public void highlight(Object element)
AbstractRenderableModel
highlight
in interface IRenderableModel
highlight
in class AbstractRenderableModel
element
- - the element to be highlitedpublic INodeLocator getNodeLocator()
AbstractModel
getNodeLocator
in interface IModel
getNodeLocator
in class AbstractModel
public void registerModelEventListener(IModelEventListener listener, ModelEventType[] eventTypes)
AbstractRenderableModel
getModelEventTypes
methods.
equivalent to calling registerModelEventListener(listener, eventTypes, null)
registerModelEventListener
in interface IRenderableModel
registerModelEventListener
in class AbstractRenderableModel
listener
- listener to be notified when specified events occureventTypes
- event types for which listener is being registeredIRenderableModel.getModelEventType(Object)
,
IRenderableModel.getModelEventTypes(Class)
public void registerModelEventListener(IModelEventListener listener, ModelEventType[] eventTypes, Object[] params)
AbstractRenderableModel
getModelEventTypes
methods.
Optional parameters can also be passed to facilitate additional side effects or for additional information about the context
in which events are being fired.
registerModelEventListener
in interface IRenderableModel
registerModelEventListener
in class AbstractRenderableModel
listener
- listener to be notified when specified events occureventTypes
- event types for which listener is being registeredparams
- - additional parameters (may be null
)IRenderableModel.getModelEventType(Object)
,
IRenderableModel.getModelEventTypes(Class)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |