List of usage examples for javax.swing JCheckBoxMenuItem setName
public void setName(String name)
From source file:org.esa.beam.visat.toolviews.stat.MaskSelectionToolSupport.java
public JCheckBoxMenuItem createMaskSelectionModeMenuItem() { final JCheckBoxMenuItem menuItem = new JCheckBoxMenuItem(String.format("Select Mask '%s'", maskName)); menuItem.setName("maskSelectionMode"); menuItem.addActionListener(new ActionListener() { @Override//from ww w . ja va2 s .c o m public void actionPerformed(ActionEvent e) { if (menuItem.isSelected()) { if (plotAreaSelectionTool == null) { plotAreaSelectionTool = new PlotAreaSelectionTool(chartPanel, MaskSelectionToolSupport.this); plotAreaSelectionTool.setAreaType(areaType); plotAreaSelectionTool.setFillPaint(createAlphaColor(maskColor, 50)); } plotAreaSelectionTool.install(); } else { if (plotAreaSelectionTool != null) { plotAreaSelectionTool.uninstall(); } } } }); return menuItem; }