Merge branch 'development' of ssh://lightning.omaha.us.ray.com:29418/AWIPS2_baseline into development
Former-commit-id:a3a619c6d2
[formerly4f96a60d66
] [formerly765124eb11
[formerly 3dbff4250960727aca52be2cd6f047592ea9fc5d]] Former-commit-id:765124eb11
Former-commit-id:92dbb44f69
This commit is contained in:
commit
85e5845f62
11 changed files with 141 additions and 89 deletions
|
@ -47,6 +47,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* 2009-12-02 vkorolev Initial creation.
|
||||
* 2010-01-21 4268 vkorolev Fixed Trend Plot
|
||||
* 2012-10-15 1229 vkorolev Changes for non-blocking TrendPlotDlg
|
||||
* </pre>
|
||||
*
|
||||
* @author vkorolev
|
||||
|
@ -65,9 +66,12 @@ public class TrendPlotDlg extends CaveSWTDialog {
|
|||
|
||||
public Date curdate;
|
||||
|
||||
public String var;
|
||||
|
||||
public TrendPlotDlg(Shell parent, String selectedZone, String station,
|
||||
ArrayList<String> product, String dataName) {
|
||||
super(parent, SWT.DIALOG_TRIM | SWT.RESIZE);
|
||||
super(parent, SWT.DIALOG_TRIM | SWT.RESIZE, CAVE.DO_NOT_BLOCK
|
||||
| CAVE.INDEPENDENT_SHELL);
|
||||
setText(getTrendPlotName(product) + " Trend Plot for " + station + "#"
|
||||
+ dataName);
|
||||
|
||||
|
@ -89,13 +93,13 @@ public class TrendPlotDlg extends CaveSWTDialog {
|
|||
|
||||
@Override
|
||||
protected void initializeComponents(Shell shell) {
|
||||
setReturnValue(false);
|
||||
setReturnValue(product);
|
||||
// Initialize all layouts
|
||||
Iterator<String> prodVar = product.iterator();
|
||||
while (prodVar.hasNext()) {
|
||||
String varname = prodVar.next();
|
||||
new TrendPlotCanvas(shell, selectedZone, station, varname,
|
||||
dataName, obData);
|
||||
String var = prodVar.next();
|
||||
new TrendPlotCanvas(shell, selectedZone, station, var, dataName,
|
||||
obData);
|
||||
}
|
||||
addCloseBtn();
|
||||
}
|
||||
|
|
|
@ -29,13 +29,14 @@ import com.raytheon.viz.gfe.core.DataManager;
|
|||
import com.raytheon.viz.gfe.dialogs.BreakLockDialog;
|
||||
|
||||
/**
|
||||
* TODO Add Description ShowBreakLock.java Jun 17, 2008
|
||||
* Action class to bring up the break locck dialog.
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jun 17, 2008 Eric Babin Initial Creation
|
||||
* Oct 27, 2012 1287 rferrel Changes for non-blocking BreakLockDialog.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -44,6 +45,7 @@ import com.raytheon.viz.gfe.dialogs.BreakLockDialog;
|
|||
*/
|
||||
|
||||
public class ShowBreakLock extends AbstractHandler {
|
||||
private BreakLockDialog dialog;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
|
@ -59,12 +61,16 @@ public class ShowBreakLock extends AbstractHandler {
|
|||
return null;
|
||||
}
|
||||
|
||||
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||
.getShell();
|
||||
if (dialog == null || dialog.getShell() == null || dialog.isDisposed()) {
|
||||
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||
.getShell();
|
||||
|
||||
BreakLockDialog dialog = new BreakLockDialog(shell, dm);
|
||||
dialog.setBlockOnOpen(true);
|
||||
dialog.open();
|
||||
dialog = new BreakLockDialog(shell, dm);
|
||||
dialog.setBlockOnOpen(false);
|
||||
dialog.open();
|
||||
} else {
|
||||
dialog.bringToTop();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ import com.raytheon.viz.gfe.dialogs.CopyGridsDialog;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 27, 2008 Eric Babin Initial Creation
|
||||
* Oct 23, 2012 1287 rferrel Changes for non-blocking CopyGridsDialog.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -47,9 +48,16 @@ import com.raytheon.viz.gfe.dialogs.CopyGridsDialog;
|
|||
|
||||
public class ShowCopyGridsDialog extends AbstractHandler {
|
||||
|
||||
private static IUFStatusHandler statusHandler = UFStatus
|
||||
private IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(ShowCopyGridsDialog.class);
|
||||
|
||||
/**
|
||||
* The active dialog. This assumes the dialog is modal. If the dialog is not
|
||||
* modal then the current logic will bring the active dialog back to the top
|
||||
* no matter which option is selected.
|
||||
*/
|
||||
private CopyGridsDialog dialog;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
|
@ -64,27 +72,32 @@ public class ShowCopyGridsDialog extends AbstractHandler {
|
|||
return null;
|
||||
}
|
||||
|
||||
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||
.getShell();
|
||||
if (dialog == null || dialog.getShell() == null || dialog.isDisposed()) {
|
||||
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||
.getShell();
|
||||
|
||||
boolean isSelected;
|
||||
String selectedOrAll = event.getParameter("selectedOrAll");
|
||||
if ("selected".equalsIgnoreCase(selectedOrAll)) {
|
||||
isSelected = true;
|
||||
} else if ("all".equalsIgnoreCase(selectedOrAll)) {
|
||||
isSelected = false;
|
||||
boolean isSelected;
|
||||
String selectedOrAll = event.getParameter("selectedOrAll");
|
||||
if ("selected".equalsIgnoreCase(selectedOrAll)) {
|
||||
isSelected = true;
|
||||
} else if ("all".equalsIgnoreCase(selectedOrAll)) {
|
||||
isSelected = false;
|
||||
} else {
|
||||
statusHandler
|
||||
.error("Invalid parmeter \""
|
||||
+ selectedOrAll
|
||||
+ "\" in ShowCopyGridsDialog. Value must be \"selected\" or \"all\".");
|
||||
dialog = null;
|
||||
return null;
|
||||
}
|
||||
|
||||
dialog = new CopyGridsDialog(shell, dm, isSelected);
|
||||
dialog.setBlockOnOpen(false);
|
||||
dialog.open();
|
||||
} else {
|
||||
statusHandler
|
||||
.error("Invalid parmeter \""
|
||||
+ selectedOrAll
|
||||
+ "\" in ShowCopyGridsDialog. Value must be \"selected\" or \"all\".");
|
||||
return null;
|
||||
dialog.bringToTop();
|
||||
}
|
||||
|
||||
CopyGridsDialog dialog = new CopyGridsDialog(shell, dm, isSelected);
|
||||
dialog.setBlockOnOpen(true);
|
||||
dialog.open();
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ import com.raytheon.viz.gfe.dialogs.CreateFromScratchDialog;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 27, 2008 Eric Babin Initial Creation
|
||||
* 04/18/08 #857 bphillip Implemented interaction with server
|
||||
* Oct 24, 2012 #1287 rferrel Changes for non-blocking CreateFromScratchDialog.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -44,6 +45,7 @@ import com.raytheon.viz.gfe.dialogs.CreateFromScratchDialog;
|
|||
*/
|
||||
|
||||
public class ShowCreateFromScratchDialog extends AbstractHandler {
|
||||
private CreateFromScratchDialog dialog;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
|
@ -54,12 +56,16 @@ public class ShowCreateFromScratchDialog extends AbstractHandler {
|
|||
*/
|
||||
@Override
|
||||
public Object execute(ExecutionEvent arg0) throws ExecutionException {
|
||||
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||
.getShell();
|
||||
if (dialog == null || dialog.getShell() == null || dialog.isDisposed()) {
|
||||
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||
.getShell();
|
||||
|
||||
CreateFromScratchDialog dialog = new CreateFromScratchDialog(shell);
|
||||
dialog.setBlockOnOpen(true);
|
||||
dialog.open();
|
||||
dialog = new CreateFromScratchDialog(shell);
|
||||
dialog.setBlockOnOpen(false);
|
||||
dialog.open();
|
||||
} else {
|
||||
dialog.bringToTop();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@ import com.raytheon.viz.gfe.dialogs.DefineRefSetDialog;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 11, 2008 Eric Babin Initial Creation
|
||||
* Oct 24, 2012 1287 rferrel Changes for non-blocking DefineRefSetDialog.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -63,11 +64,13 @@ public class ShowDefineRefSetDialog extends AbstractHandler {
|
|||
return null;
|
||||
}
|
||||
|
||||
if (dialog == null || dialog.getShell() == null) {
|
||||
if (dialog == null || dialog.getShell() == null || dialog.isDisposed()) {
|
||||
dialog = new DefineRefSetDialog(shell, dm);
|
||||
dialog.setBlockOnOpen(false);
|
||||
dialog.open();
|
||||
} else {
|
||||
dialog.bringToTop();
|
||||
}
|
||||
dialog.open();
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ import com.raytheon.viz.gfe.dialogs.DefineSamplesViaLatLongDialog;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 15, 2008 Eric Babin Initial Creation
|
||||
* Apr 9, 2009 1288 rjpeter Removed explicit refresh of SpatialDisplayManager.
|
||||
* Oct 24, 2012 1287 rferrel Changes for non-blocking DefineSamplesViaLatLongDialog.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -44,6 +45,7 @@ import com.raytheon.viz.gfe.dialogs.DefineSamplesViaLatLongDialog;
|
|||
*/
|
||||
|
||||
public class ShowDefineSamplesLatLongAction extends AbstractHandler {
|
||||
private DefineSamplesViaLatLongDialog dialog;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
|
@ -54,13 +56,16 @@ public class ShowDefineSamplesLatLongAction extends AbstractHandler {
|
|||
*/
|
||||
@Override
|
||||
public Object execute(ExecutionEvent arg0) throws ExecutionException {
|
||||
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||
.getShell();
|
||||
if (dialog == null || dialog.getShell() == null || dialog.isDisposed()) {
|
||||
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||
.getShell();
|
||||
|
||||
DefineSamplesViaLatLongDialog dialog = new DefineSamplesViaLatLongDialog(
|
||||
shell);
|
||||
dialog.setBlockOnOpen(true);
|
||||
dialog.open();
|
||||
dialog = new DefineSamplesViaLatLongDialog(shell);
|
||||
dialog.setBlockOnOpen(false);
|
||||
dialog.open();
|
||||
} else {
|
||||
dialog.bringToTop();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -46,6 +46,7 @@ import com.raytheon.viz.ui.dialogs.CaveJFACEDialog;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 26, 2008 Eric Babin Initial Creation
|
||||
* Oct 23, 2012 1287 rferrel Made dialog modal like AWIPS 1.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -70,7 +71,7 @@ public class CopyGridsDialog extends CaveJFACEDialog {
|
|||
super(parent);
|
||||
this.dataManager = dataManager;
|
||||
this.parmMgr = dataManager.getParmManager();
|
||||
this.setShellStyle(SWT.TITLE | SWT.MODELESS | SWT.CLOSE);
|
||||
this.setShellStyle(SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
|
||||
this.isSelected = isSelectedType;
|
||||
|
||||
}
|
||||
|
|
|
@ -46,6 +46,7 @@ import com.raytheon.viz.ui.dialogs.CaveJFACEDialog;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 26, 2008 Eric Babin Initial Creation
|
||||
* Oct 24, 2012 1287 rferrel Changes for non-blocking dialog.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -75,7 +76,7 @@ public class CreateFromScratchDialog extends CaveJFACEDialog {
|
|||
|
||||
public CreateFromScratchDialog(Shell parent) {
|
||||
super(parent);
|
||||
this.setShellStyle(SWT.TITLE | SWT.MODELESS | SWT.CLOSE);
|
||||
this.setShellStyle(SWT.DIALOG_TRIM | SWT.MODELESS);
|
||||
|
||||
}
|
||||
|
||||
|
@ -130,8 +131,8 @@ public class CreateFromScratchDialog extends CaveJFACEDialog {
|
|||
intervalLabel = new Label(top, SWT.NONE);
|
||||
data = new GridData(30, SWT.DEFAULT);
|
||||
intervalLabel.setLayoutData(data);
|
||||
intervalLabel.setText(Integer
|
||||
.toString(intervalScale.getSelection()));
|
||||
intervalLabel
|
||||
.setText(Integer.toString(intervalScale.getSelection()));
|
||||
|
||||
}
|
||||
|
||||
|
@ -157,8 +158,8 @@ public class CreateFromScratchDialog extends CaveJFACEDialog {
|
|||
durationLabel = new Label(top, SWT.NONE);
|
||||
data = new GridData(30, SWT.DEFAULT);
|
||||
durationLabel.setLayoutData(data);
|
||||
durationLabel.setText(Integer
|
||||
.toString(durationScale.getSelection()));
|
||||
durationLabel
|
||||
.setText(Integer.toString(durationScale.getSelection()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -167,8 +168,8 @@ public class CreateFromScratchDialog extends CaveJFACEDialog {
|
|||
|
||||
if (displayDuration) {
|
||||
durationScale.setSelection(intervalScale.getSelection());
|
||||
durationLabel.setText(Integer
|
||||
.toString(durationScale.getSelection()));
|
||||
durationLabel
|
||||
.setText(Integer.toString(durationScale.getSelection()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -272,7 +273,9 @@ public class CreateFromScratchDialog extends CaveJFACEDialog {
|
|||
createDuration = durationScale.getSelection();
|
||||
}
|
||||
|
||||
DataManager.getCurrentInstance().getParmOp()
|
||||
DataManager
|
||||
.getCurrentInstance()
|
||||
.getParmOp()
|
||||
.createFromScratchSelected(mode, createInterval * 3600,
|
||||
createDuration * 3600);
|
||||
|
||||
|
|
|
@ -90,6 +90,8 @@ import com.vividsolutions.jts.geom.MultiPolygon;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 11, 2008 Eric Babin Initial Creation
|
||||
* Jul 15, 2008 njensen Hooked into backend/fixes
|
||||
* Oct 24, 2012 1287 rferrel Code clean up for non-blocking dialog.
|
||||
* Oct 24, 2012 1287 rferrel Changes for non-blocking SaveDeleteRefDialog.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -101,18 +103,18 @@ public class DefineRefSetDialog extends CaveJFACEDialog implements
|
|||
IReferenceSetChangedListener, IReferenceSetIDChangedListener,
|
||||
IReferenceSetInvChangedListener, IDisplayedParmListChangedListener,
|
||||
IEditAreaGroupInvChangedListener {
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
private final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(DefineRefSetDialog.class);
|
||||
|
||||
private static final int NUM_ITEMS = 13;
|
||||
private final int NUM_ITEMS = 13;
|
||||
|
||||
private static final int CLEAR_QUERY_ID = IDialogConstants.CLIENT_ID + 1;
|
||||
private final int CLEAR_QUERY_ID = IDialogConstants.CLIENT_ID + 1;
|
||||
|
||||
private static final int RECALL_QUERY_ID = IDialogConstants.CLIENT_ID + 2;
|
||||
private final int RECALL_QUERY_ID = IDialogConstants.CLIENT_ID + 2;
|
||||
|
||||
private static final int UNDO_EDIT_AREA_ID = IDialogConstants.CLIENT_ID + 3;
|
||||
private final int UNDO_EDIT_AREA_ID = IDialogConstants.CLIENT_ID + 3;
|
||||
|
||||
private static final int CONVERT_TO_LOCATION_ID = IDialogConstants.CLIENT_ID + 4;
|
||||
private final int CONVERT_TO_LOCATION_ID = IDialogConstants.CLIENT_ID + 4;
|
||||
|
||||
private Composite top;
|
||||
|
||||
|
@ -154,10 +156,6 @@ public class DefineRefSetDialog extends CaveJFACEDialog implements
|
|||
{ "3", "" }, { "-", "" }, { "0", "" }, { ".", "" },
|
||||
{ "BS", "BackSpace" }, { "", "" }, { "SP", "Space" }, };
|
||||
|
||||
// private java.util.List<String> gList;
|
||||
|
||||
// private HashMap<String, java.util.List<String>> editAreaMap;
|
||||
|
||||
private IReferenceSetManager refSetMgr;
|
||||
|
||||
private IParmManager parmManager;
|
||||
|
@ -166,9 +164,13 @@ public class DefineRefSetDialog extends CaveJFACEDialog implements
|
|||
|
||||
private String[] initialGroups;
|
||||
|
||||
private SaveDeleteRefDialog deleteDlg;
|
||||
|
||||
private SaveDeleteRefDialog saveDlg;
|
||||
|
||||
public DefineRefSetDialog(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.refSetMgr = this.dataManager.getRefManager();
|
||||
this.parmManager = this.dataManager.getParmManager();
|
||||
|
@ -1002,19 +1004,28 @@ public class DefineRefSetDialog extends CaveJFACEDialog implements
|
|||
|
||||
private void saveAreaCB() {
|
||||
|
||||
SaveDeleteRefDialog dialog = new SaveDeleteRefDialog(getShell(),
|
||||
this.refSetMgr, "Save");
|
||||
|
||||
dialog.open();
|
||||
|
||||
if (saveDlg == null || saveDlg.getShell() == null
|
||||
|| saveDlg.isDisposed()) {
|
||||
saveDlg = new SaveDeleteRefDialog(getShell(), this.refSetMgr,
|
||||
"Save");
|
||||
saveDlg.setBlockOnOpen(false);
|
||||
saveDlg.open();
|
||||
} else {
|
||||
saveDlg.bringToTop();
|
||||
}
|
||||
}
|
||||
|
||||
private void deleteAreaCB() {
|
||||
|
||||
SaveDeleteRefDialog dialog = new SaveDeleteRefDialog(this.getShell(),
|
||||
refSetMgr, "Delete");
|
||||
dialog.open();
|
||||
|
||||
if (deleteDlg == null || deleteDlg.getShell() == null
|
||||
|| deleteDlg.isDisposed()) {
|
||||
deleteDlg = new SaveDeleteRefDialog(this.getShell(), refSetMgr,
|
||||
"Delete");
|
||||
deleteDlg.setBlockOnOpen(false);
|
||||
deleteDlg.open();
|
||||
} else {
|
||||
deleteDlg.bringToTop();
|
||||
}
|
||||
}
|
||||
|
||||
private void saveGroupCB() {
|
||||
|
|
|
@ -43,6 +43,7 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 15, 2008 Eric Babin Initial Creation
|
||||
* 04/10/2009 #1290 rjpeter Moved field validation to when ok pressed.
|
||||
* Oct 24, 2012 #1287 rferrel Change shell style.
|
||||
* </pre>
|
||||
*
|
||||
* @author ebabin
|
||||
|
@ -61,7 +62,7 @@ public class DefineSamplesViaLatLongDialog extends CaveJFACEDialog {
|
|||
|
||||
public DefineSamplesViaLatLongDialog(Shell parent) {
|
||||
super(parent);
|
||||
this.setShellStyle(SWT.TITLE | SWT.MODELESS | SWT.CLOSE);
|
||||
this.setShellStyle(SWT.DIALOG_TRIM | SWT.MODELESS);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -42,20 +42,18 @@ import org.eclipse.swt.widgets.Shell;
|
|||
import org.eclipse.swt.widgets.Text;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.gfe.reference.ReferenceData;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.reference.ReferenceID;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.reference.ReferenceData.RefType;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.reference.ReferenceID;
|
||||
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.viz.gfe.Activator;
|
||||
import com.raytheon.viz.gfe.constants.StatusConstants;
|
||||
import com.raytheon.viz.gfe.core.IReferenceSetManager;
|
||||
import com.raytheon.viz.ui.dialogs.CaveJFACEDialog;
|
||||
import com.raytheon.viz.ui.widgets.ToggleSelectList;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Dialog for performing a save or delete of an Edit Area.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
@ -63,6 +61,7 @@ import com.raytheon.viz.ui.widgets.ToggleSelectList;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Sep 10, 2010 randerso Initial creation
|
||||
* Oct 24, 2012 1287 rferrel Code clean up part of non-blocking dialog.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -71,11 +70,12 @@ import com.raytheon.viz.ui.widgets.ToggleSelectList;
|
|||
*/
|
||||
|
||||
public class SaveDeleteRefDialog extends CaveJFACEDialog {
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus.getHandler(SaveDeleteRefDialog.class);
|
||||
private static final Pattern pythonVariable = Pattern
|
||||
.compile("\\p{Alpha}\\w*");
|
||||
private final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(SaveDeleteRefDialog.class);
|
||||
|
||||
private static final int NUM_ITEMS = 10;
|
||||
private final Pattern pythonVariable = Pattern.compile("\\p{Alpha}\\w*");
|
||||
|
||||
private final int NUM_ITEMS = 10;
|
||||
|
||||
private IReferenceSetManager refSetMgr;
|
||||
|
||||
|
@ -156,9 +156,9 @@ public class SaveDeleteRefDialog extends CaveJFACEDialog {
|
|||
editAreaList = new org.eclipse.swt.widgets.List(areaFrame, SWT.BORDER
|
||||
| SWT.V_SCROLL | SWT.SINGLE);
|
||||
|
||||
Rectangle rect = editAreaList.computeTrim(0, 0, this
|
||||
.convertWidthInCharsToPixels(24), editAreaList.getItemHeight()
|
||||
* NUM_ITEMS);
|
||||
Rectangle rect = editAreaList.computeTrim(0, 0,
|
||||
this.convertWidthInCharsToPixels(24),
|
||||
editAreaList.getItemHeight() * NUM_ITEMS);
|
||||
layoutData = new GridData(GridData.FILL_BOTH);
|
||||
layoutData.minimumWidth = rect.width;
|
||||
layoutData.heightHint = rect.height;
|
||||
|
@ -207,10 +207,9 @@ public class SaveDeleteRefDialog extends CaveJFACEDialog {
|
|||
|
||||
groupListBox = new ToggleSelectList(groupFrame, SWT.BORDER
|
||||
| SWT.V_SCROLL | SWT.MULTI);
|
||||
rect = groupListBox.computeTrim(0, 0, this
|
||||
.convertWidthInCharsToPixels(24), groupListBox
|
||||
.getItemHeight()
|
||||
* NUM_ITEMS);
|
||||
rect = groupListBox.computeTrim(0, 0,
|
||||
this.convertWidthInCharsToPixels(24),
|
||||
groupListBox.getItemHeight() * NUM_ITEMS);
|
||||
layoutData = new GridData(GridData.FILL_BOTH);
|
||||
layoutData.minimumWidth = rect.width;
|
||||
layoutData.heightHint = rect.height;
|
||||
|
@ -282,8 +281,8 @@ public class SaveDeleteRefDialog extends CaveJFACEDialog {
|
|||
// Check that name is a legal Python variable so
|
||||
// it can be used subsequently in queries
|
||||
if (!pythonVariable.matcher(name).matches()) {
|
||||
statusHandler.handle(
|
||||
Priority.SIGNIFICANT,
|
||||
statusHandler
|
||||
.handle(Priority.SIGNIFICANT,
|
||||
"Illegal Name: Must begin with a letter and be alphanumeric or '_'. Please rename.");
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue