Class FooBase

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Frame
                          |
                          +--FooBase

public class FooBase
extends java.awt.Frame
implements java.lang.Runnable

Sample program using the net.sourceforge.foobase classes.

The interface provided by this class is intended to be used on a PDA style device. The main focus is on entering new games, but replaying games already stored in a chessbase database is also implemented.

Given the nature of the target device (low on resources and a slow CPU), it is obvious that this application is not a competitor for the "real" chessbase program ;-)

Another PDA related issue is the usage of a null layout for the main application window: using standard AWT layoutmanagers just did not work out (too much space waa wasted)

See Also:
Serialized Form

Inner Class Summary
protected  class FooBase.ButtonNope
           
protected  class FooBase.ButtonNoShow
           
protected  class FooBase.ButtonShowGame
           
protected  class FooBase.ButtonYup
           
protected  class FooBase.DeleteGame
           
protected  class FooBase.FooBaseCompListener
           
protected  class FooBase.GameInfo
           
protected  class FooBase.HideWindow
           
protected  class FooBase.ListGames
           
protected  class FooBase.Mickey
           
protected  class FooBase.NavigateGame
           
protected  class FooBase.NewGame
           
protected  class FooBase.NukeWindow
           
protected  class FooBase.OpenCreateDB
           
protected  class FooBase.SaveGame
           
protected  class FooBase.ScrollMoves
           
protected  class FooBase.ShowHelp
           
protected  class FooBase.StartAnimation
           
 
Field Summary
static java.lang.String __version
           
protected  java.lang.String _annotator
          Annotator
protected  DisplayBoard _brd
          Board display component.
protected  java.awt.Button _btn_create
          Create new database option
protected  java.awt.Button _btn_delete
          Delete game button
protected  java.awt.Button _btn_down
          Scroll down move annotations button
protected  java.awt.Button _btn_endgame
          End of game button
protected  java.awt.Button _btn_help
          Help button
protected  java.awt.Button _btn_info
          Game info button
protected  java.awt.Button _btn_list
          List games button
protected  java.awt.Button _btn_newgame
          New game button
protected  java.awt.Button _btn_open
          Open database button
protected  java.awt.Button _btn_redo
          Redo next move button
protected  java.awt.Button _btn_save
          Save game button
protected  java.awt.Button _btn_scroll_back
          Scroll up in the text field.
protected  java.awt.Button _btn_scroll_further
          Scroll down in the text field.
protected  java.awt.Button _btn_start
          Back to start of game button
protected  java.awt.Button _btn_undo
          Undo last move button
protected  java.awt.Button _btn_up
          Scroll up move annotations button
protected  int _c0
          Column number for originating piece
protected  CBFDatabase _dbase
          Current database.
protected  int _delay
          Delay between two automatic moves in milliseconds.
protected  boolean _doin_la_bamba
          Switch indicating if the animation thread is active.
protected  java.lang.String _elo_black
          ELO of black player
protected  java.lang.String _elo_white
          ELO of white player
protected  Game _game
          Game to build
protected  int _game_idx
          Index of game in case it was retrieved from a database.
protected  java.awt.Dialog _gamelist_panel
          List of all games in database panel
protected  boolean _going_up
          Switch for animation direction: true means scroll further in game, false means scroll back towards the start of the game.
protected  java.awt.Dialog _help_panel
          Help text panel (shown when help button is pressed)
protected  java.awt.Dialog _info_dialog
          Info dialog.
protected  FooBase _it_is_aai
          Reference to main application frame.
protected  java.awt.List _lst_headers
          List containing all game header strings
protected static int _max_height
          Height to use.
protected static int _max_width
          Width to use.
protected  java.util.Vector _moves
          Current move list.
protected  java.lang.String _name_black
          Name of black player
protected  java.lang.String _name_white
          Name of white player
protected  java.awt.Button _nope
          Cancel button in info dialog
protected  java.awt.Image[] _pieces
          Images to use for all the pieces.
protected  int _plynr
          Element number of "current" move in the game move list, that is: the element where the next move will be stored in _them_moves
protected  MoveAnnotations _pnl_moves
          Panel inside the scrollpane
protected  java.awt.ScrollPane _pnl_scroll
          Scroll pane used for holding move annotations.
protected  int _r0
          Row number for originating piece
protected  java.lang.String _result
          Game result
protected  java.lang.Thread _runner
          Animation thread
protected  Board _setup
          Current board setup
protected  java.awt.Button[][] _them_buttons
          Array used for sizing and positioning of the buttons.
protected  java.util.Vector _them_moves
          Vector containing the moves so far.
protected  int _tomove
          Code for current player to move: 0 means white, 1 means black
