Issue #1298 Changes for non-blocking MoveWeatherElementDialog.
Change-Id: I5f41c52d45146a0e9cdfbf613ec3918382f6a455 Former-commit-id:acf1881cb7
[formerly dd80807a0469e7c677f8e0d214fcdec715c67518] Former-commit-id:a6fdc7b580
This commit is contained in:
parent
fe11e31bfb
commit
fc87eccb77
3 changed files with 15 additions and 28 deletions
|
@ -37,11 +37,9 @@ import org.eclipse.swt.graphics.Rectangle;
|
||||||
import org.eclipse.swt.layout.GridData;
|
import org.eclipse.swt.layout.GridData;
|
||||||
import org.eclipse.swt.layout.GridLayout;
|
import org.eclipse.swt.layout.GridLayout;
|
||||||
import org.eclipse.swt.widgets.Composite;
|
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.GFERecord.GridType;
|
||||||
|
import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID;
|
||||||
import com.raytheon.uf.viz.core.VizApp;
|
import com.raytheon.uf.viz.core.VizApp;
|
||||||
import com.raytheon.viz.gfe.GFEPreference;
|
import com.raytheon.viz.gfe.GFEPreference;
|
||||||
import com.raytheon.viz.gfe.PreferenceConstants;
|
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.IGridVisibilityChangedListener;
|
||||||
import com.raytheon.viz.gfe.core.msgs.IParmIDChangedListener;
|
import com.raytheon.viz.gfe.core.msgs.IParmIDChangedListener;
|
||||||
import com.raytheon.viz.gfe.core.msgs.Message;
|
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.TEOverlayModeChangedMsg;
|
||||||
import com.raytheon.viz.gfe.core.msgs.TEweModeChangedMsg;
|
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.core.parm.Parm;
|
||||||
import com.raytheon.viz.gfe.gridmanager.GridManager;
|
import com.raytheon.viz.gfe.gridmanager.GridManager;
|
||||||
import com.raytheon.viz.gfe.temporaleditor.dialogs.MoveWeatherElementDialog;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TemporalEditor widget containing a TemporalEditorBar for each displayed
|
* TemporalEditor widget containing a TemporalEditorBar for each displayed
|
||||||
|
@ -70,6 +67,7 @@ import com.raytheon.viz.gfe.temporaleditor.dialogs.MoveWeatherElementDialog;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Apr 30, 2009 2159 rjpeter Initial creation
|
* Apr 30, 2009 2159 rjpeter Initial creation
|
||||||
|
* Nov 14, 2012 1298 rferrel Remove no longer used reference to MoveWeatherElementDialog.
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author rjpeter
|
* @author rjpeter
|
||||||
|
@ -439,21 +437,6 @@ public class TemporalEditor extends Composite implements IMessageClient {
|
||||||
return barList;
|
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() {
|
public StatisticsMode getMode() {
|
||||||
return statMode;
|
return statMode;
|
||||||
}
|
}
|
||||||
|
@ -530,8 +513,8 @@ public class TemporalEditor extends Composite implements IMessageClient {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
final ArrayList<Parm> parmsToRemove = new ArrayList<Parm>(parmToTEBar
|
final ArrayList<Parm> parmsToRemove = new ArrayList<Parm>(
|
||||||
.keySet());
|
parmToTEBar.keySet());
|
||||||
parmsToRemove.removeAll(parmsToAdd);
|
parmsToRemove.removeAll(parmsToAdd);
|
||||||
|
|
||||||
VizApp.runAsync(new Runnable() {
|
VizApp.runAsync(new Runnable() {
|
||||||
|
@ -651,8 +634,8 @@ public class TemporalEditor extends Composite implements IMessageClient {
|
||||||
break;
|
break;
|
||||||
case ALL_NOISC:
|
case ALL_NOISC:
|
||||||
for (Parm parmAdd : additions) {
|
for (Parm parmAdd : additions) {
|
||||||
if (!parmAdd.getParmID().getDbId().getModelName().equals(
|
if (!parmAdd.getParmID().getDbId().getModelName()
|
||||||
"ISC")) {
|
.equals("ISC")) {
|
||||||
addParm(parmAdd);
|
addParm(parmAdd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -680,8 +663,7 @@ public class TemporalEditor extends Composite implements IMessageClient {
|
||||||
@Override
|
@Override
|
||||||
public void propertyChange(PropertyChangeEvent event) {
|
public void propertyChange(PropertyChangeEvent event) {
|
||||||
String id = event.getProperty();
|
String id = event.getProperty();
|
||||||
if (id
|
if (id.equals(PreferenceConstants.GFE_TEMPORAL_EDITOR_STATISTICS_MODE)) {
|
||||||
.equals(PreferenceConstants.GFE_TEMPORAL_EDITOR_STATISTICS_MODE)) {
|
|
||||||
statMode = StatisticsMode
|
statMode = StatisticsMode
|
||||||
.valueOf(GFEPreference
|
.valueOf(GFEPreference
|
||||||
.getPreference(PreferenceConstants.GFE_TEMPORAL_EDITOR_STATISTICS_MODE));
|
.getPreference(PreferenceConstants.GFE_TEMPORAL_EDITOR_STATISTICS_MODE));
|
||||||
|
|
|
@ -47,6 +47,7 @@ import com.raytheon.viz.ui.dialogs.CaveJFACEDialog;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* 05/19/09 #2159 rjpeter Initial creation.
|
* 05/19/09 #2159 rjpeter Initial creation.
|
||||||
|
* 11/14/2012 #1298 rferrel Changes for non-blocking dialog.
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author rjpeter
|
* @author rjpeter
|
||||||
|
@ -70,7 +71,7 @@ public class MoveWeatherElementDialog extends CaveJFACEDialog {
|
||||||
AbstractTemporalEditorBar sourceBar,
|
AbstractTemporalEditorBar sourceBar,
|
||||||
List<AbstractTemporalEditorBar> destBars) {
|
List<AbstractTemporalEditorBar> destBars) {
|
||||||
super(parent);
|
super(parent);
|
||||||
this.setShellStyle(SWT.TITLE | SWT.MODELESS | SWT.CLOSE);
|
this.setShellStyle(SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
|
||||||
this.temporalEditor = temporalEditor;
|
this.temporalEditor = temporalEditor;
|
||||||
this.parm = parm;
|
this.parm = parm;
|
||||||
this.sourceBar = sourceBar;
|
this.sourceBar = sourceBar;
|
||||||
|
|
|
@ -49,6 +49,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
||||||
* ------------ ---------- ------------- --------------------------
|
* ------------ ---------- ------------- --------------------------
|
||||||
* 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.
|
* Nov 14, 2012 #1298 rferrel Changes for non-blocking DisplayAttributesDialog.
|
||||||
|
* Changes for non-blocking MoveWeatherElementDialog.
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author rjpeter
|
* @author rjpeter
|
||||||
|
@ -151,10 +152,13 @@ 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.
|
||||||
MoveWeatherElementDialog dialog = new MoveWeatherElementDialog(
|
MoveWeatherElementDialog dialog = new MoveWeatherElementDialog(
|
||||||
shell, teBar.getTemporalEditor(), parm, teBar,
|
shell, teBar.getTemporalEditor(), parm, teBar,
|
||||||
barList);
|
barList);
|
||||||
dialog.setBlockOnOpen(true);
|
dialog.setBlockOnOpen(false);
|
||||||
dialog.open();
|
dialog.open();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue