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: |
|
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.
-- 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