* Remove legacy test code in MainTest
maze:
* Add methods to add/del lines and columns
* Add various calls to matrixDeepCopy, allowing to overwrite only a part
of a matrix
model:
* Better delegation to Maze : let Maze handle column/line
adds/deletions
ui:
* Add buttons to context menu to add/remove lines and columns
* Add buttons to Maze Menu to delete lines and columns
* Fix the spinners, it used to call a new instance of itself, which made
impossible to simple get the values from the spinners
model:
* New methods to directly set boxes type instead of only toggling
(setXBox methods)
* toggleBox now calls setXBox methods
ui:
* Add a context menu, enabled on right click, to directly choose the
type of a box in the maze
* Defer the calculation of the box coordinates in the matrix to two new
methods, getBoxRow and getBoxLine
maze:
* Fix EBox, ABox, DBox and WBox, which still used legacy coordinates
(x for y and y for x). See 213071d3 and #20
model:
* Add a toggle method to MazeAppModel. For a box given by its
coordinates, it toggles its type (Wall, Empty, Departure or
Arrival), sends a notification to observers and sets the maze's
status to 'not saved'.
ui:
* Fix SaveMazeMenuItem, which enabled itself whenever a Maze renewal
notification was received. It now enables itself only if a filename is
set (expected behavior).
* Add a MouseListener to MazeDrawing to catch clicks on boxes. The
selected box is found using the x and y coordinates of where the mouse
clicked.
* Now print a message when the user tries to draw the shortest path
whereas the maze doesn't contain an arrival and/or a departure.
ui:
* Fix repainting when the path is supposed to be drawn. At any
repainting (window resizing, menu unfolding), the maze was repainted
without the shortest path. We now use the attribute stored in the
model to know whether the path should be drawn or not when we repaint
the panel (see #24)
ui:
* Add a WindowListener catching the event of closing the window to ask
the user if the maze must be saved or not (if it's not already saved)
(same behavior as the Quit button) (see #19)
model:
* Deprecate modified from MazeAppModel, which was misused and
misunderstood
* Add saved to MazeAppModel to keep track if a maze (or some
modification) was saved into a file or not
ui:
* Use the new saved attribute to know if the maze was saved or not
* Move the box asking whether to save the maze or not from QuitMenuItem
to SaveBox and call SaveBox from QuitMenuItem
* SaveBox now checks if the maze has a source file or not, if not it
prompts a box to ask where to save the maze
* If the maze was modified, the Load Maze button will pop SaveBox before
erasing the current maze
model:
* Add an attribute to MazeAppModel to keep track of if the path is drawn
or not. For future use to enable/disable the Clear button depending on
if the path is drawn or not
ui:
* Add a "Clear shortest path" button to the Maze menu
* Add a method to clear the path in MazeApp (just trigger a repainting
of the MazeApp, which erase the path, since its not drawn by default)
and update MazeAppModel accordingly
ui:
* Add methods to draw the shortest path from MazeApp, WindowPanel and
MazeDrawing
* Add a Maze menu with a button to draw the shortest path from departure
to arrival
model:
* Add getShortest() to MazeAppModel, which returns the list of vertexes
on the shortest path from departure to arrival
ui:
* Move paintShortestPath from MazeApp to MazeDrawing
* Fix a bug in paintShortestPath where a switch between width and height
caused ellipses to be mislocated (probably still the same confusion
between the x and y axes)
model:
* Add a filename attribute to MazeAppModel to keep track of the file
currently being used by the app
* Add saveToFile(filename) to save the maze into a specific file
* Rewrite saveToFile() to use the stored filename attribute to know into
which file is to be used to save the maze, instead of the
hardcoded path
* Remove unused models
* MazeAppModel is now initialized with an empty maze, instead of a
maze read from a hardcoded path (see #13)
* Add a MazeAppModelMessage class to pass proper messages to observers
* Replace setMaze(maze) by loadMaze(filename) for now
* Move paintMaze into ui/MazeApp
ui:
* Add a Save As button (just a new name for the previous Save button)
and implement an actual Save button (which saves into the file
currently being used), disabled when no file is currently in use.
(see #16)
* Create the FileBox class to handle file choices for the load, save,
save as buttons
* Add keystrokes to trigger Load, Save or Save As actions from the menu
maze:
* Add a method to Maze to perform a deep copy of a matrix of boxes
* Add a static method to generate an empty maze of a fixed size (10*10)
This behavior might change in the future
* Add a constructor to make a Maze from a matrix of boxes