|
JSettlers v1.0.6 API Built ${date} |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
soc.client.SOCHandPanel
This panel displays a player's information. If the player is us, then more information is displayed than in another player's hand panel.
Nested Class Summary |
Nested classes inherited from class java.awt.Panel |
java.awt.Panel.AccessibleAWTPanel |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
protected static java.lang.String |
BANK
|
protected java.awt.Button |
bankBut
|
protected static java.lang.String |
CARD
|
protected java.awt.List |
cardList
|
static int |
CITIES
|
protected java.awt.Label |
cityLab
|
protected ColorSquare |
citySq
|
static int |
CLAY
|
protected java.awt.Label |
clayLab
|
protected ColorSquare |
claySq
|
protected static java.lang.String |
CLEAR
|
protected java.awt.Button |
clearBut
|
protected SOCPlayerClient |
client
|
protected java.awt.Label |
developmentLab
|
protected ColorSquare |
developmentSq
|
protected static java.lang.String |
DONE
|
protected java.awt.Button |
doneBut
|
protected SOCFaceButton |
faceImg
|
protected SOCGame |
game
|
protected static java.lang.String |
GET
|
protected java.awt.Label |
getLab
|
protected static java.lang.String |
GIVE
|
protected java.awt.Label |
giveLab
|
protected boolean |
inPlay
|
protected boolean |
interactive
When this flag is true, the panel is interactive. |
protected java.awt.Label |
knightsLab
|
protected ColorSquare |
knightsSq
|
static int |
LARGESTARMY
|
protected java.awt.Label |
larmyLab
|
protected static java.lang.String |
LOCKSEAT
|
static int |
LONGESTROAD
|
protected java.awt.Label |
lroadLab
|
static int |
NUMDEVCARDS
|
static int |
NUMKNIGHTS
|
static int |
NUMRESOURCES
|
protected TradeOfferPanel |
offer
|
static int |
ORE
|
protected java.awt.Label |
oreLab
|
protected ColorSquare |
oreSq
|
protected java.awt.Button |
playCardBut
|
protected SOCPlayer |
player
|
protected SOCPlayerInterface |
playerInterface
|
protected ColorSquare[] |
playerSend
|
protected int[] |
playerSendMap
|
protected java.awt.Label |
pname
|
protected static java.lang.String |
QUIT
|
protected java.awt.Button |
quitBut
|
protected java.awt.Label |
resourceLab
|
protected ColorSquare |
resourceSq
|
protected java.awt.Label |
roadLab
|
static int |
ROADS
|
protected ColorSquare |
roadSq
|
protected static java.lang.String |
ROBOT
|
protected java.awt.Button |
robotBut
|
protected static java.lang.String |
ROLL
|
protected java.awt.Button |
rollBut
|
protected java.awt.Button |
seatLockBut
|
protected static java.lang.String |
SEND
|
protected java.awt.Button |
sendBut
|
protected java.awt.Label |
settlementLab
|
static int |
SETTLEMENTS
|
protected ColorSquare |
settlementSq
|
static int |
SHEEP
|
protected java.awt.Label |
sheepLab
|
protected ColorSquare |
sheepSq
|
protected static java.lang.String |
SIT
|
protected java.awt.Button |
sitBut
|
protected SquaresPanel |
sqPanel
|
protected static java.lang.String |
START
|
protected java.awt.Button |
startBut
|
protected static java.lang.String |
TAKEOVER
|
protected java.awt.Button |
takeOverBut
|
protected static java.lang.String |
UNLOCKSEAT
|
static int |
VICTORYPOINTS
|
protected java.awt.Label |
vpLab
|
protected ColorSquare |
vpSq
|
static int |
WHEAT
|
protected java.awt.Label |
wheatLab
|
protected ColorSquare |
wheatSq
|
static int |
WOOD
|
protected java.awt.Label |
woodLab
|
protected ColorSquare |
woodSq
|
protected static int[] |
zero
|
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 | |
SOCHandPanel(SOCPlayerInterface pi,
SOCPlayer pl)
make a new hand panel |
|
SOCHandPanel(SOCPlayerInterface pi,
SOCPlayer pl,
boolean in)
make a new hand panel |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
handle interaction |
void |
addPlayer(java.lang.String name)
DOCUMENT ME! |
void |
addRobotButton()
DOCUMENT ME! |
void |
addSeatLockBut()
DOCUMENT ME! |
void |
addSitButton()
DOCUMENT ME! |
void |
addTakeOverBut()
DOCUMENT ME! |
void |
changeFace(int id)
Change the face image |
void |
clearOffer()
DOCUMENT ME! |
void |
clearTradeMsg()
DOCUMENT ME! |
protected void |
creation(SOCPlayerInterface pi,
SOCPlayer pl,
boolean in)
Stuff to do when a SOCHandPanel is created |
void |
doLayout()
DOCUMENT ME! |
SOCPlayerClient |
getClient()
|
SOCGame |
getGame()
|
SOCPlayer |
getPlayer()
|
SOCPlayerInterface |
getPlayerInterface()
|
void |
rejectOffer()
DOCUMENT ME! |
void |
removePlayer()
remove this player |
void |
removeRobotBut()
DOCUMENT ME! |
void |
removeSeatLockBut()
DOCUMENT ME! |
void |
removeSitBut()
DOCUMENT ME! |
void |
removeStartBut()
Internal mechanism to remove start button (if visible) and add VP label. |
void |
removeTakeOverBut()
DOCUMENT ME! |
protected void |
setLArmy(boolean haveIt)
turn the "largest army" label on or off |
protected void |
setLRoad(boolean haveIt)
turn the "longest road" label on or off |
void |
updateCurrentOffer()
DOCUMENT ME! |
void |
updateDevCards()
DOCUMENT ME! |
void |
updateSeatLockButton()
update the seat lock button so that it allows a player to lock an unlocked seat and vice versa |
void |
updateTakeOverButton()
update the takeover button so that it only allows takover when it's not the robot's turn |
void |
updateValue(int vt)
update the value of a player element |
Methods inherited from class java.awt.Panel |
addNotify, getAccessibleContext |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int ROADS
public static final int SETTLEMENTS
public static final int CITIES
public static final int NUMRESOURCES
public static final int NUMDEVCARDS
public static final int NUMKNIGHTS
public static final int VICTORYPOINTS
public static final int LONGESTROAD
public static final int LARGESTARMY
public static final int CLAY
public static final int ORE
public static final int SHEEP
public static final int WHEAT
public static final int WOOD
protected static final int[] zero
protected static final java.lang.String SIT
protected static final java.lang.String START
protected static final java.lang.String ROBOT
protected static final java.lang.String TAKEOVER
protected static final java.lang.String LOCKSEAT
protected static final java.lang.String UNLOCKSEAT
protected static final java.lang.String ROLL
protected static final java.lang.String QUIT
protected static final java.lang.String DONE
protected static final java.lang.String CLEAR
protected static final java.lang.String SEND
protected static final java.lang.String BANK
protected static final java.lang.String CARD
protected static final java.lang.String GIVE
protected static final java.lang.String GET
protected java.awt.Button sitBut
protected java.awt.Button robotBut
protected java.awt.Button startBut
protected java.awt.Button takeOverBut
protected java.awt.Button seatLockBut
protected SOCFaceButton faceImg
protected java.awt.Label pname
protected java.awt.Label vpLab
protected ColorSquare vpSq
protected java.awt.Label larmyLab
protected java.awt.Label lroadLab
protected ColorSquare claySq
protected ColorSquare oreSq
protected ColorSquare sheepSq
protected ColorSquare wheatSq
protected ColorSquare woodSq
protected java.awt.Label clayLab
protected java.awt.Label oreLab
protected java.awt.Label sheepLab
protected java.awt.Label wheatLab
protected java.awt.Label woodLab
protected ColorSquare settlementSq
protected ColorSquare citySq
protected ColorSquare roadSq
protected java.awt.Label settlementLab
protected java.awt.Label cityLab
protected java.awt.Label roadLab
protected ColorSquare resourceSq
protected java.awt.Label resourceLab
protected ColorSquare developmentSq
protected java.awt.Label developmentLab
protected ColorSquare knightsSq
protected java.awt.Label knightsLab
protected java.awt.List cardList
protected java.awt.Button playCardBut
protected SquaresPanel sqPanel
protected java.awt.Label giveLab
protected java.awt.Label getLab
protected java.awt.Button sendBut
protected java.awt.Button clearBut
protected java.awt.Button bankBut
protected ColorSquare[] playerSend
protected java.awt.Button rollBut
protected java.awt.Button doneBut
protected java.awt.Button quitBut
protected SOCPlayerInterface playerInterface
protected SOCPlayerClient client
protected SOCGame game
protected SOCPlayer player
protected boolean inPlay
protected int[] playerSendMap
protected TradeOfferPanel offer
protected boolean interactive
Constructor Detail |
public SOCHandPanel(SOCPlayerInterface pi, SOCPlayer pl, boolean in)
pi
- the interface that this panel is a part ofpl
- the player associated with this panelin
- the interactive flag settingpublic SOCHandPanel(SOCPlayerInterface pi, SOCPlayer pl)
pi
- the interface that this panel is a part ofpl
- the player associated with this panelMethod Detail |
protected void creation(SOCPlayerInterface pi, SOCPlayer pl, boolean in)
pi
- player interfacepl
- the player datain
- the interactive flag settingpublic SOCPlayerInterface getPlayerInterface()
public SOCPlayer getPlayer()
public SOCPlayerClient getClient()
public SOCGame getGame()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public void addSeatLockBut()
public void addTakeOverBut()
public void addSitButton()
public void addRobotButton()
public void changeFace(int id)
id
- the id of the imagepublic void removePlayer()
public void addPlayer(java.lang.String name)
name
- DOCUMENT ME!public void updateDevCards()
public void removeSeatLockBut()
public void removeTakeOverBut()
public void removeSitBut()
public void removeRobotBut()
public void removeStartBut()
public void updateCurrentOffer()
public void rejectOffer()
public void clearTradeMsg()
public void clearOffer()
public void updateTakeOverButton()
public void updateSeatLockButton()
protected void setLArmy(boolean haveIt)
haveIt
- true if this player has the largest armyprotected void setLRoad(boolean haveIt)
haveIt
- true if this player has the longest roadpublic void updateValue(int vt)
vt
- the type of valuepublic void doLayout()
|
JSettlers v1.0.6 API Built ${date} |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |