Wednesday, 17 March 2010

Lesiurely voyage of discovery

The more I work this application, the more I learn about the standard java classes, and the more I learn about the example application I've used as a muse till now. I now understand enough about the mouse interfaces and co-ordinates etc to see that the in the example, each drawing object had it's own mouse listeners, whereas I've implemented one for the whole view.

Given the number of graphic objects that will appear on the canvas the mouse listener interface would need to be very scalable indeed if there were several hundred listeners in one app! As it is I implement my own mechanisms to see if mouse gestures impact any of the widgets. Not sure what OOP purists would say but after the work put in, it stays my way for now. Drag and drop might be interesting though when I come to implement that.

Time for the apps first dialogue boxes I think. One for the preferences e.g.

  • Title
  • Orientation
  • Margins

The other is for the attributes of a text adornment:
  • Font family
  • Font name?
  • Size
  • Bold?
  • Italic?
  • Underline?
  • Alignment, right, left, centre - tricky - no code to handle that yet, maybe v2 ;-)

No comments:

Post a Comment