protected  java.lang.String _tournament
          Tournament
protected  java.awt.TextField _txt_annotator
          Textfield for entering annotator
protected  java.awt.TextField _txt_elo_black
          Textfield for entering ELO of black player
protected  java.awt.TextField _txt_elo_white
          Textfield for entering ELO of white player
protected  java.awt.TextField _txt_move_annotation1
          First text line containing the game moves
protected  java.awt.TextField _txt_move_annotation2
          Second text line containing the game moves
protected  java.awt.TextField _txt_name_black
          Textfield for entering name of black player
protected  java.awt.TextField _txt_name_white
          Textfield for entering name of white player
protected  java.awt.TextField _txt_result
          Textfield for entering game result.
protected  java.awt.TextField _txt_tournament
          Textfield for entering tournament info.
protected  java.awt.TextField _txt_year
          Textfield for entering year that game was played.
protected  java.lang.String _year
          Year
protected  java.awt.Button _yup
          Ok button in info dialog
protected static java.lang.String CMD_BACK
          Action command string for "autoplay backwards" button
protected static java.lang.String CMD_DELETE
          Action command string for "delete" menu item
protected static java.lang.String CMD_DOWN
          Action command string for "scroll down moves" button
protected static java.lang.String CMD_ENDGAME
          Action command string for "end of game" button
protected static java.lang.String CMD_FURTHER
          Action command string for "autoplay forward" button
protected static java.lang.String CMD_HELP
          Action command string for "help" button
protected static java.lang.String CMD_INFO
          Action command string for "game info" menu item
protected static java.lang.String CMD_LIST
          Action command string for "list games" menu item
protected static java.lang.String CMD_NEWDB
          Action command string for "create database" menu item
protected static java.lang.String CMD_NEWGAME
          Action command string for "new game" menu item
protected static java.lang.String CMD_NOPE
          Action command string for "cancel" button
protected static java.lang.String CMD_OPENDB
          Action command string for "open database" menu item
protected static java.lang.String CMD_REDO
          Action command string for "redo move" button
protected static java.lang.String CMD_SAVE
          Action command string for "save" menu item
protected static java.lang.String CMD_STARTGAME
          Action command string for "start of game" button
protected static java.lang.String CMD_UNDO
          Action command string for "undo move" button
protected static java.lang.String CMD_UP
          Action command string for "scroll up moves" button
protected static java.lang.String CMD_YUP
          Action command string for "Ok" button
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
FooBase()
          Default public constructor.
 
Method Summary
protected  void addBagCentered(java.awt.Component c, int x, int y, java.awt.GridBagLayout gb, java.awt.Container cnt)
          Add a horizontally stretched out component to gridbaglayout.
protected  void addBagFilled(java.awt.Component c, int x, int y, java.awt.GridBagLayout gb, java.awt.Container cnt)
          Add a horizontally stretched out component to gridbaglayout.
protected  void addBagFilled(java.awt.Component c, int x, int y, int w, java.awt.GridBagLayout gb, java.awt.Container cnt)
          Add a horizontally stretched out component to gridbaglayout.
protected  void addBagFilled(java.awt.Component c, int x, int y, int w, int h, java.awt.GridBagLayout gb, java.awt.Container cnt)
          Add a horizontally stretched out component to gridbaglayout.
protected  void addBagLeft(java.awt.Component c, int x, int y, java.awt.GridBagLayout gb, java.awt.Container cnt)
          Add a left-justified component to gridbaglayout.
protected  void addOptionButtons()
          Add move annotations and option buttons panel.
protected  void bailout()
          Terminate program.
protected  void clearInput()
          Clear all text fields in info dialog, as well as their String counterparts.
protected  void createInfoDialog()
          Create dialog for entering players info etc.
 void doLayout()
          Do layouting for this container.
protected  void doTheLayouting()
          Compute sizes and locations of all components in this frame.
protected  void getInfoFields()
          Extract data from dialog fields
 java.awt.Insets getInsets()
          Return insets to use for frame.
 java.awt.Insets insets()
          Return insets to use for frame.
static void main(java.lang.String[] args)
          Main entry point for standalone java application.
protected  void maximize(java.awt.Component c)
          Maximize the size of a given component.
protected  void maximizeMostly(java.awt.Component c)
          Resize component to about 70% of the full size.
protected  java.awt.Button newButton(java.lang.String l, java.lang.String cmd, int x, int y, java.awt.event.ActionListener lstnr)
          Create and add a new button to the bottom "panel" of the application window.
 void run()
          Actual code running in the animation thread.
protected  void scrollBack()
          Retract last move
