@Test public void testActionPerformed() { MemoryMeter.getInstance().setVisible(false); meter.actionPerformed(null); assertTrue(MemoryMeter.getInstance().isVisible()); meter.actionPerformed(null); assertFalse(MemoryMeter.getInstance().isVisible()); }
@Override public void actionPerformed(ActionEvent e) { MemoryMeter meter = MemoryMeter.getInstance(); meter.setVisible(!meter.isVisible()); putValue(Action.SELECTED_KEY, meter.isVisible()); }
MemoryMeterAction extends ContextAwareAction { @Override public void actionPerformed(ActionEvent e) { MemoryMeter meter = MemoryMeter.getInstance(); meter.setVisible(!meter.isVisible()); putValue(Action.SELECTED_KEY, meter.isVisible()); } }
MemoryMeterAction extends ContextAwareAction { @Override public void actionPerformed(ActionEvent e) { MemoryMeter meter = MemoryMeter.getInstance(); meter.setVisible(!meter.isVisible()); putValue(Action.SELECTED_KEY, meter.isVisible()); } MemoryMeterAction(); }
MemoryMeterAction extends ContextAwareAction { @Override public void actionPerformed(ActionEvent e) { MemoryMeter meter = MemoryMeter.getInstance(); meter.setVisible(!meter.isVisible()); putValue(Action.SELECTED_KEY, meter.isVisible()); } MemoryMeterAction(); @Override boolean isEnabled(); @Override void actionPerformed(ActionEvent e); @Override boolean canHandle(ActionContext context); }
MemoryMeterAction extends ContextAwareAction { @Override public void actionPerformed(ActionEvent e) { MemoryMeter meter = MemoryMeter.getInstance(); meter.setVisible(!meter.isVisible()); putValue(Action.SELECTED_KEY, meter.isVisible()); } MemoryMeterAction(); @Override boolean isEnabled(); @Override void actionPerformed(ActionEvent e); @Override boolean canHandle(ActionContext context);  }