List of usage examples for javax.swing JCheckBoxMenuItem getActionCommand
public String getActionCommand()
From source file:de.tud.kom.p2psim.impl.skynet.visualization.SkyNetVisualization.java
private void displayAllMetricsOfAGroup(JMenu menu) { JCheckBoxMenuItem item = null; String name = null;/*from ww w . ja v a 2s .c o m*/ for (int i = 0; i < menu.getMenuComponentCount(); i++) { if (menu.getMenuComponent(i) instanceof JCheckBoxMenuItem) { item = (JCheckBoxMenuItem) menu.getMenuComponent(i); name = item.getActionCommand(); if (!item.isSelected()) { item.setSelected(true); createPlotInWindow(name); } } } }
From source file:de.tud.kom.p2psim.impl.skynet.visualization.SkyNetVisualization.java
private void removeAllMetricsOfAGroup(JMenu menu) { JCheckBoxMenuItem item = null; String name = null;/*from w w w .j ava 2s . c o m*/ for (int i = 0; i < menu.getMenuComponentCount(); i++) { if (menu.getMenuComponent(i) instanceof JCheckBoxMenuItem) { item = (JCheckBoxMenuItem) menu.getMenuComponent(i); name = item.getActionCommand(); if (item.isSelected()) { item.setSelected(false); deletePlotInWindow(name); } } } }