Esempio n. 1
0
 /**
  * Makes a line drawing of the maze
  *
  * @param arr array with an integer representation of the maze.
  */
 public void drawMaze(Maze2D mz, boolean b) {
   imagePanel.makeLineDrawing(mz, b);
   imagePanel.getPreferredSize();
   setMinimumSize(imagePanel.getPreferredSize());
   imagePanel.repaint();
   pack();
 }
Esempio n. 2
0
 /**
  * Displays the string representation of the maze.
  *
  * @param mz String representing the maze.
  */
 public void displayMaze(String mz) {
   SimpleAttributeSet attr = new SimpleAttributeSet();
   StyleConstants.setLineSpacing(attr, -0.3f);
   mazeOutLabel.setParagraphAttributes(attr, false);
   mazeOutLabel.setText(mz);
   imagePanel.add(mazeOutLabel);
   pack();
 }
Esempio n. 3
0
 public void saveImage(File f) {
   // SaveImage
   driver.saveImage(imagePanel.getImage(), f);
 }