Blackjack

com.amoebacode.blackjack.display.button
Class ButtonFactory

java.lang.Object
  |
  +--com.amoebacode.blackjack.display.button.ButtonFactory

public abstract class ButtonFactory
extends java.lang.Object

ButtonFactory handles initial creation of all user buttons.

Version:
0.9
Author:
Jason Gurney

Field Summary
protected static java.lang.String DEAL_BUTTON_TEXT
          The text for the deal button
static java.lang.String DOUBLE_DOWN_BUTTON_TEXT
          The text for the double down button
static java.lang.String HIT_BUTTON_TEXT
          The text for the hit button
static java.lang.String INSURANCE_BUTTON_TEXT
          The text for the buy insurance button
protected static java.lang.String LOWER_BET_BUTTON_TEXT
          The text for the lower bet button
static java.lang.String NO_INSURANCE_BUTTON_TEXT
          The text for the no insurance button
protected static java.lang.String OPTIONS_BUTTON_TEXT
          The text for the house rules button
protected static java.lang.String PREFERENCES_BUTTON_TEXT
          The text for the preferences button
protected static java.lang.String RAISE_BET_BUTTON_TEXT
          The text for the raise bet button
protected static java.lang.String SAVE_OPTIONS_BUTTON_TEXT
          The text for the save rules button
protected static java.lang.String SAVE_PREFERENCES_BUTTON_TEXT
          The text for the save preferences button
protected static java.lang.String SHUFFLE_BUTTON_TEXT
          The text for the shuffle button
static java.lang.String SPLIT_BUTTON_TEXT
          The text for the split button
static java.lang.String STAND_BUTTON_TEXT
          The text for the stand button
static java.lang.String SURRENDER_BUTTON_TEXT
          The text for the surrender button
 
Constructor Summary
ButtonFactory()
           
 
Method Summary
static DealButton getDealButton(GameDisplay game)
          Creates and returns a deal button.
static DoubleDownButton getDoubleDownButton(PlayerHandDisplay playerHand)
          Creates and returns a double down button.
static HitButton getHitButton(PlayerHandDisplay playerHand)
          Creates and returns a hit button.
static InsuranceButton getInsuranceButton(PlayerHandDisplay playerHand)
          Creates and returns a buy insurance button.
static LowerBetButton getLowerBetButton(GameDisplay game)
          Creates and returns a lower bet button.
static NoInsuranceButton getNoInsuranceButton(PlayerHandDisplay playerHand)
          Creates and returns a no insurance button.
static OptionsButton getOptionsButton(GameDisplay game)
          Creates and returns a house rules button.
static PreferencesButton getPreferencesButton(GameDisplay game)
          Creates and returns a preferences button.
static RaiseBetButton getRaiseBetButton(GameDisplay game)
          Creates and returns a raise bet button.
static SaveOptionsButton getSaveOptionsButton(GameDisplay game)
          Creates and returns a save house rules button.
static SavePreferencesButton getSavePreferencesButton(GameDisplay game)
          Creates and returns a save preferences button.
static ShuffleButton getShuffleButton(GameDisplay game)
          Creates and returns a shuffle button.
static SplitButton getSplitButton(PlayerHandDisplay playerHand)
          Creates and returns a split button.
static StandButton getStandButton(PlayerHandDisplay playerHand)
          Creates and returns a stand button.
static SurrenderButton getSurrenderButton(PlayerHandDisplay playerHand)
          Creates and returns a surrender button.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

HIT_BUTTON_TEXT

public static final java.lang.String HIT_BUTTON_TEXT
The text for the hit button

STAND_BUTTON_TEXT

public static final java.lang.String STAND_BUTTON_TEXT
The text for the stand button

DOUBLE_DOWN_BUTTON_TEXT

public static final java.lang.String DOUBLE_DOWN_BUTTON_TEXT
The text for the double down button

SURRENDER_BUTTON_TEXT

public static final java.lang.String SURRENDER_BUTTON_TEXT
The text for the surrender button

SPLIT_BUTTON_TEXT

public static final java.lang.String SPLIT_BUTTON_TEXT
The text for the split button

INSURANCE_BUTTON_TEXT

public static final java.lang.String INSURANCE_BUTTON_TEXT
The text for the buy insurance button

NO_INSURANCE_BUTTON_TEXT

public static final java.lang.String NO_INSURANCE_BUTTON_TEXT
The text for the no insurance button

DEAL_BUTTON_TEXT

protected static final java.lang.String DEAL_BUTTON_TEXT
The text for the deal button

