private Action createAction(String name, String id, String description,
Icon smallIcon, Icon bigIcon, int type, final ActionListener listener) {
Action action = new AbstractAction() {
public void actionPerformed(ActionEvent e) {
listener.actionPerformed(new ActionEvent(this, e.getID(), e
.getActionCommand()));
}
};
action.putValue(Action.NAME, name);
action.putValue(Action.SMALL_ICON, smallIcon);