Closedown

This commit is contained in:
sfop
2017-03-30 11:52:53 +02:00
parent 3968bd3e0f
commit 542c97720f
2 changed files with 29 additions and 9 deletions

View File

@@ -224,6 +224,15 @@ public class ScreenPanel extends Panel {
}
});
JMenuItem menuShowIdentifiers = new JMenuItem("Show Identifiers...");
menuShowIdentifiers.addActionListener((ActionEvent e) -> {
try {
showIdentifiers();
} catch (Exception ex) {
showException(ex);
}
});
JMenuItem menuSaveStack = new JMenuItem("Save Stack");
menuSaveStack.addActionListener((ActionEvent e) -> {
try {
@@ -280,6 +289,7 @@ public class ScreenPanel extends Panel {
}
});
renderer.getPopupMenu().add(menuShowIdentifiers);
renderer.getPopupMenu().add(menuCalibrate);
renderer.getPopupMenu().add(menuSaveStack);
renderer.getPopupMenu().addSeparator();
@@ -290,6 +300,7 @@ public class ScreenPanel extends Panel {
public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
menuResetROI.setEnabled(camera instanceof Camtool);
menuSetROI.setEnabled(camera instanceof Camtool);
menuShowIdentifiers.setVisible(camera instanceof Camtool);
menuCalibrate.setVisible(camera instanceof Camtool);
menuCalibrate.setEnabled(calibrationOverlays==null);
}
@@ -1669,6 +1680,15 @@ public class ScreenPanel extends Panel {
}
}
void showIdentifiers(){
if (camera instanceof Camtool){
List<String> ids = ((Camtool)camera).getValue().getIdentifiers();
Collections.sort(ids);
String msg = String.join("\n", ids);
SwingUtils.showMessage(getTopLevel(), "Camtool Identifiers", msg);
}
}
////////
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents