Merge "Issue #1298 Changes for non-blocking FuzzValueDialog." into development
Former-commit-id:ff5083715b
[formerlyff5083715b
[formerly e8ed91fc876a3f7e6dd67e058c3117cb616c96d2]] Former-commit-id:c44f90f675
Former-commit-id:4a22ded443
This commit is contained in:
commit
3bdfe02fe3
2 changed files with 30 additions and 20 deletions
|
@ -32,6 +32,7 @@ import org.eclipse.swt.widgets.Control;
|
|||
import org.eclipse.swt.widgets.Label;
|
||||
import org.eclipse.swt.widgets.Scale;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
|
||||
import com.raytheon.viz.gfe.core.DataManager;
|
||||
import com.raytheon.viz.gfe.core.msgs.IActivatedParmChangedListener;
|
||||
|
@ -60,6 +61,7 @@ import com.raytheon.viz.ui.dialogs.CaveJFACEDialog;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 10, 2008 Eric Babin Initial Creation
|
||||
* Nov 10, 2012 1298 rferrel Changes for non-blocking dialog.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -94,9 +96,25 @@ public class FuzzValueDialog extends CaveJFACEDialog implements
|
|||
|
||||
private DataManager dataManager;
|
||||
|
||||
public FuzzValueDialog(Shell parent, DataManager dataManager) {
|
||||
private static FuzzValueDialog dialog;
|
||||
|
||||
public static void openDialog(DataManager dataManager) {
|
||||
if (dialog == null || dialog.getShell() == null || dialog.isDisposed()) {
|
||||
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||
.getShell();
|
||||
|
||||
dialog = new FuzzValueDialog(shell, dataManager);
|
||||
|
||||
dialog.setBlockOnOpen(false);
|
||||
dialog.open();
|
||||
} else {
|
||||
dialog.bringToTop();
|
||||
}
|
||||
}
|
||||
|
||||
private FuzzValueDialog(Shell parent, DataManager dataManager) {
|
||||
super(parent);
|
||||
this.setShellStyle(SWT.TITLE | SWT.MODELESS | SWT.CLOSE);
|
||||
this.setShellStyle(SWT.DIALOG_TRIM | SWT.MODELESS);
|
||||
this.dataManager = dataManager;
|
||||
this.parm = dataManager.getSpatialDisplayManager().getActivatedParm();
|
||||
this.minimum = parm.getGridInfo().getMinValue();
|
||||
|
|
|
@ -44,8 +44,6 @@ import org.eclipse.jface.preference.IPreferenceStore;
|
|||
import org.eclipse.swt.custom.BusyIndicator;
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
import org.geotools.coverage.grid.GridGeometry2D;
|
||||
import org.opengis.metadata.spatial.PixelOrientation;
|
||||
import org.opengis.referencing.crs.CoordinateReferenceSystem;
|
||||
|
@ -160,6 +158,7 @@ import com.vividsolutions.jts.geom.Envelope;
|
|||
* Aug 20, 2008 dglazesk Update for the ColorMap interface change
|
||||
* Nov 23, 2011 mli set vector lineStyle
|
||||
* May 11, 2012 njensen Allow rsc to be recycled
|
||||
* Nov 08, 2012 1298 rferrel Changes for non-blocking FuzzValueDialog.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -171,28 +170,28 @@ import com.vividsolutions.jts.geom.Envelope;
|
|||
public class GFEResource extends
|
||||
AbstractVizResource<GFEResourceData, MapDescriptor> implements
|
||||
IResourceDataChanged, IContextMenuContributor, IMessageClient {
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
private final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(GFEResource.class);
|
||||
|
||||
/** maximum label size in pixels */
|
||||
private static final int maxLabelLength = 100;
|
||||
private final int maxLabelLength = 100;
|
||||
|
||||
/** maximum label height in pixels */
|
||||
@SuppressWarnings("unused")
|
||||
private static final int maxLabelHeight = 40;
|
||||
private final int maxLabelHeight = 40;
|
||||
|
||||
/** distance between labels */
|
||||
private static final int pixelDistance = 125;
|
||||
private final int pixelDistance = 125;
|
||||
|
||||
private static final Set<VisualizationType> OUTLINE_TYPES = EnumSet.of(
|
||||
private final Set<VisualizationType> OUTLINE_TYPES = EnumSet.of(
|
||||
VisualizationType.CONTOUR, VisualizationType.WIND_ARROW,
|
||||
VisualizationType.WIND_BARB, VisualizationType.BOUNDED_AREA);
|
||||
|
||||
private static final Set<VisualizationType> DENSITY_TYPES = EnumSet.of(
|
||||
private final Set<VisualizationType> DENSITY_TYPES = EnumSet.of(
|
||||
VisualizationType.CONTOUR, VisualizationType.WIND_ARROW,
|
||||
VisualizationType.WIND_BARB);
|
||||
|
||||
private static final Set<VisualizationType> MAG_TYPES = EnumSet.of(
|
||||
private final Set<VisualizationType> MAG_TYPES = EnumSet.of(
|
||||
VisualizationType.CONTOUR, VisualizationType.WIND_ARROW,
|
||||
VisualizationType.WIND_BARB, VisualizationType.BOUNDED_AREA);
|
||||
|
||||
|
@ -274,7 +273,7 @@ public class GFEResource extends
|
|||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Construct a resource that is capable of displaying a particular parm
|
||||
*
|
||||
|
@ -1202,7 +1201,6 @@ public class GFEResource extends
|
|||
}
|
||||
|
||||
private class FuzzValueAction extends AbstractRightClickAction {
|
||||
|
||||
public FuzzValueAction() {
|
||||
super("Set Fuzz Value...");
|
||||
|
||||
|
@ -1210,13 +1208,7 @@ public class GFEResource extends
|
|||
|
||||
@Override
|
||||
public void run() {
|
||||
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||
.getShell();
|
||||
|
||||
FuzzValueDialog fuzz = new FuzzValueDialog(shell, dataManager);
|
||||
|
||||
fuzz.setBlockOnOpen(true);
|
||||
fuzz.open();
|
||||
FuzzValueDialog.openDialog(dataManager);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue