NOTICE! This is a static HTML version of a legacy ImageJ Trac ticket.

The ImageJ project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Ticket #827 (closed defect: fixed)

Opened 2011-10-17T11:03:32-05:00

Last modified 2012-08-27T15:43:21-05:00

Fix Event Handling in JHotDrawImageCanvas

Reported by: gharris Owned by: curtis
Priority: minor Milestone: imagej2-b4-plugins
Component: Event Framework Version:
Severity: serious Keywords:
Cc: Blocked By:
Blocking: #1323


Events at the JHotDraw level do not propagate to the EventBus.

Change History

comment:1 Changed 2011-10-17T12:09:25-05:00 by gharris

  • Status changed from new to assigned

comment:2 Changed 2011-10-17T12:11:17-05:00 by gharris

As an example, in the Rectangle tool (RectangleAdapter) I added overrides for onMouseDown and onMouseDrag which sets the anchor and publishes StatusEvents showing the x,y,w,h of the rectangle that will be created.

comment:3 Changed 2011-10-17T13:04:13-05:00 by gharris

This needs to be applied to the rest of the relevant tools.

comment:4 Changed 2011-12-05T09:39:06-06:00 by gharris

  • Milestone changed from imagej-2.0-beta1 to imagej-2.0-beta2

comment:5 Changed 2012-01-26T12:44:50-06:00 by curtis

  • Owner changed from gharris to curtis

comment:6 Changed 2012-07-12T17:01:13-05:00 by curtis

  • Milestone changed from imagej-2.0.0-beta3 to imagej-2.0.0-beta4

comment:7 Changed 2012-07-13T22:08:16-05:00 by curtis

  • Blocking 1323 added

comment:8 Changed 2012-08-24T11:57:07-05:00 by curtis

The JHotDraw code now avoids ad hoc event listeners (particularly OverlayCreatedListener) in favor of using the event bus. Some of the more relevant commits include:

  • c52ac05 JHotDrawImageCanvas: handle relevant events only
  • 239e895 JHotDrawImageCanvas: clarify event handling
  • f14e0ed Make FigureCreatedEvent extend DataViewEvent
  • 5d103d8 Use JHotDraw service in JHotDraw tools
  • 812f043 Revamp FigureCreatedEvent to extend ImageJEvent

comment:9 Changed 2012-08-24T17:17:14-05:00 by curtis

Big progress on the status reporting for the rectangle, ellipse and line tools in ba758ef2.

comment:10 Changed 2012-08-27T15:41:21-05:00 by curtis

Polygon and angle do not yet report status, but those tools have other problems so I made notes in the relevant tickets (#1427 and #1441, respectively).

comment:11 Changed 2012-08-27T15:43:21-05:00 by curtis

  • Status changed from assigned to closed
  • Resolution set to fixed

The point tool now reports status in 03bb9cb. That covers all the major ROI selection tools, so I'm declaring this ticket complete.