us.the.mac.board
Class BoardDisplay

java.lang.Object
  extended by android.content.Context
      extended by android.content.ContextWrapper
          extended by android.view.ContextThemeWrapper
              extended by android.app.Activity
                  extended by us.the.mac.board.BoardDisplay
All Implemented Interfaces:
ComponentCallbacks, KeyEvent.Callback, LayoutInflater.Factory, View.OnCreateContextMenuListener, Window.Callback
Direct Known Subclasses:
BoardGuideDisplay

public abstract class BoardDisplay
extends Activity


Field Summary
static int ACCEPTED
           
static String APP_NAME
           
static UUID BOARD_UUID
          BLUETOOTH JOUSTING SERVICE FUNCTIONALITIES BEGINNING
static int DECLINED
           
static String DEVICE_CLIENT
           
static String DEVICE_COLOR
           
static String DEVICE_NAME
           
static int END_SESSION
           
static String EXTRA_DEVICE_ADDRESS
           
static int MESSAGE_DEVICE_NAME
           
static int MESSAGE_READ
           
static int MESSAGE_STATE_CHANGE
          INNER CLASSES ENDING
static int MESSAGE_TOAST
           
static int MESSAGE_WRITE
           
static int MOVE
           
static int REMATCH
           
static int RETREAT
           
static int START_GAME
           
static String TOAST
           
 
Fields inherited from class android.app.Activity
DEFAULT_KEYS_DIALER, DEFAULT_KEYS_DISABLE, DEFAULT_KEYS_SEARCH_GLOBAL, DEFAULT_KEYS_SEARCH_LOCAL, DEFAULT_KEYS_SHORTCUT, FOCUSED_STATE_SET, RESULT_CANCELED, RESULT_FIRST_USER, RESULT_OK
 
Fields inherited from class android.content.Context
ACCESSIBILITY_SERVICE, ACCOUNT_SERVICE, ACTIVITY_SERVICE, ALARM_SERVICE, AUDIO_SERVICE, BIND_AUTO_CREATE, BIND_DEBUG_UNBIND, BIND_NOT_FOREGROUND, CLIPBOARD_SERVICE, CONNECTIVITY_SERVICE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_RESTRICTED, DEVICE_POLICY_SERVICE, DROPBOX_SERVICE, INPUT_METHOD_SERVICE, KEYGUARD_SERVICE, LAYOUT_INFLATER_SERVICE, LOCATION_SERVICE, MODE_APPEND, MODE_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE, NOTIFICATION_SERVICE, POWER_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, TELEPHONY_SERVICE, UI_MODE_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_SERVICE, WINDOW_SERVICE
 
Constructor Summary
BoardDisplay()
           
 
Method Summary
 boolean endTime()
           
 us.the.mac.board.BoardDisplay.GameTime getGameTimeObject()
           
 boolean getLastMove()
           
abstract  Board.Color getServerPlayerColor()
           
 float getTime()
           
 boolean matchFinished()
           
 void onActivityResult(int requestCode, int resultCode, Intent data)
           
protected  void onCreate(Bundle savedInstanceState)
          ANDROID LIFECYCLE METHODS BEGINNING
 boolean onCreateOptionsMenu(Menu menu)
           
 void onDestroy()
           
 boolean onOptionsItemSelected(MenuItem item)
           
protected  void onPause()
           
protected  void onRestart()
           
 void onResume()
           
 void onStart()
           
 void prompt(int id)
           
 void sendCommand(String command)
          Sends a destination square move to an opponent over Bluetooth.
 void setLastMove(boolean lm)
           
 void setText(int id)
          BOARD MANAGEMENT FUNCTIONALITIES BEGINNING
 void setText(int id, Object msg)
           
 void setText(String m)
           
 void setTime(float i)
           
abstract  void startClientGameAs(Board.Color c)
           
abstract  void startGame()
           
 void startTimer()
           
 void stop()
           
 void stopTimer()
           
 void viewOpponents()
           
 void waitForGame()
           
 
Methods inherited from class android.app.Activity
addContentView, closeContextMenu, closeOptionsMenu, createPendingResult, dismissDialog, dispatchKeyEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, findViewById, finish, finishActivity, finishActivityFromChild, finishFromChild, getApplication, getCallingActivity, getCallingPackage, getChangingConfigurations, getComponentName, getCurrentFocus, getInstanceCount, getIntent, getLastNonConfigurationInstance, getLayoutInflater, getLocalClassName, getMenuInflater, getParent, getPreferences, getRequestedOrientation, getSystemService, getTaskId, getTitle, getTitleColor, getVolumeControlStream, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, getWindow, getWindowManager, hasWindowFocus, isChild, isFinishing, isTaskRoot, managedQuery, moveTaskToBack, onApplyThemeResource, onAttachedToWindow, onBackPressed, onChildTitleChanged, onConfigurationChanged, onContentChanged, onContextItemSelected, onContextMenuClosed, onCreateContextMenu, onCreateDescription, onCreateDialog, onCreateDialog, onCreatePanelMenu, onCreatePanelView, onCreateThumbnail, onCreateView, onDetachedFromWindow, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyUp, onLowMemory, onMenuItemSelected, onMenuOpened, onNewIntent, onOptionsMenuClosed, onPanelClosed, onPostCreate, onPostResume, onPrepareDialog, onPrepareDialog, onPrepareOptionsMenu, onPreparePanel, onRestoreInstanceState, onRetainNonConfigurationInstance, onSaveInstanceState, onSearchRequested, onStop, onTitleChanged, onTouchEvent, onTrackballEvent, onUserInteraction, onUserLeaveHint, onWindowAttributesChanged, onWindowFocusChanged, openContextMenu, openOptionsMenu, overridePendingTransition, registerForContextMenu, removeDialog, requestWindowFeature, runOnUiThread, setContentView, setContentView, setContentView, setDefaultKeyMode, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setIntent, setPersistent, setProgress, setProgressBarIndeterminate, setProgressBarIndeterminateVisibility, setProgressBarVisibility, setRequestedOrientation, setResult, setResult, setSecondaryProgress, setTitle, setTitle, setTitleColor, setVisible, setVolumeControlStream, showDialog, showDialog, startActivity, startActivityForResult, startActivityFromChild, startActivityIfNeeded, startIntentSender, startIntentSenderForResult, startIntentSenderFromChild, startManagingCursor, startNextMatchingActivity, startSearch, stopManagingCursor, takeKeyEvents, triggerSearch, unregisterForContextMenu
 
