Merge "Issue #1298 Changes for non-blocking DisplayAttributesDialog." into development
Former-commit-id:6152ecccda
[formerly695cf85335
] [formerly6134e5d3f7
[formerly 33b0aada5191fd6a757f37029862cdcadf8c0692]] Former-commit-id:6134e5d3f7
Former-commit-id:7ed335793f
This commit is contained in:
commit
d82072b975
2 changed files with 15 additions and 5 deletions
|
@ -66,7 +66,7 @@ public class DisplayAttributesDialog extends CaveJFACEDialog {
|
||||||
public DisplayAttributesDialog(Shell parent, AbstractTemporalEditorBar bar,
|
public DisplayAttributesDialog(Shell parent, AbstractTemporalEditorBar bar,
|
||||||
Parm parm) {
|
Parm parm) {
|
||||||
super(parent);
|
super(parent);
|
||||||
this.setShellStyle(SWT.TITLE | SWT.MODELESS | SWT.CLOSE);
|
this.setShellStyle(SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL | SWT.CLOSE);
|
||||||
this.bar = bar;
|
this.bar = bar;
|
||||||
this.parm = parm;
|
this.parm = parm;
|
||||||
origParmDispAtt = bar.getParmDisplayAttributes(parm);
|
origParmDispAtt = bar.getParmDisplayAttributes(parm);
|
||||||
|
@ -243,8 +243,7 @@ public class DisplayAttributesDialog extends CaveJFACEDialog {
|
||||||
MessageBox mb = new MessageBox(getShell(),
|
MessageBox mb = new MessageBox(getShell(),
|
||||||
SWT.ICON_WARNING | SWT.OK);
|
SWT.ICON_WARNING | SWT.OK);
|
||||||
mb.setText("Graphic Attributes Error");
|
mb.setText("Graphic Attributes Error");
|
||||||
mb
|
mb.setMessage("You must select at least one graphic type");
|
||||||
.setMessage("You must select at least one graphic type");
|
|
||||||
mb.open();
|
mb.open();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,6 +38,7 @@ import com.raytheon.viz.gfe.temporaleditor.AbstractTemporalEditorBar;
|
||||||
import com.raytheon.viz.gfe.temporaleditor.TemporalEditorUtil;
|
import com.raytheon.viz.gfe.temporaleditor.TemporalEditorUtil;
|
||||||
import com.raytheon.viz.gfe.temporaleditor.dialogs.DisplayAttributesDialog;
|
import com.raytheon.viz.gfe.temporaleditor.dialogs.DisplayAttributesDialog;
|
||||||
import com.raytheon.viz.gfe.temporaleditor.dialogs.MoveWeatherElementDialog;
|
import com.raytheon.viz.gfe.temporaleditor.dialogs.MoveWeatherElementDialog;
|
||||||
|
import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MouseHandler to resize temporal editor bars.
|
* MouseHandler to resize temporal editor bars.
|
||||||
|
@ -47,6 +48,7 @@ import com.raytheon.viz.gfe.temporaleditor.dialogs.MoveWeatherElementDialog;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ------------- --------------------------
|
* ------------ ---------- ------------- --------------------------
|
||||||
* May 28, 2009 #2159 Richard Peter Initial Creation.
|
* May 28, 2009 #2159 Richard Peter Initial Creation.
|
||||||
|
* Nov 14, 2012 #1298 rferrel Changes for non-blocking DisplayAttributesDialog.
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author rjpeter
|
* @author rjpeter
|
||||||
|
@ -122,11 +124,20 @@ public class TitleBarMouseHandler extends MouseHandler {
|
||||||
public void run() {
|
public void run() {
|
||||||
Shell shell = PlatformUI.getWorkbench()
|
Shell shell = PlatformUI.getWorkbench()
|
||||||
.getActiveWorkbenchWindow().getShell();
|
.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(
|
DisplayAttributesDialog dialog = new DisplayAttributesDialog(
|
||||||
shell, teBar, parm);
|
shell, teBar, parm);
|
||||||
dialog.setBlockOnOpen(true);
|
dialog.setBlockOnOpen(false);
|
||||||
|
dialog.setCloseCallback(new ICloseCallback() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void dialogClosed(Object returnValue) {
|
||||||
|
teBar.redraw();
|
||||||
|
}
|
||||||
|
});
|
||||||
dialog.open();
|
dialog.open();
|
||||||
teBar.redraw();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue