|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--java.awt.Window
|
+--java.awt.Frame
|
+--javax.swing.JFrame
|
+--au.com.solidsoftware.multimahjong.mmc.game.PayoutGUI
The PayoutGUI class is used to display a breakdown of the
scoring information for the winning player's hand, and also the payouts
made to the winner from all losing players.
PayoutInfo,
PayoutGUI,
Game, Serialized Form| Inner Class Summary | |
(package private) class |
PayoutGUI.CustomModel
|
| Inner classes inherited from class javax.swing.JFrame |
javax.swing.JFrame.AccessibleJFrame |
| Inner classes inherited from class java.awt.Component |
java.awt.Component.AWTTreeLock |
| Field Summary | |
private Tile[] |
concealedHand
Concealed Tiles from Special Hands set by the Game
|
private java.lang.String[][] |
doublesScoreData
Contains the double data for the doubles JTable if the winner has an Ordinary Suit Hand. |
private Game |
gameReference
A reference to the game in order to halt the game until the "OK" button of the Payout Window has been clicked. |
private java.lang.String[][] |
groundScoreData
Contains the data which is to be inserted into the JTable containing ground score information for an Ordinary Suit Hand. |
private int |
handLimit
The limit for a hand. |
private int |
IN_PANEL_SEPARATION
Defines the number of pixels separating items contained within panels panels. |
private boolean |
isSpecialHand
Indicates whether the player won with a special hand. |
private java.lang.String[][] |
losingPlayersData
Contains the information concerning all losing players. |
private int |
PANEL_SEPARATION
Defines the number of pixels separating panels contained in the JFrame. |
private java.lang.String |
specialHandDescription
Holds the description of the special hand the player won with if they have a special hand. |
private java.lang.String |
specialHandName
Holds the name of the special hand that the winner won with, if they have a special hand. |
private int |
TILE_SEPARATION
Defines the number of pixels separating the sets of tiles |
private int |
totalGroundScore
Contains the total ground score for the winner's hand if they have an Ordinary Suit Hand. |
private int |
totalNoOfDoubles
Contains the total number of doubles earnt for the winner's hand if they have an Ordinary Suit Hand). |
private int |
totalPayout
Total payout to the winner. |
private int |
totalScore
Holds the total score of the player's hand. |
private java.lang.String |
winnersName
Holds the winner's name. |
private java.lang.String |
winnersWind
Holds the winner's wind. |
| Fields inherited from class javax.swing.JFrame |
accessibleContext,
defaultCloseOperation,
rootPane,
rootPaneCheckingEnabled |
| Fields inherited from class java.awt.Frame |
base,
CROSSHAIR_CURSOR,
DEFAULT_CURSOR,
E_RESIZE_CURSOR,
frameSerializedDataVersion,
HAND_CURSOR,
icon,
ICONIFIED,
mbManagement,
menuBar,
MOVE_CURSOR,
N_RESIZE_CURSOR,
nameCounter,
NE_RESIZE_CURSOR,
NORMAL,
NW_RESIZE_CURSOR,
ownedWindows,
resizable,
S_RESIZE_CURSOR,
SE_RESIZE_CURSOR,
serialVersionUID,
state,
SW_RESIZE_CURSOR,
TEXT_CURSOR,
title,
W_RESIZE_CURSOR,
WAIT_CURSOR,
weakThis |
| Fields inherited from class java.awt.Window |
active,
base,
focusMgr,
inputContext,
nameCounter,
OPENED,
ownedWindowList,
serialVersionUID,
state,
warningString,
weakThis,
windowListener,
windowSerializedDataVersion |
| Fields inherited from class java.awt.Container |
component,
containerListener,
containerSerializedDataVersion,
dispatcher,
layoutMgr,
maxSize,
ncomponents,
serialVersionUID |
| Fields inherited from class java.awt.Component |
actionListenerK,
adjustmentListenerK,
appContext,
assert,
background,
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
changeSupport,
componentListener,
componentListenerK,
componentOrientation,
componentSerializedDataVersion,
containerListenerK,
cursor,
dropTarget,
enabled,
eventMask,
focusListener,
focusListenerK,
font,
foreground,
hasFocus,
height,
incRate,
inputMethodListener,
inputMethodListenerK,
isInc,
isPacked,
itemListenerK,
keyListener,
keyListenerK,
LEFT_ALIGNMENT,
locale,
LOCK,
minSize,
mouseListener,
mouseListenerK,
mouseMotionListener,
mouseMotionListenerK,
name,
nameExplicitlySet,
newEventsOnly,
ownedWindowK,
parent,
peer,
peerFont,
popups,
prefSize,
RIGHT_ALIGNMENT,
serialVersionUID,
textListenerK,
TOP_ALIGNMENT,
valid,
visible,
width,
windowListenerK,
x,
y |
| Constructor Summary | |
(package private) |
PayoutGUI()
|
| Method Summary | |
private javax.swing.JPanel |
CreateInnerLabelPanel(java.lang.String label)
Creates an inner JPanel containing a JLabel. |
private javax.swing.Box |
CreateOrdinarySuitHandBox()
Creates the Box with all Ordinary Suit Hand details. |
private javax.swing.JPanel |
CreatePayoutPanel()
Creates the JPanel which contain all information concerning the payout made to the winning wind. |
void |
CreatePayoutWindow(Set[] concealedSets,
Set[] exposedSets)
Creates the window containg all information concerning the Payout to the winner. |
private javax.swing.JPanel |
CreateScorePanel(Set[] concealedSets,
Set[] exposedSets)
Creates the window containg all information concerning the breakdown of scoring and the payouts for the winning player's hand. |
private javax.swing.Box |
CreateSpecialHandBox()
Creates a Box containing all required special hand info. |
private javax.swing.JPanel |
CreateTablePanel(java.lang.String heading,
java.lang.String[][] tableData,
java.lang.String[] tableHeading)
Creates a JPanel containing a JTable needed to display Payout and Scoring information. |
private javax.swing.JPanel |
drawConcHand(Tile[] concHand)
Handles the drawing of a JPanel containing concealed Tiles. |
private javax.swing.JPanel |
drawTilePanel(Set[] tileArray,
int max)
Draws a JPanel containing ImageIcons for a given set of tiles. |
void |
IsSpecialHand(boolean isSpecHand)
Sets whether of not the hand's a special hand. |
void |
setConcealedHand(Tile[] concealedHand)
Sets the array of Tiles in the player's concealed hand. |
void |
setDoublesScoreInfo(java.lang.String[][] theDoublesScoreData,
int theTotalNoOfDoubles)
Sets information regarding doubles to the ground score of the hand. |
void |
setGameReference(Game theGameReference)
Sets a reference to the Game object. |
void |
setGroundScoreInfo(java.lang.String[][] theGroundScoreData,
int theTotalGroundScore)
Sets the info required when displaying the ground score. |
void |
setPayoutInfo(java.lang.String[][] theLosersData,
java.lang.String theWinnersName,
java.lang.String theWinnersWind,
int theTotalPayout)
Sets the info required for displaying the payout information. |
void |
setScoringInfo(int theTotalScore,
int theLimit)
Sets the total score of the hand. |
void |
setSpecialHandInfo(java.lang.String theSpecialHandName,
java.lang.String theSpecialHandDescription)
Sets the info required for a special hand. |
private javax.swing.JScrollPane |
SpecialHandDescription()
Creates the description of the special hand. |
| Methods inherited from class javax.swing.JFrame |
addImpl,
createRootPane,
createRootPaneException,
frameInit,
getAccessibleContext,
getContentPane,
getDefaultCloseOperation,
getGlassPane,
getJMenuBar,
getLayeredPane,
getRootPane,
isRootPaneCheckingEnabled,
paramString,
processKeyEvent,
processWindowEvent,
setContentPane,
setDefaultCloseOperation,
setGlassPane,
setJMenuBar,
setLayeredPane,
setLayout,
setRootPane,
setRootPaneCheckingEnabled,
update |
| Methods inherited from class java.awt.Frame |
|
| Methods inherited from class java.awt.Window |
addOwnedWindow,
addWindowListener,
applyResourceBundle,
applyResourceBundle,
connectOwnedWindow,
dispatchEventImpl,
dispose,
eventEnabled,
getFocusOwner,
getInputContext,
getLocale,
getOwnedWindows,
getOwner,
getToolkit,
getWarningString,
isActive,
isShowing,
nextFocus,
ownedInit,
pack,
postEvent,
postWindowEvent,
preProcessKeyEvent,
processEvent,
removeOwnedWindow,
removeWindowListener,
setFocusOwner,
setWarningString,
show,
toBack,
toFront,
transferFocus |
| Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
applyOrientation,
countComponents,
deliverEvent,
dispatchEventToSelf,
doLayout,
findComponentAt,
findComponentAt,
getAlignmentX,
getAlignmentY,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents_NoClientCode,
getComponents,
getInsets,
getLayout,
getMaximumSize,
getMinimumSize,
getMouseEventTarget,
getPreferredSize,
getWindow,
insets,
invalidate,
invalidateTree,
isAncestorOf,
layout,
lightweightPrint,
list,
list,
locate,
minimumSize,
paint,
paintComponents,
postsOldMouseEvents,
preferredSize,
print,
printComponents,
printOneComponent,
processContainerEvent,
proxyEnableEvents,
proxyRequestFocus,
remove,
remove,
removeAll,
removeContainerListener,
setFont,
validate,
validateTree |
| Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
addPropertyChangeListener,
addPropertyChangeListener,
areInputMethodsEnabled,
bounds,
checkImage,
checkImage,
coalesceEvents,
contains,
contains,
createImage,
createImage,
disable,
disableEvents,
dispatchEvent,
enable,
enable,
enableEvents,
enableInputMethods,
firePropertyChange,
getBackground,
getBounds,
getBounds,
getColorModel,
getComponentOrientation,
getCursor,
getDropTarget,
getFont_NoClientCode,
getFont,
getFontMetrics,
getForeground,
getGraphics,
getHeight,
getInputMethodRequests,
getLocation,
getLocation,
getLocationOnScreen,
getName,
getNativeContainer,
getParent_NoClientCode,
getParent,
getPeer,
getSize,
getSize,
getToolkitImpl,
getTreeLock,
getWidth,
getWindowForObject,
getX,
getY,
gotFocus,
handleEvent,
hasFocus,
hide,
imageUpdate,
inside,
isDisplayable,
isDoubleBuffered,
isEnabled,
isEnabledImpl,
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,
processMouseEvent,
processMouseMotionEvent,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
removePropertyChangeListener,
removePropertyChangeListener,
repaint,
repaint,
repaint,
repaint,
requestFocus,
reshape,
resize,
resize,
setBackground,
setBounds,
setBounds,
setComponentOrientation,
setCursor,
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,
registerNatives,
wait,
wait,
wait |
| Field Detail |
private final int PANEL_SEPARATION
private final int IN_PANEL_SEPARATION
private final int TILE_SEPARATION
private java.lang.String[][] groundScoreData
private int totalGroundScore
private java.lang.String[][] doublesScoreData
private int totalNoOfDoubles
private java.lang.String specialHandName
private java.lang.String specialHandDescription
private int totalScore
private boolean isSpecialHand
private Game gameReference
private int handLimit
private int totalPayout
private java.lang.String[][] losingPlayersData
private java.lang.String winnersName
private java.lang.String winnersWind
private Tile[] concealedHand
Game
| Constructor Detail |
PayoutGUI()
| Method Detail |
public void setConcealedHand(Tile[] concealedHand)
public void CreatePayoutWindow(Set[] concealedSets,
Set[] exposedSets)
concealedSets - The concealed sets of tiles the winner has in their
hand.exposedSets - The exposed sets of tiles the winner has in their
hand.private javax.swing.JPanel CreatePayoutPanel()
private javax.swing.JPanel CreateScorePanel(Set[] concealedSets,
Set[] exposedSets)
concealedSets - The concealed sets of tiles the winner has in their
hand.exposedSets - The exposed sets of tiles the winner has in their
hand.private javax.swing.Box CreateOrdinarySuitHandBox()
private javax.swing.Box CreateSpecialHandBox()
private javax.swing.JScrollPane SpecialHandDescription()
private javax.swing.JPanel CreateTablePanel(java.lang.String heading,
java.lang.String[][] tableData,
java.lang.String[] tableHeading)
heading - The heading of the inner JPanel to be returned.tableData - The data to be contained within the table.tableHeading - The heading of the JTable.private javax.swing.JPanel CreateInnerLabelPanel(java.lang.String label)
The - JLabel to be added into the new JPanel.
public void setPayoutInfo(java.lang.String[][] theLosersData,
java.lang.String theWinnersName,
java.lang.String theWinnersWind,
int theTotalPayout)
theLosersData - Information concerning the payout from all losing
player to the winner.theWinnersName - The name of the winning player.theWinnersWind - The wind of the winning player.
public void setGroundScoreInfo(java.lang.String[][] theGroundScoreData,
int theTotalGroundScore)
theGroundScoreData - The data to be put into the ground score
JTable.theTotalGroundScore - The total ground score of the hand.
public void setDoublesScoreInfo(java.lang.String[][] theDoublesScoreData,
int theTotalNoOfDoubles)
theDoublesScoreData - The data to be put into the doubles JPanel.theTotalNoOfDoubles - The total number of doubles the player has
earnt.
public void setSpecialHandInfo(java.lang.String theSpecialHandName,
java.lang.String theSpecialHandDescription)
theSpecialHandName - The name of the type of special hand.theSpecialHandDescription - The description of the special hand.public void IsSpecialHand(boolean isSpecHand)
isSpecHand - Indicates whether the hand's a special hand.
public void setScoringInfo(int theTotalScore,
int theLimit)
theTotalScore - The total score for the hand.public void setGameReference(Game theGameReference)
Game object.theGameReference - The reference to the Game object.private javax.swing.JPanel drawConcHand(Tile[] concHand)
Game class. These special hands contain an array of
Tiles, not Sets. They are unique hands and as such can't be handled by
the drawTilePanel method.concHand - - An array of Tiles which the winner has in their
concealed hand.
private javax.swing.JPanel drawTilePanel(Set[] tileArray,
int max)
tileArray - An array of tiles.max - The max elements that the tileArray can contain.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||