Ticket #22 (closed task: done)

Opened 9 years ago

Last modified 9 years ago

Modify the drag-n-drop mechanism for placing events on the timeline

Reported by: jdalbey Owned by: bmcguffin
Priority: Medium Milestone: ScriptBuilder 1
Component: ScriptBuilder GUI Version: 1.0
Severity: Major Keywords:
Cc:

Description

Modify the drag-n-drop mechanism for placing events on the timeline to mimic the way the GUI builder works in NetBeans?. Currently an event button stays clicked until a different button (or the empty button) is clicked. Desired behavior is that an event button can be clicked a second time to turn it off. This should obviate the need for an "empty" button.

Change History

comment:1 Changed 9 years ago by bmcguffin

  • Status changed from new to accepted

comment:2 Changed 9 years ago by bmcguffin

  • Status changed from accepted to closed
  • Resolution set to done

Changes relevant to this task were made in R121. I removed the empty button. The act of selecting and deselecting a button is identical for all event buttons, so I added a helper function, toggleEventButton(). ToggleEventButton? takes two parameters: The button pressed, and the event associated with it. It works like so:

If the button was already selected, deselect it and set the "current event" to null.
Otherwise, deselect all other buttons, set this button to "selected", and set the "current event" to reflect this button's event.

All "actionPerformed" methods for event buttons were replaced with one-line calls to this function, with the relevant objects passed in.

comment:3 Changed 9 years ago by jdalbey

Works great! Good job, Bryan.

Note: See TracTickets for help on using tickets.