Methods inherited from class android.view.ContextThemeWrapper
attachBaseContext, getTheme, setTheme
 
Methods inherited from class android.content.ContextWrapper
bindService, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingPermission, checkCallingUriPermission, checkPermission, checkUriPermission, checkUriPermission, clearWallpaper, createPackageContext, databaseList, deleteDatabase, deleteFile, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getAssets, getBaseContext, getCacheDir, getClassLoader, getContentResolver, getDatabasePath, getDir, getExternalCacheDir, getExternalFilesDir, getFilesDir, getFileStreamPath, getMainLooper, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getResources, getSharedPreferences, getWallpaper, grantUriPermission, isRestricted, openFileInput, openFileOutput, openOrCreateDatabase, peekWallpaper, registerReceiver, registerReceiver, removeStickyBroadcast, revokeUriPermission, sendBroadcast, sendBroadcast, sendOrderedBroadcast, sendOrderedBroadcast, sendStickyBroadcast, sendStickyOrderedBroadcast, setWallpaper, setWallpaper, startInstrumentation, startService, stopService, unbindService, unregisterReceiver
 
Methods inherited from class android.content.Context
getString, getString, getText, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BOARD_UUID

public static final UUID BOARD_UUID
BLUETOOTH JOUSTING SERVICE FUNCTIONALITIES BEGINNING


EXTRA_DEVICE_ADDRESS

public static String EXTRA_DEVICE_ADDRESS

APP_NAME

public static final String APP_NAME
See Also:
Constant Field Values

MESSAGE_STATE_CHANGE

public static final int MESSAGE_STATE_CHANGE
INNER CLASSES ENDING

See Also:
Constant Field Values

MESSAGE_READ

public static final int MESSAGE_READ
See Also:
Constant Field Values

MESSAGE_WRITE

public static final int MESSAGE_WRITE
See Also:
Constant Field Values

MESSAGE_DEVICE_NAME

public static final int MESSAGE_DEVICE_NAME
See Also:
Constant Field Values

MESSAGE_TOAST

public static final int MESSAGE_TOAST
See Also:
Constant Field Values

MOVE

public static final int MOVE
See Also:
Constant Field Values

END_SESSION

public static final int END_SESSION
See Also:
Constant Field Values

START_GAME

public static final int START_GAME
See Also:
Constant Field Values

REMATCH

public static final int REMATCH
See Also:
Constant Field Values

RETREAT

public static final int RETREAT
See Also:
Constant Field Values

ACCEPTED

public static final int ACCEPTED
See Also:
Constant Field Values

DECLINED

public static final int DECLINED
See Also:
Constant Field Values

DEVICE_NAME

public static final String DEVICE_NAME
See Also:
Constant Field Values

DEVICE_COLOR

public static final String DEVICE_COLOR
See Also:
Constant Field Values

DEVICE_CLIENT

public static final String DEVICE_CLIENT
See Also:
Constant Field Values

TOAST

public static final String TOAST
See Also:
Constant Field Values
Constructor Detail

BoardDisplay

public BoardDisplay()
Method Detail

onCreate

protected void onCreate(Bundle savedInstanceState)
ANDROID LIFECYCLE METHODS BEGINNING

Overrides:
onCreate in class Activity

onStart

public void onStart()
Overrides:
onStart in class Activity

onRestart

protected void onRestart()
Overrides:
onRestart in class Activity

onResume

public void onResume()
Overrides:
onResume in class Activity

onPause

protected void onPause()
Overrides:
onPause in class Activity

onDestroy

public void onDestroy()
Overrides:
onDestroy in class Activity

setText

public void setText(int id)
BOARD MANAGEMENT FUNCTIONALITIES BEGINNING


setText

public void setText(String m)

setText

public void setText(int id,
                    Object msg)

onActivityResult

public void onActivityResult(int requestCode,
                             int resultCode,
                             Intent data)
Overrides:
onActivityResult in class Activity

setTime

public void setTime(float i)

getTime

public float getTime()

startTimer

public void startTimer()

stopTimer

public void stopTimer()

endTime

public boolean endTime()

getGameTimeObject

public us.the.mac.board.BoardDisplay.GameTime getGameTimeObject()

onCreateOptionsMenu

public boolean onCreateOptionsMenu(Menu menu)
Overrides:
onCreateOptionsMenu in class Activity

onOptionsItemSelected

public boolean onOptionsItemSelected(MenuItem item)
Overrides:
onOptionsItemSelected in class Activity

prompt

public void prompt(int id)

startGame

public abstract void startGame()

getServerPlayerColor

public abstract Board.Color getServerPlayerColor()

startClientGameAs

public abstract void startClientGameAs(Board.Color c)

sendCommand

public void sendCommand(String command)
Sends a destination square move to an opponent over Bluetooth.


waitForGame

public void waitForGame()

viewOpponents

public void viewOpponents()

getLastMove

public boolean getLastMove()

setLastMove

public void setLastMove(boolean lm)

matchFinished

public boolean matchFinished()

stop

public void stop()