public class ParaViewMouseAdapter
extends java.lang.Object
ParaViewCanvas
and feeds
events to an associated Canvas at the appropriate intervals.Modifier and Type | Class and Description |
---|---|
static class |
ParaViewMouseAdapter.MouseInteractionType
A simple enumeration representing the allowed action strings.
|
Constructor and Description |
---|
ParaViewMouseAdapter()
The default constructor.
|
ParaViewMouseAdapter(IParaViewWebClient client,
int viewId,
org.eclipse.swt.widgets.Control control)
The full constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
setCanvas(ParaViewCanvas canvas)
Sets the
ParaViewCanvas that will be refreshed after a mouse
event in the control is processed and posted to the web client. |
boolean |
setClient(IParaViewWebClient client)
Sets the current ParaView web client used by this mouse adapter.
|
boolean |
setControl(org.eclipse.swt.widgets.Control control)
Sets the current control with which this mouse adapter is linked.
|
boolean |
setViewId(int viewId)
Sets the ID of the current view that is rendered via the associated
ParaView web client.
|
public ParaViewMouseAdapter()
public ParaViewMouseAdapter(IParaViewWebClient client, int viewId, org.eclipse.swt.widgets.Control control)
client
- The client that is providing a ParaView image. Mouse events
will trigger updates to this client.viewId
- The current view ID on the client. It will be updated by mouse
events.control
- The current SWT Control to which this adapter is registered
for its various listener operations. Although this is
typically a ParaViewCanvas
, it may be any SWT Control.public boolean setCanvas(ParaViewCanvas canvas)
ParaViewCanvas
that will be refreshed after a mouse
event in the control
is processed and posted to the web client.canvas
- The target Canvas that will be updated. If null
, no
Canvas will be updated after mouse events.public boolean setClient(IParaViewWebClient client)
Note: Any change is not guaranteed to take effect until the next
mouse event on the associated control
.
client
- The new client. If null
or not connected, then the
rendered image will not be able to update.public boolean setControl(org.eclipse.swt.widgets.Control control)
control
- The new SWT Control on which this adapter should listen for
mouse events.public boolean setViewId(int viewId)
Note: Any change is not guaranteed to take effect until the next
mouse event on the associated control
.
viewId
- The ID of the view to be rendered. If invalid, then the
rendered image will not be able to update.