@Override
 public void actionPerformed(ActionEvent e) {
   for (GPOptionGroup group : myChart.getOptionGroups()) {
     group.lock();
   }
   final OkAction okAction =
       new OkAction() {
         @Override
         public void actionPerformed(ActionEvent e) {
           commit();
         }
       };
   final CancelAction cancelAction =
       new CancelAction() {
         @Override
         public void actionPerformed(ActionEvent e) {
           rollback();
         }
       };
   myUIFacade
       .createDialog(createDialogComponent(), new Action[] {okAction, cancelAction}, "")
       .show();
 }
 private void rollback() {
   for (GPOptionGroup group : myChart.getOptionGroups()) {
     group.rollback();
   }
 }
 private void commit() {
   for (GPOptionGroup group : myChart.getOptionGroups()) {
     group.commit();
   }
 }