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 #730 (closed enhancement: fixed)

Opened 2011-08-19T14:43:33-05:00

Last modified 2011-09-02T09:59:25-05:00

Display Hierarchy Refactoring

Reported by: gharris Owned by: gharris
Priority: major Milestone: imagej-2.0-alpha5
Component: Other Version:
Severity: serious Keywords:
Cc: Blocked By:
Blocking:

Description

Refactoring of the Display Hierarchy:

Display can be any kind of display - image, text, whatever.

Displays have a DisplayPanel, which is contained in a top-level DisplayWindow, which may be a window, frame, internal frame, or a tab.

Keyboard, mouse and window events can be handled separately.

Change History

comment:1 Changed 2011-08-19T14:48:11-05:00 by gharris

-- interface Display,
is extended by ImageDisplay (which has an AbstractImageDisplay) and TextDisplay (To do: OutputWindow will become one of these)

DisplayPanel is implemented by SwingImagePanel and TextDisplayPanel.

A DisplayWindow contains a DisplayPanel.

An implementation of all this is in SwingImageDisplay, SwingDisplayPanel and SwingDisplayWindow.

-- Created Separate EventDispatchers for Keyboard, Mouse and Window events. So, instead of

final EventDispatcher eventDispatcher =new AWTEventDispatcher(this, false);

we do this,

imgCanvas.addEventDispatcher(new AWTMouseEventDispatcher(this, false));
imgPanel.addEventDispatcher(new AWTKeyEventDispatcher(this));
window.addWindowListener(new AWTWindowEventDispatcher(this));

Code committed on this refactoring on Aug 19 by GBH

comment:2 Changed 2011-09-02T09:59:25-05:00 by gharris

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

Essentially complete.