Issue #1298 Changes for non-blocking MoveWeatherElementDialog.

Change-Id: I5f41c52d45146a0e9cdfbf613ec3918382f6a455

Former-commit-id: 8cce309a6e [formerly fc87eccb77] [formerly a6fdc7b580] [formerly 8cce309a6e [formerly fc87eccb77] [formerly a6fdc7b580] [formerly acf1881cb7 [formerly a6fdc7b580 [formerly dd80807a0469e7c677f8e0d214fcdec715c67518]]]]
Former-commit-id: acf1881cb7
Former-commit-id: 4b6c5bc2d3 [formerly 8881e4d3ec] [formerly 092e0c8e86fd9af48cdabc168fe255b8d961546d [formerly d6c5839e0e]]
Former-commit-id: 8753a2bf60a5a6a69df5eac63b7ac9f764b8df27 [formerly 265adb9b1c]
Former-commit-id: aeb27b3c88
This commit is contained in:
Roger Ferrel 2012-11-14 16:33:27 -06:00
parent ecde93e6fc
commit 95711528ad
3 changed files with 15 additions and 28 deletions

View file

@ -37,11 +37,9 @@ import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID;
import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType;
import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID;
import com.raytheon.uf.viz.core.VizApp;
import com.raytheon.viz.gfe.GFEPreference;
import com.raytheon.viz.gfe.PreferenceConstants;
@ -53,12 +51,11 @@ import com.raytheon.viz.gfe.core.msgs.IDisplayedParmListChangedListener;
import com.raytheon.viz.gfe.core.msgs.IGridVisibilityChangedListener;
import com.raytheon.viz.gfe.core.msgs.IParmIDChangedListener;
import com.raytheon.viz.gfe.core.msgs.Message;
import com.raytheon.viz.gfe.core.msgs.Message.IMessageClient;
import com.raytheon.viz.gfe.core.msgs.TEOverlayModeChangedMsg;
import com.raytheon.viz.gfe.core.msgs.TEweModeChangedMsg;
import com.raytheon.viz.gfe.core.msgs.Message.IMessageClient;
import com.raytheon.viz.gfe.core.parm.Parm;
import com.raytheon.viz.gfe.gridmanager.GridManager;
import com.raytheon.viz.gfe.temporaleditor.dialogs.MoveWeatherElementDialog;
/**
* TemporalEditor widget containing a TemporalEditorBar for each displayed
@ -70,6 +67,7 @@ import com.raytheon.viz.gfe.temporaleditor.dialogs.MoveWeatherElementDialog;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Apr 30, 2009 2159 rjpeter Initial creation
* Nov 14, 2012 1298 rferrel Remove no longer used reference to MoveWeatherElementDialog.
* </pre>
*
* @author rjpeter
@ -439,21 +437,6 @@ public class TemporalEditor extends Composite implements IMessageClient {
return barList;
}
/**
*
* @param parm
* @param sourceBar
*/
public void createMoveParmDialog(Parm parm,
AbstractTemporalEditorBar sourceBar) {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getShell();
MoveWeatherElementDialog dialog = new MoveWeatherElementDialog(shell,
this, parm, sourceBar, getCombinableBars(parm, sourceBar));
dialog.setBlockOnOpen(true);
dialog.open();
}
public StatisticsMode getMode() {
return statMode;
}
@ -530,8 +513,8 @@ public class TemporalEditor extends Composite implements IMessageClient {
break;
}
final ArrayList<Parm> parmsToRemove = new ArrayList<Parm>(parmToTEBar
.keySet());
final ArrayList<Parm> parmsToRemove = new ArrayList<Parm>(
parmToTEBar.keySet());
parmsToRemove.removeAll(parmsToAdd);
VizApp.runAsync(new Runnable() {
@ -651,8 +634,8 @@ public class TemporalEditor extends Composite implements IMessageClient {
break;
case ALL_NOISC:
for (Parm parmAdd : additions) {
if (!parmAdd.getParmID().getDbId().getModelName().equals(
"ISC")) {
if (!parmAdd.getParmID().getDbId().getModelName()
.equals("ISC")) {
addParm(parmAdd);
}
}
@ -680,8 +663,7 @@ public class TemporalEditor extends Composite implements IMessageClient {
@Override
public void propertyChange(PropertyChangeEvent event) {
String id = event.getProperty();
if (id
.equals(PreferenceConstants.GFE_TEMPORAL_EDITOR_STATISTICS_MODE)) {
if (id.equals(PreferenceConstants.GFE_TEMPORAL_EDITOR_STATISTICS_MODE)) {
statMode = StatisticsMode
.valueOf(GFEPreference
.getPreference(PreferenceConstants.GFE_TEMPORAL_EDITOR_STATISTICS_MODE));

View file

@ -47,6 +47,7 @@ import com.raytheon.viz.ui.dialogs.CaveJFACEDialog;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 05/19/09 #2159 rjpeter Initial creation.
* 11/14/2012 #1298 rferrel Changes for non-blocking dialog.
* </pre>
*
* @author rjpeter
@ -70,7 +71,7 @@ public class MoveWeatherElementDialog extends CaveJFACEDialog {
AbstractTemporalEditorBar sourceBar,
List<AbstractTemporalEditorBar> destBars) {
super(parent);
this.setShellStyle(SWT.TITLE | SWT.MODELESS | SWT.CLOSE);
this.setShellStyle(SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
this.temporalEditor = temporalEditor;
this.parm = parm;
this.sourceBar = sourceBar;

View file

@ -49,6 +49,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
* ------------ ---------- ------------- --------------------------
* May 28, 2009 #2159 Richard Peter Initial Creation.
* Nov 14, 2012 #1298 rferrel Changes for non-blocking DisplayAttributesDialog.
* Changes for non-blocking MoveWeatherElementDialog.
* </pre>
*
* @author rjpeter
@ -151,10 +152,13 @@ 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.
MoveWeatherElementDialog dialog = new MoveWeatherElementDialog(
shell, teBar.getTemporalEditor(), parm, teBar,
barList);
dialog.setBlockOnOpen(true);
dialog.setBlockOnOpen(false);
dialog.open();
}
});