Class XLogicField

Class XLogicField

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----XLogicField

public class XLogicField
extends Panel
Class containing panel with field, result-panel and eval-button
See Also:
pf, pr, v_eval

Variable Index

 o ac
Array of colors
 o bs
Array of references to buttons in logic-field
 o colors
Number of colors used
 o cols
Number of columns in logic-field
 o crow
Current row
 o iface
Interface to application
 o le
Array of eval-labels
 o pf
panels: field, results and main
 o pm
panels: field, results and main
 o pr
panels: field, results and main
 o rows
Number of rows in logic-field
 o v_eval
eval button

Constructor Index

 o XLogicField(XLogicFieldIface, Color[])
Constructor, creates panels, buttons and creates new game

Method Index

 o action(Event, Object)
Handles pressing v_eval-button
 o eval()
Evaluates player's tip
 o getColor(int)
Returns n-th color in field ac
 o getCurRow()
Returns current row
 o getNColors()
Returns number of colors
 o getNCols()
Returns number of columns
 o getNRows()
Returns number of rows
 o restart(int, int, int)
Restart the game.

Variables

 o iface
  protected XLogicFieldIface iface
Interface to application
See Also:
XLogicFieldIface
 o rows
  protected int rows
Number of rows in logic-field
 o cols
  protected int cols
Number of columns in logic-field
 o colors
  protected int colors
Number of colors used
 o pf
  protected Panel pf
panels: field, results and main
See Also:
bs, le, v_eval
 o pr
  protected Panel pr
panels: field, results and main
See Also:
bs, le, v_eval
 o pm
  protected Panel pm
panels: field, results and main
See Also:
bs, le, v_eval
 o v_eval
  protected Button v_eval
eval button
 o bs
  protected XLogicButton bs[][]
Array of references to buttons in logic-field
See Also:
XlogicButton
 o le
  protected Label le[]
Array of eval-labels
 o ac
  protected Color ac[]
Array of colors
 o crow
  protected int crow
Current row

Constructors

 o XLogicField
  public XLogicField(XLogicFieldIface _iface,
                     Color _ac[])
Constructor, creates panels, buttons and creates new game

Methods

 o getNRows
  public int getNRows()
Returns number of rows
See Also:
rows
 o getNCols
  public int getNCols()
Returns number of columns
See Also:
cols
 o getNColors
  public int getNColors()
Returns number of colors
See Also:
colors
 o getCurRow
  public int getCurRow()
Returns current row
See Also:
crow
 o getColor
  public Color getColor(int n)
Returns n-th color in field ac
See Also:
ac
 o restart
  public void restart(int _rows,
                      int _cols,
                      int _colors)
Restart the game. Removes old buttons from panels and creates new
 o eval
  public void eval()
Evaluates player's tip
 o action
  public boolean action(Event event,
                        Object object)
Handles pressing v_eval-button
Overrides:
action in class Component