|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.EventObject
uk.co.keang.sudoku.event.SolutionEvent
public class SolutionEvent
A solution event
Nested Class Summary | |
---|---|
static class |
SolutionEvent.DisplayOrder
|
static class |
SolutionEvent.Grouping
|
Field Summary | |
---|---|
protected static java.lang.String[] |
lblTextXAxis
|
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
SolutionEvent(AbstractSolver src,
java.lang.String msg,
Puzzle grid,
java.util.List<java.awt.Point> loc,
Puzzle.Cell removed,
java.util.List<java.awt.Point> from,
SolutionEvent.Grouping g)
A solver event for a changed cell |
Method Summary | |
---|---|
boolean |
canCoalesce(SolutionEvent e)
Returns true if the source and location are the same and if they both have change sets |
SolutionEvent |
clone()
|
void |
coalesce(SolutionEvent e)
Coalesces the given event with this one |
SolutionEvent.DisplayOrder |
displayOrder()
Gets the display order for event replay. |
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getDescription()
|
SolutionEvent.Grouping |
getGrouping()
|
java.util.List<java.awt.Point> |
getLocations()
Gets the locations of the cells being modified or resolved |
Puzzle |
getPuzzle()
The grid after any changes have been applied |
java.util.List<java.awt.Point> |
getReferencedLocations()
Gets the location of the squares that were used to create the change |
Puzzle.Cell |
getReferencedValues()
The values which are to be highlighted in the referenced locations. |
Puzzle.Cell |
getRemovedValues()
The values which are to be removed from this cell |
int |
hashCode()
|
boolean |
isResolved()
True if all of the location cells are resolved |
(package private) void |
setDisplayOrder(SolutionEvent.DisplayOrder order)
Sets the display order for the event replay. |
java.lang.String |
toString()
The description of the event |
Methods inherited from class java.util.EventObject |
---|
getSource |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static java.lang.String[] lblTextXAxis
Constructor Detail |
---|
public SolutionEvent(AbstractSolver src, java.lang.String msg, Puzzle grid, java.util.List<java.awt.Point> loc, Puzzle.Cell removed, java.util.List<java.awt.Point> from, SolutionEvent.Grouping g) throws IllegalGridException
src
- the solver that generated the eventmsg
- a descriptive message from the solvergrid
- the grid after the proposed changes are appliedloc
- the locations (0 based) of the cells that has been modifiedremoved
- the values that been removed from this cells possible values listfrom
- a list of locations (0 based) of the cells used to determine which values can be removed
IllegalGridException
Method Detail |
---|
public Puzzle.Cell getRemovedValues()
public Puzzle.Cell getReferencedValues()
public java.util.List<java.awt.Point> getReferencedLocations()
public java.util.List<java.awt.Point> getLocations()
public Puzzle getPuzzle()
public boolean isResolved()
public java.lang.String getDescription()
public SolutionEvent.Grouping getGrouping()
public SolutionEvent clone()
clone
in class java.lang.Object
public boolean canCoalesce(SolutionEvent e)
e
-
public void coalesce(SolutionEvent e)
e
- public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.util.EventObject
void setDisplayOrder(SolutionEvent.DisplayOrder order)
order
- the orderpublic SolutionEvent.DisplayOrder displayOrder()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |