|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Canvas | +--ks.client.gamefactory.PlayerRanking
Field Summary | |
protected int |
barHeight
|
protected int[] |
gamesWon
num Games Won (no more than six players per table) |
static int |
maxNameSize
Maximum name size. |
protected int |
nameOffset
|
protected int |
nameWidth
Default visual parameters |
int |
numPlayers
The number of players in the game. |
protected int |
padding
|
protected java.lang.String[] |
players
User info (no more than six players per table) |
protected int[] |
points
points info (no more than six players per table) |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
PlayerRanking()
PlayerRanking constructor comment. |
|
PlayerRanking(int width,
int height)
PlayerRanking constructor. |
Method Summary | |
void |
addUser(java.lang.String name)
Add to this display the player with specific name. |
int |
getBarHeight()
Return the height of each bar showing player scores. |
int |
getNameOffset()
Return the offset where players' names can be drawn. |
int |
getNameWidth()
Return the width (in pixels) of each player's name Creation date: (9/25/01 10:29:35 PM) |
int |
getNumPlayers()
Return the number of players. |
int |
getPadding()
Return the padding between player name and score Creation date: (9/25/01 10:54:54 PM) |
void |
paint(java.awt.Graphics g)
Paint this object. |
void |
removeUser(java.lang.String name)
Remove user from display Creation date: (9/25/01 9:29:43 PM) |
void |
setBarHeight(int newBarHeight)
Set the height of each bar. |
void |
setNameOffset(int newNameOffset)
Set the offset for names. |
void |
setNameWidth(int newNameWidth)
Set the allowed width for each name. |
void |
setPadding(int newPadding)
Set the padding to use between name and scores. |
protected void |
sortPlayers()
Sort all players in reverse order. |
void |
updatePlayerInfo(java.lang.String name,
int numHandsWon,
int points)
Update the points for this player, including points (accumulated), number of hands won. |
Methods inherited from class java.awt.Canvas |
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, update |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.lang.String[] players
protected int[] points
protected int[] gamesWon
public int numPlayers
public static final int maxNameSize
protected int nameWidth
protected int nameOffset
protected int barHeight
protected int padding
Constructor Detail |
public PlayerRanking()
public PlayerRanking(int width, int height)
Method Detail |
public void addUser(java.lang.String name)
name
- java.lang.Stringpublic int getBarHeight()
public int getNameOffset()
public int getNameWidth()
public int getNumPlayers()
public int getPadding()
public void paint(java.awt.Graphics g)
paint
in class java.awt.Canvas
g
- java.awt.Graphicspublic void removeUser(java.lang.String name)
name
- java.lang.Stringpublic void setBarHeight(int newBarHeight)
newBarHeight
- intpublic void setNameOffset(int newNameOffset)
newNameOffset
- intpublic void setNameWidth(int newNameWidth)
newNameWidth
- intpublic void setPadding(int newPadding)
newPadding
- intprotected void sortPlayers()
public void updatePlayerInfo(java.lang.String name, int numHandsWon, int points)
name
- java.lang.StringnumHandsWon
- intpoints
- int
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |