Ticket #730 (closed enhancement: fixed)

Opened 8 years ago

Last modified 8 years ago

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 8 years ago 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 8 years ago by gharris

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

Essentially complete.

Note: See TracTickets for help on using tickets.