/** * Invoked when an action occurs. */ public void actionPerformed(ActionEvent e) { // Just delegate action.actionPerformed(e); }
/** * This method is called at the end of a plugin * life cycle, when the plugin needs to be removed * from the system. Plugins should remove any listeners * that they setup and perform other cleanup, so that * the plugin can be garbage collected. */ public void dispose() { action.dispose(); }
public ViewActionAdapter(DisposableAction action) { this.action = action; Object [] keys = action.getKeys(); for (int i = 0; i < keys.length; i++) { putValue((String) keys[i], action.getValue((String) keys[i])); } setEnabled(action.isEnabled()); action.addPropertyChangeListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { if ("enabled".equals(evt.getPropertyName())) { setEnabled((Boolean) evt.getNewValue()); } else { // Pass it on! ViewActionAdapter.this.action.putValue(evt.getPropertyName(), evt.getNewValue()); } } }); }
public void propertyChange(PropertyChangeEvent evt) { if ("enabled".equals(evt.getPropertyName())) { setEnabled((Boolean) evt.getNewValue()); } else { // Pass it on! ViewActionAdapter.this.action.putValue(evt.getPropertyName(), evt.getNewValue()); } } });
public ViewActionAdapter(DisposableAction action) { this.action = action; Object [] keys = action.getKeys(); for (int i = 0; i < keys.length; i++) { putValue((String) keys[i], action.getValue((String) keys[i])); } setEnabled(action.isEnabled()); action.addPropertyChangeListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { if ("enabled".equals(evt.getPropertyName())) { setEnabled((Boolean) evt.getNewValue()); } else { // Pass it on! ViewActionAdapter.this.action.putValue(evt.getPropertyName(), evt.getNewValue()); } } }); }
public void propertyChange(PropertyChangeEvent evt) { if ("enabled".equals(evt.getPropertyName())) { setEnabled((Boolean) evt.getNewValue()); } else { // Pass it on! ViewActionAdapter.this.action.putValue(evt.getPropertyName(), evt.getNewValue()); } } });
public ViewActionAdapter(DisposableAction action) { this.action = action; Object [] keys = action.getKeys(); for (Object key : keys) { putValue((String) key, action.getValue((String) key)); } setEnabled(action.isEnabled()); action.addPropertyChangeListener(evt -> { if ("enabled".equals(evt.getPropertyName())) { setEnabled((Boolean) evt.getNewValue()); } else { // Pass it on! ViewActionAdapter.this.action.putValue(evt.getPropertyName(), evt.getNewValue()); } }); }
/** * Invoked when an action occurs. */ public void actionPerformed(ActionEvent e) { // Just delegate action.actionPerformed(e); }
/** * This method is called at the end of a plugin * life cycle, when the plugin needs to be removed * from the system. Plugins should remove any listeners * that they setup and perform other cleanup, so that * the plugin can be garbage collected. */ public void dispose() { action.dispose(); }
/** * Invoked when an action occurs. */ public void actionPerformed(ActionEvent e) { // Just delegate action.actionPerformed(e); }
/** * This method is called at the end of a plugin * life cycle, when the plugin needs to be removed * from the system. Plugins should remove any listeners * that they setup and perform other cleanup, so that * the plugin can be garbage collected. */ public void dispose() { action.dispose(); }