LOWER_BET_BUTTON_TEXT

protected static final java.lang.String LOWER_BET_BUTTON_TEXT
The text for the lower bet button

OPTIONS_BUTTON_TEXT

protected static final java.lang.String OPTIONS_BUTTON_TEXT
The text for the house rules button

PREFERENCES_BUTTON_TEXT

protected static final java.lang.String PREFERENCES_BUTTON_TEXT
The text for the preferences button

RAISE_BET_BUTTON_TEXT

protected static final java.lang.String RAISE_BET_BUTTON_TEXT
The text for the raise bet button

SAVE_OPTIONS_BUTTON_TEXT

protected static final java.lang.String SAVE_OPTIONS_BUTTON_TEXT
The text for the save rules button

SAVE_PREFERENCES_BUTTON_TEXT

protected static final java.lang.String SAVE_PREFERENCES_BUTTON_TEXT
The text for the save preferences button

SHUFFLE_BUTTON_TEXT

protected static final java.lang.String SHUFFLE_BUTTON_TEXT
The text for the shuffle button
Constructor Detail

ButtonFactory

public ButtonFactory()
Method Detail

getDealButton

public static DealButton getDealButton(GameDisplay game)
Creates and returns a deal button.
Parameters:
game - the GameDisplay parent
Returns:
a new DealButton

getShuffleButton

public static ShuffleButton getShuffleButton(GameDisplay game)
Creates and returns a shuffle button.
Parameters:
game - the GameDisplay parent
Returns:
a new ShuffleButton

getOptionsButton

public static OptionsButton getOptionsButton(GameDisplay game)
Creates and returns a house rules button.
Parameters:
game - the GameDisplay parent
Returns:
a new OptionsButton

getPreferencesButton

public static PreferencesButton getPreferencesButton(GameDisplay game)
Creates and returns a preferences button.
Parameters:
game - the GameDisplay parent
Returns:
a new PreferencesButton

getRaiseBetButton

public static RaiseBetButton getRaiseBetButton(GameDisplay game)
Creates and returns a raise bet button.
Parameters:
game - the GameDisplay parent
Returns:
a new RaiseBetButton

getLowerBetButton

public static LowerBetButton getLowerBetButton(GameDisplay game)
Creates and returns a lower bet button.
Parameters:
game - the GameDisplay parent
Returns:
a new LowerBetButton

getSaveOptionsButton

public static SaveOptionsButton getSaveOptionsButton(GameDisplay game)
Creates and returns a save house rules button.
Parameters:
game - the GameDisplay parent
Returns:
a new SaveOptionsButton

getSavePreferencesButton

public static SavePreferencesButton getSavePreferencesButton(GameDisplay game)
Creates and returns a save preferences button.
Parameters:
game - the GameDisplay parent
Returns:
a new SavePreferencesButton

getHitButton

public static HitButton getHitButton(PlayerHandDisplay playerHand)
Creates and returns a hit button.
Parameters:
playerHand - the PlayerHandDisplay parent
Returns:
a new HitButton

getStandButton

public static StandButton getStandButton(PlayerHandDisplay playerHand)
Creates and returns a stand button.
Parameters:
playerHand - the PlayerHandDisplay parent
Returns:
a new StandButton

getDoubleDownButton

public static DoubleDownButton getDoubleDownButton(PlayerHandDisplay playerHand)
Creates and returns a double down button.
Parameters:
playerHand - the PlayerHandDisplay parent
Returns:
a new DoubleDownButton

getSplitButton

public static SplitButton getSplitButton(PlayerHandDisplay playerHand)
Creates and returns a split button.
Parameters:
playerHand - the PlayerHandDisplay parent
Returns:
a new SplitButton

getSurrenderButton

public static SurrenderButton getSurrenderButton(PlayerHandDisplay playerHand)
Creates and returns a surrender button.
Parameters:
playerHand - the PlayerHandDisplay parent
Returns:
a new SurrenderButton

getInsuranceButton

public static InsuranceButton getInsuranceButton(PlayerHandDisplay playerHand)
Creates and returns a buy insurance button.
Parameters:
playerHand - the PlayerHandDisplay parent
Returns:
a new InsuranceButton

getNoInsuranceButton

public static NoInsuranceButton getNoInsuranceButton(PlayerHandDisplay playerHand)
Creates and returns a no insurance button.
Parameters:
playerHand - the PlayerHandDisplay parent
Returns:
a new NoInsuranceButton

Blackjack

Copyright © 2002 amoebacode.com.