protected  void scrollFurther()
          Redo next move
protected  void setInfoFields()
          Update fields in info dialog fields with data obtained from the database.
 void start()
          Start animation thread if it is not yet started.
protected  void startNewGame()
          Start new game.
 void update(java.awt.Graphics g)
          Update the component.
protected  void updateProps()
          Update various properties based on new values for _plynr and _setup
 
Methods inherited from class java.awt.Frame
addNotify, finalize, getCursorType, getFrames, getIconImage, getMenuBar, getState, getTitle, isResizable, paramString, remove, removeNotify, setCursor, setIconImage, setMenuBar, setResizable, setState, setTitle
 
Methods inherited from class java.awt.Window
addWindowListener, applyResourceBundle, applyResourceBundle, dispose, getFocusOwner, getInputContext, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, hide, isShowing, pack, postEvent, processEvent, processWindowEvent, removeWindowListener, setCursor, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setFont, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CMD_OPENDB

protected static final java.lang.String CMD_OPENDB
Action command string for "open database" menu item

CMD_NEWDB

protected static final java.lang.String CMD_NEWDB
Action command string for "create database" menu item

CMD_NEWGAME

protected static final java.lang.String CMD_NEWGAME
Action command string for "new game" menu item

CMD_SAVE

protected static final java.lang.String CMD_SAVE
Action command string for "save" menu item

CMD_DELETE

protected static final java.lang.String CMD_DELETE
Action command string for "delete" menu item

CMD_LIST

protected static final java.lang.String CMD_LIST
Action command string for "list games" menu item

CMD_INFO

protected static final java.lang.String CMD_INFO
Action command string for "game info" menu item

CMD_YUP

protected static final java.lang.String CMD_YUP
Action command string for "Ok" button

CMD_NOPE

protected static final java.lang.String CMD_NOPE
Action command string for "cancel" button

CMD_STARTGAME

protected static final java.lang.String CMD_STARTGAME
Action command string for "start of game" button

CMD_ENDGAME

protected static final java.lang.String CMD_ENDGAME
Action command string for "end of game" button

CMD_UNDO

protected static final java.lang.String CMD_UNDO
Action command string for "undo move" button

CMD_REDO

protected static final java.lang.String CMD_REDO
Action command string for "redo move" button

CMD_HELP

protected static final java.lang.String CMD_HELP
Action command string for "help" button

CMD_BACK

protected static final java.lang.String CMD_BACK
Action command string for "autoplay backwards" button

CMD_FURTHER

protected static final java.lang.String CMD_FURTHER
Action command string for "autoplay forward" button

CMD_UP

protected static final java.lang.String CMD_UP
Action command string for "scroll up moves" button

CMD_DOWN

protected static final java.lang.String CMD_DOWN
Action command string for "scroll down moves" button

_max_width

protected static int _max_width
Width to use.

_max_height

protected static int _max_height
Height to use.

_dbase

protected CBFDatabase _dbase
Current database.

_brd

protected DisplayBoard _brd
Board display component.

_pieces

protected java.awt.Image[] _pieces
Images to use for all the pieces.

_game

protected Game _game
Game to build

_game_idx

protected int _game_idx
Index of game in case it was retrieved from a database.

For new games, this value is -1, for others it is greater than or equal zero.

Note that this scheme works for chessbase databases because we those games are identified by a numerical ID.


_setup

protected Board _setup
Current board setup

_moves

protected java.util.Vector _moves
Current move list.

_r0

protected int _r0
Row number for originating piece

_c0

protected int _c0
Column number for originating piece

_tomove

protected int _tomove
Code for current player to move: 0 means white, 1 means black

_btn_open

protected java.awt.Button _btn_open
Open database button

_btn_create

protected java.awt.Button _btn_create
Create new database option

Does not seem to work on PDA: ignore for now.


_btn_newgame

protected java.awt.Button _btn_newgame
New game button

_btn_info

protected java.awt.Button _btn_info
Game info button

_btn_save

protected java.awt.Button _btn_save
Save game button

_btn_delete

protected java.awt.Button _btn_delete
Delete game button

_btn_list

protected java.awt.Button _btn_list
List games button

_btn_start

protected java.awt.Button _btn_start
Back to start of game button

_btn_undo

protected java.awt.Button _btn_undo
Undo last move button

_btn_redo

protected java.awt.Button _btn_redo
Redo next move button

_btn_endgame

protected java.awt.Button _btn_endgame
End of game button

_btn_help

protected java.awt.Button _btn_help
Help button

_btn_up

protected java.awt.Button _btn_up
Scroll up move annotations button

_btn_down

