Issue #1234 PointsMgrDialog now adds new nodes when no node selected and VolumeBrowserDlg accounts for having no points.
Change-Id: Ida0439f71f0aed57e18f0fc043f6ac5503fa11d1 Former-commit-id:01d49de150
[formerlyd688c3793e
] [formerlyc9674e872d
[formerly f70c63c1ece76df9f94fdfcee3e373b5ae4cea3c]] Former-commit-id:c9674e872d
Former-commit-id:370e6956fc
This commit is contained in:
parent
3f4f732492
commit
694f955395
2 changed files with 31 additions and 10 deletions
|
@ -89,6 +89,9 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* October-2010 epolster Initial Creation.
|
* October-2010 epolster Initial Creation.
|
||||||
* Jul 31, 2012 #875 rferrel Integrated into CAVE.
|
* Jul 31, 2012 #875 rferrel Integrated into CAVE.
|
||||||
|
* Oct 2, 2012 #1234 rferrel Clicking on new group/point when no
|
||||||
|
* node selected will now add the new
|
||||||
|
* to the root node.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -277,7 +280,7 @@ public class PointsMgrDialog extends CaveJFACEDialog implements
|
||||||
createPoint();
|
createPoint();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
createPointAction.setText("New Point");
|
createPointAction.setText("New Point...");
|
||||||
|
|
||||||
editNodeAction = new Action() {
|
editNodeAction = new Action() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -285,7 +288,7 @@ public class PointsMgrDialog extends CaveJFACEDialog implements
|
||||||
editNode();
|
editNode();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
editNodeAction.setText("Edit");
|
editNodeAction.setText("Edit...");
|
||||||
|
|
||||||
deleteNodeAction = new Action() {
|
deleteNodeAction = new Action() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -371,7 +374,7 @@ public class PointsMgrDialog extends CaveJFACEDialog implements
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
newButton = createButton(parent, NEW_POINT_ID, "New Point", false);
|
newButton = createButton(parent, NEW_POINT_ID, "New Point...", false);
|
||||||
newButton.addSelectionListener(new SelectionAdapter() {
|
newButton.addSelectionListener(new SelectionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
|
@ -379,7 +382,7 @@ public class PointsMgrDialog extends CaveJFACEDialog implements
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
editButton = createButton(parent, EDIT_POINT_ID, "Edit", false);
|
editButton = createButton(parent, EDIT_POINT_ID, "Edit...", false);
|
||||||
editButton.addSelectionListener(new SelectionAdapter() {
|
editButton.addSelectionListener(new SelectionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
|
@ -407,13 +410,15 @@ public class PointsMgrDialog extends CaveJFACEDialog implements
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createGroup() {
|
private void createGroup() {
|
||||||
|
IPointNode parentNode = null;
|
||||||
|
|
||||||
selectedNode = getSelectedPoint();
|
selectedNode = getSelectedPoint();
|
||||||
if (selectedNode == null) {
|
if (selectedNode == null) {
|
||||||
return;
|
parentNode = dataManager.getPoint("");
|
||||||
|
} else {
|
||||||
|
parentNode = dataManager.getParent(selectedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
IPointNode parentNode = dataManager.getParent(selectedNode);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
setCursorBusy(true);
|
setCursorBusy(true);
|
||||||
editSelectedNode = true;
|
editSelectedNode = true;
|
||||||
|
@ -429,6 +434,9 @@ public class PointsMgrDialog extends CaveJFACEDialog implements
|
||||||
|
|
||||||
private void createPoint() {
|
private void createPoint() {
|
||||||
Point point = getSelectedPoint();
|
Point point = getSelectedPoint();
|
||||||
|
if (point == null) {
|
||||||
|
point = dataManager.getPoint("");
|
||||||
|
}
|
||||||
if (point != null) {
|
if (point != null) {
|
||||||
ICloseCallback cb = new ICloseCallback() {
|
ICloseCallback cb = new ICloseCallback() {
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,9 @@ import org.eclipse.ui.IWorkbenchWindow;
|
||||||
import org.eclipse.ui.PlatformUI;
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.eclipse.ui.commands.ICommandService;
|
import org.eclipse.ui.commands.ICommandService;
|
||||||
|
|
||||||
|
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.uf.viz.core.VizApp;
|
import com.raytheon.uf.viz.core.VizApp;
|
||||||
import com.raytheon.uf.viz.core.VizConstants;
|
import com.raytheon.uf.viz.core.VizConstants;
|
||||||
import com.raytheon.uf.viz.core.globals.IGlobalChangedListener;
|
import com.raytheon.uf.viz.core.globals.IGlobalChangedListener;
|
||||||
|
@ -72,6 +75,8 @@ import com.raytheon.viz.volumebrowser.vbui.VBMenuBarItemsMgr.ViewMenu;
|
||||||
* Jul 21, 2012 #875 rferrel Now uses points.
|
* Jul 21, 2012 #875 rferrel Now uses points.
|
||||||
* Sep 26, 2012 #1216 rferrel Point Change listener added to update
|
* Sep 26, 2012 #1216 rferrel Point Change listener added to update
|
||||||
* the Time Series Point menu.
|
* the Time Series Point menu.
|
||||||
|
* Oct 2, 2012 #1234 rferrel Time series Point menu accounts for
|
||||||
|
* having no points.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -81,6 +86,9 @@ import com.raytheon.viz.volumebrowser.vbui.VBMenuBarItemsMgr.ViewMenu;
|
||||||
public class VolumeBrowserDlg extends CaveSWTDialog implements
|
public class VolumeBrowserDlg extends CaveSWTDialog implements
|
||||||
IGlobalChangedListener {
|
IGlobalChangedListener {
|
||||||
|
|
||||||
|
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||||
|
.getHandler(VolumeBrowserDlg.class);
|
||||||
|
|
||||||
private VolumeBrowserDialogSettings dialogSettings;
|
private VolumeBrowserDialogSettings dialogSettings;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -839,10 +847,15 @@ public class VolumeBrowserDlg extends CaveSWTDialog implements
|
||||||
Menu pntsMenu = new Menu(menuBar);
|
Menu pntsMenu = new Menu(menuBar);
|
||||||
pointsMI.setMenu(pntsMenu);
|
pointsMI.setMenu(pntsMenu);
|
||||||
IPointNode firstPoint = populatePointsMenu(pntsMenu, null);
|
IPointNode firstPoint = populatePointsMenu(pntsMenu, null);
|
||||||
pointsMI.setText("Point " + firstPoint.getName());
|
if (firstPoint == null) {
|
||||||
pointsMI.setData(firstPoint);
|
statusHandler.handle(Priority.WARN, "No Points available.");
|
||||||
|
pointsMI.setText("NO POINTS");
|
||||||
|
} else {
|
||||||
|
pointsMI.setText("Point " + firstPoint.getName());
|
||||||
|
pointsMI.setData(firstPoint);
|
||||||
|
|
||||||
dialogSettings.setPointsSelection((Point) pointsMI.getData());
|
dialogSettings.setPointsSelection((Point) pointsMI.getData());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue