uk.co.keang.sudoku.event
Class HiddenGroupsEvent

java.lang.Object
  extended by java.util.EventObject
      extended by uk.co.keang.sudoku.event.SolutionEvent
          extended by uk.co.keang.sudoku.event.HiddenGroupsEvent
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class HiddenGroupsEvent
extends SolutionEvent
implements java.lang.Cloneable

A solution event

Author:
A.G.Docherty
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class uk.co.keang.sudoku.event.SolutionEvent
SolutionEvent.DisplayOrder, SolutionEvent.Grouping
 
Field Summary
 
Fields inherited from class uk.co.keang.sudoku.event.SolutionEvent
lblTextXAxis
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
HiddenGroupsEvent(AbstractSolver src, java.lang.String msg, Puzzle grid, Puzzle.Cell ref, java.awt.Point loc, Puzzle.Cell removed, java.util.List<java.awt.Point> from, SolutionEvent.Grouping group)
          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
 Puzzle.Cell getReferencedValues()
          The values which are to be highlighted in the referenced locations.
 
Methods inherited from class uk.co.keang.sudoku.event.SolutionEvent
clone, coalesce, displayOrder, equals, getDescription, getGrouping, getLocations, getPuzzle, getReferencedLocations, getRemovedValues, hashCode, isResolved, setDisplayOrder, toString
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HiddenGroupsEvent

public HiddenGroupsEvent(AbstractSolver src,
                         java.lang.String msg,
                         Puzzle grid,
                         Puzzle.Cell ref,
                         java.awt.Point loc,
                         Puzzle.Cell removed,
                         java.util.List<java.awt.Point> from,
                         SolutionEvent.Grouping group)
                  throws IllegalGridException
A solver event for a changed cell

Parameters:
src - the solver that generated the event
msg - a descriptive message from the solver
grid - the grid after the proposed changes are applied
ref - the hidden group values
loc - the location (0 based) of the cell that has been modified
removed - the values that been removed from this cells possible values list
from - a list of locations (0 based) of the cells used to determine which values can be removed
Throws:
IllegalGridException
Method Detail

canCoalesce

public boolean canCoalesce(SolutionEvent e)
Returns true if the source and location are the same and if they both have change sets

Overrides:
canCoalesce in class SolutionEvent
Parameters:
e -
Returns:

getReferencedValues

public Puzzle.Cell getReferencedValues()
The values which are to be highlighted in the referenced locations. This implementation returns the removed values. Override this method if you want different behaviour.

Overrides:
getReferencedValues in class SolutionEvent
Returns:
the values