|
META TOPICPARENT |
name="JavaNotes" |
JHotDraw is a framework for building Swing drawing applications. It's descended from a toolkit written in SmallTalk by one of the "gang of four" patterns gurus so it's heavily pattern-intensive. |
|
StandardDrawingView.DrawingViewKeyListener creates a DeleteCommand in the constructor. When the delete key is pressed the listener calls DeleteCommand.isExecutable() and if it returns true calls execute() . DeleteCommand.isExecutable() checks some stuff and then delegates to DeleteCommand.isExecutableWithView() which checks if any figures are selected and if so returns true. |
|
> > | Keyboard/mouse events start in the DrawingView (it's a JPanel) and then get propagated to the tool that the DrawingEditor returns from a call to tool() . |
Copyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding The Caboteria?
Send feedback