11.07.2015 Views

JSR-296: The Swing Application Framework - Java

JSR-296: The Swing Application Framework - Java

JSR-296: The Swing Application Framework - Java

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Defines 3 Actions: revert, save, deletepublic class MyForm extends JPanel {@Action(enabledProperty = "changesPending")public void revert() { ... }@Action(enabledProperty = "changesPending")public void save() { ... }@Action(enabledProperty = "!selectionEmpty")public void delete() { ... }// <strong>The</strong>se properties are bound, when they change// PropertyChangeEvents are firedpublic boolean getChangesPending() { ... }public boolean isSelectionEmpty() { ... }}// ...2007 <strong>Java</strong>One SM Conference | Session TS-3942 | 43

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!