lp:jsudoku
- Get this branch:
- bzr branch lp:jsudoku
Branch information
Recent revisions
- 42. By Christopher D. Leary
-
- Added a clearEditable capability and renamed the "clear" capability to
clearAll for more meaningful differentiation.
- Made the BoardPanel an iterable of CellPanels. I'm reluctant to make the
Board2D an iterable of Cells, however, since the interface necessitates that
the iteration be public and I don't want to expose the Cell's mutable
functionality to the outside world.
- Broke the "Puzzle" JMenu into "Solve" and "Clear" JMenus, which is
tentatively much more clear. - 41. By Christopher D. Leary
-
Created a CenteredGridLayout to fix the inability of the GridLayout to
distribute extraneous space over the insets evenly -- it currently only allows
left or right alignment of extra space. - 40. By Christopher D. Leary
-
Switched from GridLayout to GridBagLayout, since GridLayout is too crippled
to specify how to distribute elements. Unfortunately, no indicators of this
problem existed in the API. - 38. By Christopher D. Leary
-
Major:
- Added a utilities class to hold annoying helper functions.
- Added an event-driven submission system for the UI editor.
- Added appropriate "no solution found" handling.
- Added a path for a "clear" request to make its way to the model from the UI.
- Implemented the thicker cell borders on intervals of sqrt(columns) in the
UI.
- UI notifies the Controller of changes via the editor.
- UI cells revert back to text display from editor on cell unfocus.Minor:
- Got rid of some inappropriate Model-View coupling that I must've added in on
very little sleep :P
- Created a Pair (2-tuple) class for returning multiple results from a
function.
- Removed some now-defunct interface files.TODO:
- Appropriate "cannot give a hint" handling. - 37. By Christopher D. Leary
-
- Switched from a solver interface to an AbstractSolver ABC, since isValid and
isComplete are not specific to any given solver implementation. This moved a
large chunk of code from the HumanSolver to the AbstractSolver class.
- Broke out unit tests into two additional test cases: AbstractSolver and
Board2D. Some of the tests have had their semantics changed significantly, as
so have been marked for reworking. - 36. By Christopher D. Leary
-
- Renamed private class in Board2D from SudokuCell to Cell.
- Added a setEditable method to the basic board interface.
- Had the model publish changes to the editable state of cells.
- Renamed private class in the View from SudokuFrameObserver to FrameObserver.
- Made an ABC AbstractFrame for frame classes, which encapsulates publishing
functionality and an interface which must be implemented by subscribers.
- Whether or not a cell is editable causes a font alteration in the UI.TODO:
- Not sure why the BoardPanel isn't automatically being filled by the
GridLayout -- right now it's left-aligned. - 35. By Christopher D. Leary
-
- Lots of restructuring. Made package names lowercase (as seems to be the
standard). Added gui and test subpackages. Renamed files to more sensible,
short names (since we've got this nice package namespacing going on).
- Removed the useless profiling class (leave the optimization for when we have
a relatively stable design.
- Broke out a basic board interface from the more intricate model interface so
that the basic interface can be used for both the UI and the model.
- Experimentally plugged the new board panel into the displayed frame -- this
has some serious problems at this point, presumably with resizing; however,
it seems like it works fairly well in a stand alone environment (a la main in
BoardPanel).TODO:
- Break out standardized immutable cell interface with Iterable capabilities in
the advanced board interface. The cell specification is basically standard
across UI and model, so why not? - 34. By Christopher D. Leary
-
- SudokuCellPanel editing is basically functional. Created a SubmitListener to
listen for JFormattedTextField submissions and complete the editing process.
- Added a public interface for an input verifier to be attached to the editor.
The board can customize the input verifier so that only integers that can be
parsed up to the maximum value will be accepted (on the TODO list :).
- Editor font scales to the same size as the displayed number font. - 33. By Christopher D. Leary
-
- Moved our implementation out of the default package to the JSudoku package,
since Eclipse says things in the default package are evil. I figure it
probably knows more about Java best practices than I do.
- Significant progress on the replacement board GUI implementation. I fought
will JLayeredPane for a while and it won due to its lack of a layout manager;
following that I found the CardLayout which does exactly what I was trying to
get JLayeredPane to do anyway, which greatly simplified things.