|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IGuiModel
The IGuiModel interface is implemented in order to allow the IBM Reflexive GUI Builder to support a variety of GUI models. The application is packaged with implementations of the IGuiModel interface in order to accommodate GUIs designed according to the Swing, AWT, and Eclipse SWT frameworks (although the AWT models is discouraged since it does not fully support accessibility features provided in other models such as Swing).
A better name for this interface is actually GUIHierarchicalStructure
since an model is
a hierarchical structure that embodies the hierarchical nature of Java GUI components. Although ACTF can be used to
construct and render implementations of this interface, not all hierarchical structures can be built using ACTF. However,
the validation mechanism does support the validation of any hierarchical structure once the appropriate
validator implementation and validation document(s) are written.
Method Summary | |
---|---|
void |
asyncInvokeOnUIThread(Runnable runnable)
asyncronously executes the given Runnable from within the UI thread. |
Rectangle |
getBoundingRectangle(Object element)
gets the rectangle bounding the given element |
ModelEventType |
getModelEventType(Object eventId)
get the ModelEventType instances associated with the given event id. |
ModelEventType[] |
getModelEventTypes(Class sourceType)
get the model event types for the given source type. |
void |
highlight(Object element)
highlight or visually indicate the element that is being examined. |
void |
invokeOnUIThread(Runnable runnable)
executes the given Runnable from within the UI thread. |
boolean |
isUIThread()
returns whether or not the currently executing thread is the UI thread. |
boolean |
isValid(Object component)
returns whether or not the specified component is valid for access. |
boolean |
isVisible(Object component)
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. |
boolean |
requestFocusFor(Object comp)
request the focus for the specified component. |
void |
unregisterModelEventListener(IModelEventListener listener,
ModelEventType[] eventTypes)
unregister a previously registered listener. |
Methods inherited from interface org.eclipse.actf.model.IModel |
---|
addModelChangeListener, getBaseType, getDefaultAliasPrefix, getName, getNodeId, getNodeLocator, getNodeName, getOrder, getPackageNames, getTreeWalker, removeModelChangeListener, setNodeID |
Method Detail |
---|
ModelEventType[] getModelEventTypes(Class sourceType)
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.
sourceType
- type to be queried for events
org.eclipse.actf.core.model.event.ModelEventType
ModelEventType getModelEventType(Object eventId)
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.
eventId
- model-specific event id
ModelEventType
instances associated with this event id or null
if no event types are associated with this idvoid registerModelEventListener(IModelEventListener listener, ModelEventType[] eventTypes)
getModelEventTypes
methods.
listener
- listener to be notified when specified events occureventTypes
- event types for which listener is being registeredgetModelEventType(Object)
,
getModelEventTypes(Class)
void unregisterModelEventListener(IModelEventListener listener, ModelEventType[] eventTypes)
getModelEventTypes
methods.
listener
- listener to be unregisteredeventTypes
- event types for which listener is to be unregisteredregisterModelEventListener(IModelEventListener, ModelEventType[])
,
org.eclipse.actf.core.model.event.ModelEventType#getId()
boolean isUIThread()
false
, the client will typically need to invoke the invokeOnUIThread
method in order to effect the GUI.
true
if the current thread is the UI thread, false
otherwiseinvokeOnUIThread(Runnable)
void invokeOnUIThread(Runnable runnable)
isUIThread
returns false
.
runnable
- - Runnable to be invoked in UI threadisUIThread()
void asyncInvokeOnUIThread(Runnable runnable)
Runnable
is placed in a queue and control is returned immediately to the calling thread.
runnable
- - Runnable to be invoked in UI threadinvokeOnUIThread(Runnable)
boolean isVisible(Object component)
component
- - component to be tested
boolean isValid(Object component)
component
- - component to be tested
true
if this component is valid, false
otherwiseorg.eclipse.actf.core.model.InvalidComponentException
boolean requestFocusFor(Object comp)
comp
- - component for which focus is desired
true
if focus is successful, false
otherwiseRectangle getBoundingRectangle(Object element)
element
- - element for which bounds are desired
void highlight(Object element)
element
- - the element to be highlited
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |