Ticket #827 (closed defect: fixed)

Opened 8 years ago

Last modified 7 years ago

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

Description

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

Change History

comment:1 Changed 8 years ago by gharris

  • Status changed from new to assigned

comment:2 Changed 8 years ago 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 8 years ago by gharris

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

comment:4 Changed 8 years ago by gharris

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

comment:5 Changed 7 years ago by curtis

  • Owner changed from gharris to curtis

comment:6 Changed 7 years ago by curtis

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

comment:7 Changed 7 years ago by curtis

  • Blocking 1323 added

comment:8 Changed 7 years ago 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 7 years ago by curtis

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

comment:10 Changed 7 years ago 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 7 years ago 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.

Note: See TracTickets for help on using tickets.