protected java.awt.Button _btn_down
Scroll down move annotations button

_them_buttons

protected java.awt.Button[][] _them_buttons
Array used for sizing and positioning of the buttons.

_pnl_scroll

protected java.awt.ScrollPane _pnl_scroll
Scroll pane used for holding move annotations.

_pnl_moves

protected MoveAnnotations _pnl_moves
Panel inside the scrollpane

_it_is_aai

protected FooBase _it_is_aai
Reference to main application frame.

_info_dialog

protected java.awt.Dialog _info_dialog
Info dialog.

_txt_name_white

protected java.awt.TextField _txt_name_white
Textfield for entering name of white player

_txt_elo_white

protected java.awt.TextField _txt_elo_white
Textfield for entering ELO of white player

_txt_name_black

protected java.awt.TextField _txt_name_black
Textfield for entering name of black player

_txt_elo_black

protected java.awt.TextField _txt_elo_black
Textfield for entering ELO of black player

_txt_tournament

protected java.awt.TextField _txt_tournament
Textfield for entering tournament info.

_txt_year

protected java.awt.TextField _txt_year
Textfield for entering year that game was played.

_txt_annotator

protected java.awt.TextField _txt_annotator
Textfield for entering annotator

_txt_result

protected java.awt.TextField _txt_result
Textfield for entering game result.

_lst_headers

protected java.awt.List _lst_headers
List containing all game header strings

_yup

protected java.awt.Button _yup
Ok button in info dialog

_nope

protected java.awt.Button _nope
Cancel button in info dialog

_help_panel

protected java.awt.Dialog _help_panel
Help text panel (shown when help button is pressed)

_gamelist_panel

protected java.awt.Dialog _gamelist_panel
List of all games in database panel

_txt_move_annotation1

protected java.awt.TextField _txt_move_annotation1
First text line containing the game moves

_txt_move_annotation2

protected java.awt.TextField _txt_move_annotation2
Second text line containing the game moves

_btn_scroll_back

protected java.awt.Button _btn_scroll_back
Scroll up in the text field.

_btn_scroll_further

protected java.awt.Button _btn_scroll_further
Scroll down in the text field.

_name_white

protected java.lang.String _name_white
Name of white player

_elo_white

protected java.lang.String _elo_white
ELO of white player

_name_black

protected java.lang.String _name_black
Name of black player

_elo_black

protected java.lang.String _elo_black
ELO of black player

_tournament

protected java.lang.String _tournament
Tournament

_year

protected java.lang.String _year
Year

_annotator

protected java.lang.String _annotator
Annotator

_result

protected java.lang.String _result
Game result

_plynr

protected int _plynr
Element number of "current" move in the game move list, that is: the element where the next move will be stored in _them_moves

_them_moves

protected java.util.Vector _them_moves
Vector containing the moves so far.

_runner

protected java.lang.Thread _runner
Animation thread

_going_up

protected boolean _going_up
Switch for animation direction: true means scroll further in game, false means scroll back towards the start of the game.

_doin_la_bamba

protected boolean _doin_la_bamba
Switch indicating if the animation thread is active.

If this switch is set to false, the thread will stop.


_delay

protected int _delay
Delay between two automatic moves in milliseconds.

__version

public static final java.lang.String __version
Constructor Detail

FooBase

public FooBase()
Default public constructor.
Method Detail

main

public static void main(java.lang.String[] args)
Main entry point for standalone java application.
Parameters:
args - String[] containing the commandline paranmeters

insets

public java.awt.Insets insets()
Return insets to use for frame.
Overrides:
insets in class java.awt.Container
Returns:
Insets describing how much space to leave between different components in this frame.

getInsets

public java.awt.Insets getInsets()
Return insets to use for frame.

All insets, except for the top, are set to zero.

Overrides:
getInsets in class java.awt.Container
Returns:
Insets describing how much space to leave between different components in this frame.

doLayout

public void doLayout()
Do layouting for this container.

This method dynamically sizes the chessboard component to full width and 75/110 of the available height. That ratio is handpicked to offer a "reasonable" area in which the buttons and move annotations can be stuffed when working on a 240 by 320 PDA screen.

Overrides:
doLayout in class java.awt.Container

update

public void update(java.awt.Graphics g)
Update the component.

The main reason for implementing this method is to avoid clearing of the component on screen first (and thus reducing possible flikkering on the screen)

Overrides:
update in class java.awt.Container
Parameters:
g - Graphics to draw the board on.

start

public void start()
Start animation thread if it is not yet started.

run

public void run()
Actual code running in the animation thread.
Specified by:
run in interface java.lang.Runnable

doTheLayouting

