Issue #1298 Changes for non-blocking DisplayAttributesDialog.

Change-Id: I2175023db40ad6b24c47ebc2cd16e12572fb1b6d

Former-commit-id: 7ca75756ae [formerly 7ca75756ae [formerly 260f5085bba45ab5b3ad10dd3945a64195eb2d7b]]
Former-commit-id: 212045c1a6
Former-commit-id: d069f186e1
This commit is contained in:
Roger Ferrel 2012-11-14 14:55:40 -06:00
parent ff33643234
commit 9cf45444c3
2 changed files with 15 additions and 5 deletions

View file

@ -66,7 +66,7 @@ public class DisplayAttributesDialog extends CaveJFACEDialog {
public DisplayAttributesDialog(Shell parent, AbstractTemporalEditorBar bar,
Parm parm) {
super(parent);
this.setShellStyle(SWT.TITLE | SWT.MODELESS | SWT.CLOSE);
this.setShellStyle(SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL | SWT.CLOSE);
this.bar = bar;
this.parm = parm;
origParmDispAtt = bar.getParmDisplayAttributes(parm);
@ -243,8 +243,7 @@ public class DisplayAttributesDialog extends CaveJFACEDialog {
MessageBox mb = new MessageBox(getShell(),
SWT.ICON_WARNING | SWT.OK);
mb.setText("Graphic Attributes Error");
mb
.setMessage("You must select at least one graphic type");
mb.setMessage("You must select at least one graphic type");
mb.open();
}
}

View file

@ -38,6 +38,7 @@ import com.raytheon.viz.gfe.temporaleditor.AbstractTemporalEditorBar;
import com.raytheon.viz.gfe.temporaleditor.TemporalEditorUtil;
import com.raytheon.viz.gfe.temporaleditor.dialogs.DisplayAttributesDialog;
import com.raytheon.viz.gfe.temporaleditor.dialogs.MoveWeatherElementDialog;
import com.raytheon.viz.ui.dialogs.ICloseCallback;
/**
* MouseHandler to resize temporal editor bars.
@ -47,6 +48,7 @@ import com.raytheon.viz.gfe.temporaleditor.dialogs.MoveWeatherElementDialog;
* Date Ticket# Engineer Description
* ------------ ---------- ------------- --------------------------
* May 28, 2009 #2159 Richard Peter Initial Creation.
* Nov 14, 2012 #1298 rferrel Changes for non-blocking DisplayAttributesDialog.
* </pre>
*
* @author rjpeter
@ -122,11 +124,20 @@ public class TitleBarMouseHandler extends MouseHandler {
public void run() {
Shell shell = PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getShell();
// The dialog being opened is modal to the parent
// dialog. This will prevent the launching of another
// dialog until the modal dialog is closed.
DisplayAttributesDialog dialog = new DisplayAttributesDialog(
shell, teBar, parm);
dialog.setBlockOnOpen(true);
dialog.setBlockOnOpen(false);
dialog.setCloseCallback(new ICloseCallback() {
@Override
public void dialogClosed(Object returnValue) {
teBar.redraw();
}
});
dialog.open();
teBar.redraw();
}
});
}