Examples of MazeInfoModel


Examples of maze.model.MazeInfoModel

      String result;
      dialog = new NewMazeDialog(Main.getPrimaryFrameInstance());
      if ( (result = dialog.showDialog()) == null)
         return;

      MazeInfoModel mim = Main.getPrimaryFrameInstance().getMazeInfoModel();

      if (result.equals(NewMazeDialog.MAZ))
      {
         MazeInfo newMi = mim.createNew("New Maze " + mLastNew, false);
         if (newMi == null)
         {
            JOptionPane.showMessageDialog(MazeEditorPage.this,
                                          "Unable to create new maze",
                                          "Maze Creation Error",
                                          JOptionPane.OK_OPTION);
            return;
         }
         mLastNew++;
      }
      else if (result.equals(NewMazeDialog.MZ2))
      {
         MazeInfo newMi = mim.createNew(dialog.getText(), true);
         if (newMi == null)
         {
            JOptionPane.showMessageDialog(MazeEditorPage.this,
                                          "Unable to create new maze",
                                          "Maze Creation Error",
View Full Code Here

Examples of maze.model.MazeInfoModel

                                          JOptionPane.INFORMATION_MESSAGE);
            return;
         }
         if (mi.isDirty())
            saveCurrent();
         MazeInfoModel mim = Main.getPrimaryFrameInstance().getMazeInfoModel();
         JList list = mOpenMazes.getList();
         list.setSelectedIndex(list.getSelectedIndex() - 1);
         mim.close(mi);
      }
   }
View Full Code Here

Examples of maze.model.MazeInfoModel

    * @param file The maze file to open. Should be a recognized format.
    */
   @Override
   public void open(File file)
   {
      MazeInfoModel mim = Main.getPrimaryFrameInstance().getMazeInfoModel();
      if (!mim.addMaze(file))
         JOptionPane.showMessageDialog(this, "<html>Unable to load " +
                                             "<br />" +
                                             file.getAbsolutePath() +
                                             "</html", "Maze Open Error", JOptionPane.ERROR_MESSAGE);

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.