protected void doTheLayouting()
Compute sizes and locations of all components in this frame.

THe ratio for chessboard/bottom stuff is 75/110 for the chessboard and 35/110 for the bottom part. The only reason for this ratio is that it offers enough space on a 240x320 PDA screen to draw the bottom components with a reasonable size.

About the only difference with a full doLayout() is that no call to the super class implementation of doLayout() is done.


addOptionButtons

protected void addOptionButtons()
Add move annotations and option buttons panel.

The buttons are drawn in a grid of 3 rows by 11 columns. The area (1,0) to (10,1) is occupied by the area in which the moves are printed.


newButton

protected java.awt.Button newButton(java.lang.String l,
                                    java.lang.String cmd,
                                    int x,
                                    int y,
                                    java.awt.event.ActionListener lstnr)
Create and add a new button to the bottom "panel" of the application window.
Parameters:
l - String containing the button label
cmd - String containing the action command for the button
x - int X-coordinate in the grid where the button is to be located
y - int Y-coordinate in the grid where the button is to be located
lstnr - ActionListener to add for handling button clicks
Returns:
Button created and located according to the specs

startNewGame

protected void startNewGame()
Start new game.

bailout

protected void bailout()
Terminate program.

createInfoDialog

protected void createInfoDialog()
Create dialog for entering players info etc.

clearInput

protected void clearInput()
Clear all text fields in info dialog, as well as their String counterparts.

getInfoFields

protected void getInfoFields()
Extract data from dialog fields

setInfoFields

protected void setInfoFields()
Update fields in info dialog fields with data obtained from the database.

maximize

protected void maximize(java.awt.Component c)
Maximize the size of a given component.
Parameters:
c - Component to resize to the size of the screen

maximizeMostly

protected void maximizeMostly(java.awt.Component c)
Resize component to about 70% of the full size.

The main reason for this method is to offer panels with sufficient space near the bottom for a virtual keyboard on a PDA.

Parameters:
c - Component to resize to the size of the screen

addBagLeft

protected void addBagLeft(java.awt.Component c,
                          int x,
                          int y,
                          java.awt.GridBagLayout gb,
                          java.awt.Container cnt)
Add a left-justified component to gridbaglayout.
Parameters:
c - Component to add to the gridbaglayout
x - int x-coordinate in gridbag grid
y - int y-coordinate in gridbag grid
gb - GridBagLayout to add the component to.
cnt - Container to which the component is to be added

addBagFilled

protected void addBagFilled(java.awt.Component c,
                            int x,
                            int y,
                            java.awt.GridBagLayout gb,
                            java.awt.Container cnt)
Add a horizontally stretched out component to gridbaglayout.
Parameters:
c - Component to add to the gridbaglayout
x - int x-coordinate in gridbag grid
y - int y-coordinate in gridbag grid
gb - GridBagLayout to add the component to.
cnt - Container to which the component is to be added

addBagFilled

protected void addBagFilled(java.awt.Component c,
                            int x,
                            int y,
                            int w,
                            java.awt.GridBagLayout gb,
                            java.awt.Container cnt)
Add a horizontally stretched out component to gridbaglayout.
Parameters:
c - Component to add to the gridbaglayout
x - int x-coordinate in gridbag grid
y - int y-coordinate in gridbag grid
w - int with in gridbag cells
gb - GridBagLayout to add the component to.
cnt - Container to which the component is to be added

addBagFilled

protected void addBagFilled(java.awt.Component c,
                            int x,
                            int y,
                            int w,
                            int h,
                            java.awt.GridBagLayout gb,
                            java.awt.Container cnt)
Add a horizontally stretched out component to gridbaglayout.
Parameters:
c - Component to add to the gridbaglayout
x - int x-coordinate in gridbag grid
y - int y-coordinate in gridbag grid
w - int with in gridbag cells
h - int height in gridbag cells
gb - GridBagLayout to add the component to.
cnt - Container to which the component is to be added

addBagCentered

protected void addBagCentered(java.awt.Component c,
                              int x,
                              int y,
                              java.awt.GridBagLayout gb,
                              java.awt.Container cnt)
Add a horizontally stretched out component to gridbaglayout.
Parameters:
c - Component to add to the gridbaglayout
x - int x-coordinate in gridbag grid
y - int y-coordinate in gridbag grid
gb - GridBagLayout to add the component to.
cnt - Container to which the component is to be added

updateProps

protected void updateProps()
Update various properties based on new values for _plynr and _setup

This method is called when a new move is entered or when one of the navigation buttons is clicked.


scrollBack

protected void scrollBack()
Retract last move

scrollFurther

protected void scrollFurther()
Redo next move