public class MooDialog extends JDialog {
private JLabel labelA, labelB, labelC, labelD, labelE, labelF, labelG, labelH;
public class MooDialog extends JDialog {
private JLabel labelA, labelB, labelC, labelD, labelE, labelF, labelG, labelH;
- private JTextField textFieldA, textFieldB, textFieldC, textFieldD, textFieldE, textFieldF,
- textFieldG, textFieldH, textFieldI, textFieldJ, textFieldK;
+ private JTextField textFieldA, textFieldB, textFieldC, textFieldD, textFieldE,
+ textFieldF, textFieldG, textFieldH, textFieldI, textFieldJ,
+ textFieldK;
private JComboBox trackListA, trackListB;
private JButton okButton, cancelButton;
public static final int ADD_TRACK = 1,
private JComboBox trackListA, trackListB;
private JButton okButton, cancelButton;
public static final int ADD_TRACK = 1,
* @param tracks A array containing miditracks.
*/
private void makeAddDialog(Container pane, Track[] tracks) {
* @param tracks A array containing miditracks.
*/
private void makeAddDialog(Container pane, Track[] tracks) {
textFieldA = new JTextField();
pane.add(textFieldA);
labelB = new JLabel("Add after", JLabel.CENTER);
pane.add(labelB);
textFieldA = new JTextField();
pane.add(textFieldA);
labelB = new JLabel("Add after", JLabel.CENTER);
pane.add(labelB);
trackListA = new JComboBox();
for (int i = 1; i <= tracks.length; i++) trackListA.addItem("Track " + i);
pane.add(trackListA);
trackListA = new JComboBox();
for (int i = 1; i <= tracks.length; i++) trackListA.addItem("Track " + i);
pane.add(trackListA);
labelA.setBounds(50, 10, 100, 20);
textFieldA.setBounds(40, 35, 120, 20);
labelB.setBounds(50, 70, 100, 20);
trackListA.setBounds(40, 95, 120, 20);
cancelButton.setBounds(10, 150, 80, 30);
okButton.setBounds(120, 150, 60, 30);
labelA.setBounds(50, 10, 100, 20);
textFieldA.setBounds(40, 35, 120, 20);
labelB.setBounds(50, 70, 100, 20);
trackListA.setBounds(40, 95, 120, 20);
cancelButton.setBounds(10, 150, 80, 30);
okButton.setBounds(120, 150, 60, 30);
* @param tracks A array containing miditracks.
*/
private void makeDelDialog(Container pane, Track[] tracks) {
* @param tracks A array containing miditracks.
*/
private void makeDelDialog(Container pane, Track[] tracks) {
trackListA = new JComboBox();
for (int i = 1; i <= tracks.length; i++) trackListA.addItem("Track " + i);
pane.add(trackListA);
trackListA = new JComboBox();
for (int i = 1; i <= tracks.length; i++) trackListA.addItem("Track " + i);
pane.add(trackListA);
labelB.setBounds(50, 10, 100, 20);
trackListA.setBounds(40, 35, 120, 20);
cancelButton.setBounds(10, 90, 80, 30);
okButton.setBounds(120, 90, 60, 30);
labelB.setBounds(50, 10, 100, 20);
trackListA.setBounds(40, 35, 120, 20);
cancelButton.setBounds(10, 90, 80, 30);
okButton.setBounds(120, 90, 60, 30);
* @param tracks A array containing miditracks.
*/
private void makeCopyDialog(Container pane, Track[] tracks) {
* @param tracks A array containing miditracks.
*/
private void makeCopyDialog(Container pane, Track[] tracks) {
trackListA = new JComboBox();
for (int i = 1; i <= tracks.length; i++) trackListA.addItem("Track " + i);
pane.add(trackListA);
labelB = new JLabel("Insert after", JLabel.CENTER);
pane.add(labelB);
trackListA = new JComboBox();
for (int i = 1; i <= tracks.length; i++) trackListA.addItem("Track " + i);
pane.add(trackListA);
labelB = new JLabel("Insert after", JLabel.CENTER);
pane.add(labelB);
trackListB = new JComboBox();
for (int i = 1; i <= tracks.length; i++) trackListB.addItem("Track " + i);
pane.add(trackListB);
trackListB = new JComboBox();
for (int i = 1; i <= tracks.length; i++) trackListB.addItem("Track " + i);
pane.add(trackListB);
labelA.setBounds(50, 10, 100, 20);
trackListA.setBounds(40, 35, 120, 20);
labelB.setBounds(50, 70, 100, 20);
trackListB.setBounds(40, 95, 120, 20);
cancelButton.setBounds(10, 150, 80, 30);
okButton.setBounds(120, 150, 60, 30);
labelA.setBounds(50, 10, 100, 20);
trackListA.setBounds(40, 35, 120, 20);
labelB.setBounds(50, 70, 100, 20);
trackListB.setBounds(40, 95, 120, 20);
cancelButton.setBounds(10, 150, 80, 30);
okButton.setBounds(120, 150, 60, 30);
* @param tracks A array containing miditracks.
*/
private void makeMoveDialog(Container pane, Track[] tracks) {
* @param tracks A array containing miditracks.
*/
private void makeMoveDialog(Container pane, Track[] tracks) {
trackListA = new JComboBox();
for (int i = 1; i <= tracks.length; i++) trackListA.addItem("Track " + i);
pane.add(trackListA);
labelB = new JLabel("Insert after", JLabel.CENTER);
pane.add(labelB);
trackListA = new JComboBox();
for (int i = 1; i <= tracks.length; i++) trackListA.addItem("Track " + i);
pane.add(trackListA);
labelB = new JLabel("Insert after", JLabel.CENTER);
pane.add(labelB);
trackListB = new JComboBox();
for (int i = 1; i <= tracks.length; i++) trackListB.addItem("Track " + i);
pane.add(trackListB);
trackListB = new JComboBox();
for (int i = 1; i <= tracks.length; i++) trackListB.addItem("Track " + i);
pane.add(trackListB);
labelA.setBounds(40, 10, 120, 20);
trackListA.setBounds(40, 35, 120, 20);
labelB.setBounds(50, 70, 100, 20);
trackListB.setBounds(40, 95, 120, 20);
cancelButton.setBounds(10, 150, 80, 30);
okButton.setBounds(120, 150, 60, 30);
labelA.setBounds(40, 10, 120, 20);
trackListA.setBounds(40, 35, 120, 20);
labelB.setBounds(50, 70, 100, 20);
trackListB.setBounds(40, 95, 120, 20);
cancelButton.setBounds(10, 150, 80, 30);
okButton.setBounds(120, 150, 60, 30);
labelA = new JLabel("Measure", JLabel.CENTER);
pane.add(labelA);
labelB = new JLabel("Beat", JLabel.CENTER);
labelA = new JLabel("Measure", JLabel.CENTER);
pane.add(labelA);
labelB = new JLabel("Beat", JLabel.CENTER);
labelA.setBounds(40, 25, 50, 20);
labelB.setBounds(105, 25, 50, 20);
labelC.setBounds(170, 25, 50, 20);
labelA.setBounds(40, 25, 50, 20);
labelB.setBounds(105, 25, 50, 20);
labelC.setBounds(170, 25, 50, 20);
textFieldC.setBounds(170, 45, 50, 20);
cancelButton.setBounds(35, 90, 80, 30);
okButton.setBounds(155, 90, 60, 30);
textFieldC.setBounds(170, 45, 50, 20);
cancelButton.setBounds(35, 90, 80, 30);
okButton.setBounds(155, 90, 60, 30);
* @param pane The container to put the dialog in.
*/
private void makeInsertMeasureDialog(Container pane){
* @param pane The container to put the dialog in.
*/
private void makeInsertMeasureDialog(Container pane){
labelA = new JLabel("Insert at:", JLabel.RIGHT);
pane.add(labelA);
labelB = new JLabel("Measure count:", JLabel.RIGHT);
labelA = new JLabel("Insert at:", JLabel.RIGHT);
pane.add(labelA);
labelB = new JLabel("Measure count:", JLabel.RIGHT);
labelA.setBounds(20, 20, 110 ,20);
labelB.setBounds(20, 50, 110, 20);
textFieldA.setBounds(140 ,20 , 40, 20);
textFieldB.setBounds(140,50, 40, 20);
cancelButton.setBounds(20 ,95 , 80, 30);
okButton.setBounds(120, 95, 60, 30);
labelA.setBounds(20, 20, 110 ,20);
labelB.setBounds(20, 50, 110, 20);
textFieldA.setBounds(140 ,20 , 40, 20);
textFieldB.setBounds(140,50, 40, 20);
cancelButton.setBounds(20 ,95 , 80, 30);
okButton.setBounds(120, 95, 60, 30);
* @param pane The container to put the dialog in.
*/
private void makeDeleteMeasureDialog(Container pane) {
* @param pane The container to put the dialog in.
*/
private void makeDeleteMeasureDialog(Container pane) {
labelA = new JLabel("Delete at:", JLabel.RIGHT);
pane.add(labelA);
labelB = new JLabel("Measure count:", JLabel.RIGHT);
labelA = new JLabel("Delete at:", JLabel.RIGHT);
pane.add(labelA);
labelB = new JLabel("Measure count:", JLabel.RIGHT);
labelA.setBounds(20, 20, 110 ,20);
labelB.setBounds(20, 50, 110, 20);
textFieldA.setBounds(140 ,20 , 40, 20);
textFieldB.setBounds(140,50, 40, 20);
cancelButton.setBounds(20 ,95 , 80, 30);
okButton.setBounds(120, 95, 60, 30);
labelA.setBounds(20, 20, 110 ,20);
labelB.setBounds(20, 50, 110, 20);
textFieldA.setBounds(140 ,20 , 40, 20);
textFieldB.setBounds(140,50, 40, 20);
cancelButton.setBounds(20 ,95 , 80, 30);
okButton.setBounds(120, 95, 60, 30);
// create contents of dialog and add to container
// track edit-intervall labels
labelA = new JLabel("Measure", JLabel.CENTER);
// create contents of dialog and add to container
// track edit-intervall labels
labelA = new JLabel("Measure", JLabel.CENTER);
// set bounds of ok and cancelbutton
cancelButton.setBounds(75, 215, 80, 30);
okButton.setBounds(195, 215, 60, 30);
// set bounds of ok and cancelbutton
cancelButton.setBounds(75, 215, 80, 30);
okButton.setBounds(195, 215, 60, 30);
* @param tracks A array containing miditracks.
*/
private void makeTransposeDialog(Container pane, Track[] tracks) {
* @param tracks A array containing miditracks.
*/
private void makeTransposeDialog(Container pane, Track[] tracks) {
// set bounds of ok and cancelbutton
cancelButton.setBounds(75, 215, 80, 30);
okButton.setBounds(195, 215, 60, 30);
// set bounds of ok and cancelbutton
cancelButton.setBounds(75, 215, 80, 30);
okButton.setBounds(195, 215, 60, 30);
* @param tracks A array containing miditracks.
*/
private void makeScaleVelocityDialog(Container pane, Track[] tracks) {
* @param tracks A array containing miditracks.
*/
private void makeScaleVelocityDialog(Container pane, Track[] tracks) {
// create contents of dialog and add to container
// track edit-intervall labels
labelA = new JLabel("Measure", JLabel.CENTER);
// create contents of dialog and add to container
// track edit-intervall labels
labelA = new JLabel("Measure", JLabel.CENTER);
// set bounds of ok and cancelbutton
cancelButton.setBounds(75, 265, 80, 30);
okButton.setBounds(195, 265, 60, 30);
// set bounds of ok and cancelbutton
cancelButton.setBounds(75, 265, 80, 30);
okButton.setBounds(195, 265, 60, 30);
private void makeTextDialog(Container pane, String filename) {
setTitle("User Manual");
pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS));
private void makeTextDialog(Container pane, String filename) {
setTitle("User Manual");
pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS));