Sunday, 31 January 2010

Ground to a temporary halt

Set of on a mission to try and make the title (and all) text objects editable using JTextField. Very tricky - I have JPanel in which all the graphical objects go, but am not using swing components, it's all hand drawn. Trying to mix in a Swing component just got very messy. Backed it all out and will use a dialog box for now.

So after losing time on the above journey, took a look at how best to implement mouse actions. So the panel can have mouse listeners on it, and in the events you can decide what to do. The worked example I have uses lots of technical factory methods to generate different classes depending on what the user selects etc.

I though maybe we could implement the following:
  • mouse click is select the object clicked on
  • right mouse click on object, pop up menu for altering object, including delete
  • right mouse click not on object, pop up menu including create object at click point (if adornment) or at cursor if note or bar dressing
  • click in bar space but not on object is move insert point to there
Do we make a mouse mandatory or do we have keyboard equivalents for these? Not sure if there's a keyboard equiv of the mouse listeners, got to be I guess.

Will expand up on these thoughts later ...

No comments:

Post a Comment