1.1 --- a/compapp.casaeditor/src/org/netbeans/modules/compapp/casaeditor/Constants.java Sat Aug 11 02:11:36 2007 +0000
1.2 +++ b/compapp.casaeditor/src/org/netbeans/modules/compapp/casaeditor/Constants.java Sat Aug 11 02:20:26 2007 +0000
1.3 @@ -29,6 +29,6 @@
1.4 String SQUARE_BRACKET_OPEN = "]"; // NOI18N
1.5 String PERIOD = "."; // NOI18N
1.6 String STRING_EXTENSION = "..."; // NOI18N
1.7 -
1.8 + String CLOSE = "Close"; // NOI18N
1.9 int TOOLTIP_INITIAL_DELAY = 0;
1.10 }
2.1 --- a/compapp.casaeditor/src/org/netbeans/modules/compapp/casaeditor/graph/actions/CasaBadgeEditAction.java Sat Aug 11 02:11:36 2007 +0000
2.2 +++ b/compapp.casaeditor/src/org/netbeans/modules/compapp/casaeditor/graph/actions/CasaBadgeEditAction.java Sat Aug 11 02:20:26 2007 +0000
2.3 @@ -21,13 +21,12 @@
2.4
2.5 import java.awt.Dialog;
2.6 import java.awt.Rectangle;
2.7 -import java.awt.event.ActionEvent;
2.8 -import java.awt.event.ActionListener;
2.9 import java.awt.event.MouseEvent;
2.10 import javax.swing.SwingUtilities;
2.11 import org.netbeans.api.visual.action.WidgetAction;
2.12 import org.netbeans.api.visual.action.WidgetAction.State;
2.13 import org.netbeans.api.visual.widget.Widget;
2.14 +import org.netbeans.modules.compapp.casaeditor.Constants;
2.15 import org.netbeans.modules.compapp.casaeditor.design.CasaModelGraphScene;
2.16 import org.netbeans.modules.compapp.casaeditor.graph.CasaBindingBadges;
2.17 import org.netbeans.modules.compapp.casaeditor.graph.CasaNodeWidgetBinding;
2.18 @@ -124,17 +123,20 @@
2.19 nodeWidget.getBadges().setBadgePressed(CasaBindingBadges.Badge.IS_EDITABLE, false);
2.20
2.21 propertySheetPanel.setNodes(new Node[] { editNodeRef });
2.22 -
2.23 +
2.24 + final Object[] options = new Object[] {Constants.CLOSE};
2.25 final DialogDescriptor descriptor = new DialogDescriptor(
2.26 propertySheetPanel,
2.27 NbBundle.getMessage(getClass(), "STR_PROPERTIES", editNodeRef.getDisplayName()),
2.28 true,
2.29 - new ActionListener() {
2.30 - public void actionPerformed(ActionEvent evt) {
2.31 - if (evt.getSource().equals(DialogDescriptor.OK_OPTION)) {
2.32 - }
2.33 - }
2.34 - });
2.35 + options,
2.36 + null,
2.37 + DialogDescriptor.DEFAULT_ALIGN,
2.38 + null,
2.39 + null);
2.40 + descriptor.setClosingOptions(options);
2.41 +
2.42 +
2.43 final Dialog dlg = DialogDisplayer.getDefault().createDialog(descriptor);
2.44
2.45 // The dialog is modal, allow the action chain to continue while