|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
com.act365.awt.Container
com.act365.sudoku.GridContainer
The GridContainer class displays a Su Doku grid.
| Field Summary |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
GridContainer(Grid grid)
Creates a new GridContainer instance. |
|
| Method Summary | |
void |
adjustmentValueChanged(java.awt.event.AdjustmentEvent evt)
Reacts to scrollbar presses. |
int |
evaluate()
Evaluates the complexity of the grid. |
java.awt.Dimension |
getBestSize()
Returns the best display size for a GridContainer. |
int |
getBoxesAcross()
Returns number of boxes across one row of the Su Doku grid. |
int |
getBoxesDown()
Returns number of boxes down one column of the Su Doku grid. |
int |
getComplexity()
Returns the number of unwinds used to solve the grid as a measure of its complexity. |
double |
getSolveTime()
Returns the time taken to solve. |
LeastCandidatesHybrid |
getStrategy()
Returns the current strategy. |
void |
paste(java.lang.String s)
Pastes data onto the grid. |
void |
reset()
Resets the grid. |
void |
setBoxes(int boxesAcross,
int boxesDown)
Resizes the drawn grid. |
void |
setGrid(Grid grid)
Sets the underlying grid to be a clone of the given grid. |
void |
setSize(int boxesAcross,
int boxesDown)
Sets the size of the underlying grid. |
void |
shuffle()
Shuffles the grid. |
void |
solve()
Solves the grid. |
void |
startComposer(int filledCells)
Composes a puzzle, with rotational symmetry and a unique solution, based upon the initial values in the grid. |
void |
stopComposer()
Interrupts any ComposerThread that might have been started by startComposer(). |
java.lang.String |
toString()
A GridContainer returns a string representation of the underlying grid. |
void |
unsolve()
Unsolves the grid (reverts its state to that prior to the most recent solve). |
void |
unsolve(int move)
Resets the grid to the partial solution prior to the given move. |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, getAccessibleContext, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setVisible, show, show, size, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public GridContainer(Grid grid)
| Method Detail |
public java.awt.Dimension getBestSize()
public void solve()
public double getSolveTime()
public int evaluate()
public void unsolve()
public void unsolve(int move)
public void reset()
public void shuffle()
public void setGrid(Grid grid)
grid - new grid
public void setSize(int boxesAcross,
int boxesDown)
public void setBoxes(int boxesAcross,
int boxesDown)
boxesAcross - - number of boxes across one row of the Su Doku gridboxesDown - - number of boxes down one column of the Su Doku gridpublic void paste(java.lang.String s)
s - data to be pasted, which should be in the form created by Copypublic void startComposer(int filledCells)
filledCells - - number of filled cells to appear in the puzzlepublic void stopComposer()
public int getBoxesAcross()
public int getBoxesDown()
public int getComplexity()
public LeastCandidatesHybrid getStrategy()
public java.lang.String toString()
public void adjustmentValueChanged(java.awt.event.AdjustmentEvent evt)
adjustmentValueChanged in interface java.awt.event.AdjustmentListener
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||