- All Known Implementing Classes:
- MiniDrawApplication
public interface DrawingEditor
The DrawingEditor is the interface of the "main" class of any minidraw
application. It must instantiate all relevant parts of the framework as well
as open the relevant graphical user interface windows.
It is also the Mediator of the Mediator pattern that allows the different
implementation of MiniDraw roles to access each other. It is, however, the
object server variant as it does not centralize control.
The default implementation, MiniDrawApplication, should suffice for almost
any need as it is highly configurable via the Factory interface.
Responsibilities: A) Main class of a minidraw application, that is the editor
must instantiate all parts of the application. B) Open a window to become
visible. B) Acts as Mediator for the various parts of MiniDraw. C) Allow
changing the active tool. D) Allow displaying a message in the status bar.
Release history:
Pre 1.0: Many many releases for various course instances.
1.0: Version of MiniDraw at the time of book submission to CRC Press.
1.1: Defect in boardgame hotspots fixed. Move from a location to the same
location would not readjust the figure on the graphical location.
1.2: Reduced the number of hotspots associated with the positioning strategy
in the boardgame extensions.
1.3: Changes introduced to handle 'props' in the BoardGame extension of
MiniDraw.
1.4: Some defensive programming techniques introduced in BoardGame extension.
1.5: Fixed bug concerning movement of props in BoardGame. Minor documentation
changes.
1.6: Fixed bug in BoardGame's BoardActionTool concerning actions performed on
props that return false.
1.7: Several changes made in the notification and repainting sequence as some
defects were discovered (which actually are embedded in the original JHotDraw
code as well.) See comment in the source code below.
1.8: Added hook method in MiniDrawApplication to override windows close
operation.
1.9: Updated ImageManager so a) it also looks for image files in a folder
/resources to make it work together with gradle more easily, b) also will
load PNG and JPG files (having '.png' or '.jpg' suffixes).
Copyright 2010 Henrik Baerbak Christensen
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.