Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
d74b38c9dThis file is pinned to the selected release. Download the original to open it in your design tool.
package com.marginallyclever.makelangelo.actions;
import com.marginallyclever.makelangelo.Translator;
import javax.swing.*;
/**
* An AbstractAction that has a name (for display and translation purposes). the name is also used for storing
* menu shortcut in the config file.
*/
public abstract class NamedAbstractAction extends AbstractAction {
private String name;
public NamedAbstractAction(String name) {
super(name == null ? "" : Translator.get(name));
this.name = name;
}
public NamedAbstractAction(String name, Icon icon) {
super(Translator.get(name), icon);
this.name = name;
}
public String getName() {
return name;
}
}