|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.asdf.plugins.pokergames.gameview.GameViewButtonPanel
public class GameViewButtonPanel
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.BaselineResizeBehavior |
Field Summary | |
---|---|
PokerGameTypes |
gametype
|
Fields inherited from class javax.swing.JComponent |
---|
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
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 | |
---|---|
GameViewButtonPanel(PokerGameTypes game,
javax.swing.JLayeredPane table)
Creates button panel of given gametype (poker only atm) |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Actionhandler that makes sure that only one or none is selected from waitgrid. |
void |
sendActionLeaveToController(boolean closetable)
Sends leaveaction to controller. |
void |
sendActionToController(int action)
Sends action to controller. |
void |
sendRaiseToController(double amount)
Sends raiseaction to controller with given amount of money. |
void |
sendSitOutToController(GameViewCheckBoxPanel gcbp)
Sends sitout action to controller and clears autositout checkbox for comeback |
void |
setAllHidden()
hides all components from button panel. |
void |
setBetAndPot(double bet_,
double pot_)
Sets values to bot and bet |
void |
setBetMenuSize(int x,
int y)
Moves betmenu (if any) to southeast corner of given cordinates. |
void |
setController(PokerGameController pgc)
Sets controller to this buttonpanel and clears GUI. |
void |
setDiscardButton()
Sets discard button panel. |
void |
setMuckButtons()
Sets muck buttons. |
void |
setPokerButtons(double amounttocall,
double pot,
double bank,
double amountraisable,
double minraise)
Sets actionbuttons CHECK, FOLD, CALL, RAISE and activates betmenu. |
void |
setPostBlindButtons()
Sets post blind buttons. |
void |
setSitOutButton()
Sets sitout button panel. |
void |
setWaitGrid(double amttocall,
double amtraisable,
double minraise,
double bank)
Sets predefined-action grid for current gamesituation. |
void |
updateWaitGrid(double minraise,
double amttocall,
double bank)
Unvalidate options from grid that are no longer valid because of changed gamesituation. |
void |
updateX()
|
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public PokerGameTypes gametype
Constructor Detail |
---|
public GameViewButtonPanel(PokerGameTypes game, javax.swing.JLayeredPane table)
game
- GameTypetable
- JLayeredpane to attach possible betmenu.Method Detail |
---|
public void updateX()
public void setBetMenuSize(int x, int y)
public void setController(PokerGameController pgc)
public void sendSitOutToController(GameViewCheckBoxPanel gcbp)
gcbp
- Panel where autositout checkbox is located.public void sendRaiseToController(double amount)
amount
- Amount of money raised.public void sendActionLeaveToController(boolean closetable)
closetable
- Do we close remove controller too.public void sendActionToController(int action)
action
- Action that we want to send.public void setAllHidden()
public void setBetAndPot(double bet_, double pot_)
bet_
- Current bet value.pot_
- Current pot value.public void setDiscardButton()
public void setSitOutButton()
public void setPostBlindButtons()
public void setMuckButtons()
public void setPokerButtons(double amounttocall, double pot, double bank, double amountraisable, double minraise)
amounttocall
- How much player has to pay to call.pot
- Pot size.bank
- Players bankroll.amountraisable
- Howmuch is it possible for this player to raise.minraise
- Minimum raise.public void updateWaitGrid(double minraise, double amttocall, double bank)
minraise
- Minimumraise.amttocall
- Amount to call.bank
- Players Bankroll.public void setWaitGrid(double amttocall, double amtraisable, double minraise, double bank)
amttocall
- amtraisable
- minraise
- bank
- public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |