예제 #1
0
파일: GenXml.java 프로젝트: abel533/EasyXls
 private void next1() {
   // 显示xml基本信息
   card.next(pane);
   nextBtn.setEnabled(false);
   doneBtn.setEnabled(true);
   step++;
 }
예제 #2
0
 public void changePanel() {
   card.next(mainPanel);
   buttonPanel.removeAll();
   ctl.setText("- Play -");
   buttonPanel.add(ctl);
   buttonPanel.add(rank);
   buttonPanel.add(exit);
   buttonPanel.setOpaque(false);
   buttonPanel.setBounds(width / 2 - 50, height / 2 - 50, 80, 100);
   count++;
   memory[count] = new Memory();
   menuPanel.setMemory(memory[count]);
   secondPanel.setMemory(memory[count]);
   gamePanel.setMemory(memory[count]);
   rankPanel.setMemory(memory, count);
   check = 0;
   System.out.println(
       count
           + " "
           + memory[count - 1].name
           + " "
           + memory[count - 1].song
           + " "
           + memory[count - 1].score);
 }
예제 #3
0
  public void menu() {
    if (check == 0) {
      buttonPanel.removeAll();
      buttonPanel.setBounds(width - 200, height - 80, 200, 50);
      card.next(mainPanel);
      ctl.setText("- Play -");
      buttonPanel.add(back);
      buttonPanel.add(ctl);
      menuPanel.savename();
      check = 1;
      secondPanel.musiclist.clearSelection();
      gamePanel.setSecond(0);
    } else if (check == 1) {
      if (memory[count].getSong() == null) {
        Container con = getContentPane();

        String title = "--Warning--";
        String message = "Please Choice a Music Before Playing!";
        int type = JOptionPane.WARNING_MESSAGE;

        JOptionPane.showMessageDialog(con, message, title, type);
      } else {
        card.next(mainPanel);
        secondPanel.clip.stop();
        buttonPanel.removeAll();
        buttonPanel.setBounds(width - 200, height - 80, 190, 50);
        ctl.setText("- Stop -");
        buttonPanel.add(ctl);
        buttonPanel.add(exit);
        check = 2;
        gamePanel.playmusic();
        gamePanel.setRun(true);
      }
    } else if (check == 2) {
      ctl.setText("- Resume -");
      gamePanel.clip.stop();
      gamePanel.setRun(false);
      check = 3;
    } else if (check == 3) {
      ctl.setText("- Stop -");
      gamePanel.clip.start();
      gamePanel.setRun(true);
      check = 2;
    }
  }
예제 #4
0
 public void exitPerform() {
   if (check == 4) {
     this.changePanel();
   } else if (check == 0) {
     this.dispose();
   } else {
     card.next(mainPanel);
     rankPanel.updateUI();
     buttonPanel.removeAll();
     buttonPanel.add(exit);
     gamePanel.clip.stop();
     gamePanel.setRun(false);
     check = 4;
   }
 }
예제 #5
0
파일: GenXml.java 프로젝트: abel533/EasyXls
 private void next0() {
   prevBtn.setEnabled(true);
   String clasz = classPath.getText();
   String xmlPath = filePath.getText();
   if (!clasz.equals("") && !xmlPath.equals("")) {
     try {
       Class.forName(clasz).newInstance();
       card.next(pane);
       prevBtn.setEnabled(true);
       if (!hasRead || !this.clasz.equals(clasz)) {
         ReadInTable(clasz);
       }
       step++;
     } catch (Exception e) {
       JOptionPane.showMessageDialog(GenXml.this, "类路径不存在,请重新输入!");
     }
   } else {
     JOptionPane.showMessageDialog(GenXml.this, "请输入路径!");
   }
 }