Letractively / choosel

Automatically exported from code.google.com/p/choosel
0 stars 0 forks source link

Dialogs don't offer enough control to the the implementer #160

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Implementers of dialogs should be able to:

1) close the dialog themselves
2) set up their own button bar

These could be implemented in new dialog classes, so as to
not break the Dialog API. Clients could override a "createButtons" method in 
AbstractDialog. A new DialogExtension interface can be added that creates 
buttons and allows closing.

Original issue reported on code.google.com by delmyers...@gmail.com on 27 May 2011 at 6:51

GoogleCodeExporter commented 8 years ago
Issue 159 has been merged into this issue.

Original comment by delmyers...@gmail.com on 27 May 2011 at 6:52

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Created new DialogExtension interface that allows clients to create their own 
custom buttons by using a new hook called createButton available on the 
DialogWindow.

DialogWindow will behave differently if the Dialog passed to it is an instance 
of DialogExtension. If the Dialog is an instance of DialogExtension, then the 
DialogExtension will be asked to create its own buttons, and the extension will 
automatically be notified whenever one of those buttons is pressed. The 
DialogExtension is responsible for closing the window itself when desired. If 
it is not an instance DialogExtension, then the previous legacy behaviour is 
still used.

AbstractDialog has been enhanced to conform to the new DialogExtension 
semantics. However, clients who have extended AbstractDialog will still have 
the same behaviour as they previously did. Clients of AbstractDialog may 
override createButtons() and buttonPressed() to change the behaviour.

Original comment by delmyers...@gmail.com on 27 May 2011 at 10:53

GoogleCodeExporter commented 8 years ago
Checked that this does not break the current dialogs.

Original comment by Lars.Grammel on 28 May 2011 at 3:01