Class SudokuExample

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.util.EventListener

    public class SudokuExample
    extends java.lang.Object
    implements java.awt.event.ActionListener
    This example shows how Drools can be used to solve a 9x9 Sudoku Grid. This Class hooks together the GUI and the model and allows you to load different grids. <pgt; Several grids are provided via File -> Samples. <pgt; For loading a grid from a file, prepare a text file containing nine text lines as shown below and select File -> Open... <pgt; <pre> 95 1 3 752 8 7 3 9 4 8 5 2 6 814 7 5 1 49 5 8 6 8 4 7 3 </pre>
    • Constructor Summary

      Constructors 
      Constructor Description
      SudokuExample()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void actionPerformed​(java.awt.event.ActionEvent ev)  
      static org.kie.api.runtime.KieContainer createSudokuKieContainer()  
      void init​(org.kie.api.runtime.KieContainer kc, boolean exitOnClose)  
      static void main​(java.lang.String[] args)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SudokuExample

        public SudokuExample()
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
      • createSudokuKieContainer

        public static org.kie.api.runtime.KieContainer createSudokuKieContainer()
      • init

        public void init​(org.kie.api.runtime.KieContainer kc,
                         boolean exitOnClose)
      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent ev)
        Specified by:
        actionPerformed in interface java.awt.event.ActionListener