/* For License see bottom */
package jpianotrain.gui.action;
import static jpianotrain.util.ResourceKeys.ACTION_CHORD_SCALE_NAME;
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import javax.swing.JDialog;
import jpianotrain.ApplicationContext;
import jpianotrain.gui.ChordScalePane;
import jpianotrain.util.ResourceFactory;
/**
*
* @author onkobu
* @since 0.0.3
*/
public class ChordScaleAction extends AbstractAction {
public ChordScaleAction() {
super(ACTION_CHORD_SCALE_NAME);
}
@Override
public void actionPerformed(ActionEvent e) {
if (dlg==null) {
dlg=new JDialog(ApplicationContext.getInstance().getDefaultDialogOwner(),
ResourceFactory.getString(ACTION_CHORD_SCALE_NAME),
false);
dlg.setLayout(new BorderLayout());
dlg.add(new ChordScalePane(), BorderLayout.CENTER);
dlg.pack();
}
if (dlg.isVisible()) {
dlg.toFront();
} else {
dlg.setVisible(true);
}
}
private JDialog dlg;
}
/*
Copyright (C) 2008 Alexander Methke
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program (gplv3.txt).
*/