After playing around with it for about 30 minutes, I got my
suggestion working in a local branch. The cool thing is it works
with the VisIt plots, too, simply by returning the correct child
Composite (a Canvas in both cases).
That's certainly fine by me. What ever is most appropriate.
Jay
On Thu, Apr 9, 2015 at 9:16 AM, Jordan
Deyton <deytonjh@xxxxxxxx>
wrote:
I feel like SWT or
java.util Listeners are too specific or nitty-gritty for
IPlot implementations to deal with.
I think a better solution might be to have the draw method
return a reference to the drawn child Composite, i.e. the
Composite that should (a) have the close button drawn over
it, (b) have a context menu added to it, or (c) get typed
listeners registered with it.
There's also currently no way to remove a listener from
the IPlot. I say we just let the ICEResourcePage directly
manage the listeners and keep IPlot as simple as possible.
Branch: refs/heads/anna/gridlayout
Home: https://github.com/eclipse/ice
Commit: eb174f24bece377341e96619b05f078bd7516e10
https://github.com/eclipse/ice/commit/eb174f24bece377341e96619b05f078bd7516e10
Author: Anna Wojtowicz <wojtowicza@xxxxxxxx>
Date: 2015-03-31 (Tue, 31 Mar 2015)
Changed paths:
M src/org.eclipse.ice.client.widgets/src/org/eclipse/ice/client/widgets/viz/service/IPlot.java
M src/org.eclipse.ice.viz.service.paraview/src/org/eclipse/ice/viz/service/paraview/ParaViewPlot.java
M src/org.eclipse.ice.viz.service.visit/src/org/eclipse/ice/viz/service/visit/VisItPlot.java
M src/org.eclipse.ice.viz.service/src/org/eclipse/ice/viz/service/csv/CSVPlot.java
M src/org.eclipse.ice.viz/src/org/eclipse/ice/viz/plotviewer/CSVPlotEditor.java
Log Message:
-----------
Added a setEventListener(event, listener) method to the IPlot interface
and plot classes. Implemented it for CSVPlot to add listeners on the
plot canvas (CSVPlotEditor.setPlotCanvasListener(...)).
Signed-off-by: Anna Wojtowicz <wojtowicza@xxxxxxxx>