|
|||||||||
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
org.xistrat.gui.XiStratPanel
public class XiStratPanel
XiStratPanel
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.awt.Panel |
---|
java.awt.Panel.AccessibleAWTPanel |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
java.util.LinkedList<FigurData[]> |
_allFig
|
FigurData[] |
_figures
|
java.util.LinkedList<StonesBean> |
allStones
|
StonesBean |
stonesBean
|
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 | |
---|---|
XiStratPanel(F4ClientCore clientCore)
Constructor of a F4 Panel from an Applet. |
|
XiStratPanel(java.awt.Frame f,
F4ClientCore clientCore,
boolean hView)
Constructor of a F4 Panel with default props |
Method Summary | |
---|---|
void |
abort()
|
void |
actionPerformed(java.awt.event.ActionEvent e)
|
void |
buildPlayField(java.lang.String positionID)
clientCore calls this after loginAck by server |
void |
display(int id)
PlayFieldListener Interface implementation |
void |
doBack()
|
void |
doForward()
|
void |
doMove(int from,
int to)
actually do the move, thereby keep track on preceding state, so copy the _figures' array by value (but the single objects are not by value, only by reference) |
void |
doPass()
pass (in normal play as well as in Go remove dead stones phase) |
void |
doPut(int to,
int cont)
|
void |
doRemove(int loc,
int cont)
|
void |
doToEnd()
|
void |
doToStart()
|
void |
doUndo(int num)
|
void |
endModal()
|
F4ClientCore |
getClientCore()
|
FigurData[] |
getFigures()
|
StonesBean |
getStones()
|
void |
handleNewGame(boolean ok,
java.lang.String info)
there has been a possible race condition between this method and setGameList() |
boolean |
isAcceptMove()
|
void |
itemStateChanged(java.awt.event.ItemEvent e)
|
boolean |
loadGame(java.lang.String fightID)
|
void |
logout()
|
void |
lose(java.lang.String winner)
|
void |
pass()
may be pass in the turn-based mode as well as indicating that my 'removing stones' is done from my point of view (the latter may be omitted again when GoRules and/or GoEngine can estimate status of dead stones itself) |
void |
popup()
|
void |
processEvent(java.awt.AWTEvent evt)
AWT EVENT HANDLING |
void |
put(int to)
|
void |
refresh()
|
void |
refresh(int from,
int to)
|
boolean |
savePosition(java.lang.String positionName,
java.lang.String turnOfParty)
|
void |
setData(java.lang.String positionID)
|
void |
setGameList(java.lang.String[] list,
java.lang.String[] position)
interface ClientUI (called by F4ClientCore) |
void |
showErr(java.lang.String error)
|
void |
showMsg(java.lang.String info)
|
void |
startModal()
ModalDialog Interface |
boolean |
startNewGame(java.lang.String name,
java.lang.String positionID,
java.lang.String komi)
|
void |
textValueChanged(java.awt.event.TextEvent e)
|
void |
unPut(int loc)
|
void |
waitForUserMove(boolean waitForMe)
|
void |
waitForUserRemove(boolean removeForMe)
after game over, before game finish, dead stones must be removed manually |
void |
waitForUserUndo(boolean undoForMe)
after victory, engine is nice and makes undo of last 2 elementar moves |
void |
walk(int from,
int to)
|
void |
win()
|
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, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, firePropertyChange, firePropertyChange, firePropertyChange, 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, getMousePosition, 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, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, 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, setMaximumSize, setMinimumSize, setName, setPreferredSize, 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 FigurData[] _figures
public java.util.LinkedList<FigurData[]> _allFig
public StonesBean stonesBean
public java.util.LinkedList<StonesBean> allStones
Constructor Detail |
---|
public XiStratPanel(java.awt.Frame f, F4ClientCore clientCore, boolean hView)
f
- the containing FrameclientCore
- the underliying F4ClientCorepublic XiStratPanel(F4ClientCore clientCore)
clientCore
- the underliying F4ClientCoreMethod Detail |
---|
public void processEvent(java.awt.AWTEvent evt)
processEvent
in class java.awt.Container
public void textValueChanged(java.awt.event.TextEvent e)
textValueChanged
in interface java.awt.event.TextListener
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged
in interface java.awt.event.ItemListener
public void display(int id)
display
in interface ClickListener
public void walk(int from, int to)
walk
in interface PlayFieldListener
public void put(int to)
put
in interface PlayFieldListener
public void pass()
public void unPut(int loc)
unPut
in interface PlayFieldListener
public boolean isAcceptMove()
isAcceptMove
in interface PlayFieldListener
public FigurData[] getFigures()
getFigures
in interface PlayFieldListener
public StonesBean getStones()
getStones
in interface PlayFieldListener
public void startModal()
startModal
in interface ModalDialogOwner
public void endModal()
endModal
in interface ModalDialogOwner
public void popup()
popup
in interface ModalDialogOwner
public void setGameList(java.lang.String[] list, java.lang.String[] position)
setGameList
in interface ClientUI
public void handleNewGame(boolean ok, java.lang.String info)
handleNewGame
in interface ClientUI
public void showMsg(java.lang.String info)
showMsg
in interface ClientUI
public void showErr(java.lang.String error)
showErr
in interface ClientUI
public void setData(java.lang.String positionID)
public void buildPlayField(java.lang.String positionID)
buildPlayField
in interface ClientUI
public void abort()
abort
in interface ClientUI
public void logout()
logout
in interface ClientUI
public void lose(java.lang.String winner)
lose
in interface ClientUI
public void win()
win
in interface ClientUI
public void waitForUserMove(boolean waitForMe)
waitForUserMove
in interface ClientUI
public void waitForUserUndo(boolean undoForMe)
waitForUserUndo
in interface ClientUI
public void waitForUserRemove(boolean removeForMe)
waitForUserRemove
in interface ClientUI
public void refresh()
public void refresh(int from, int to)
public void doMove(int from, int to)
doMove
in interface ClientUI
doUndo(int)
,
refresh()
public void doPut(int to, int cont)
doPut
in interface ClientUI
public void doPass()
doPass
in interface ClientUI
public void doUndo(int num)
doUndo
in interface ClientUI
public void doRemove(int loc, int cont)
doRemove
in interface ClientUI
public void doToStart()
public void doForward()
public void doBack()
public void doToEnd()
public boolean startNewGame(java.lang.String name, java.lang.String positionID, java.lang.String komi)
public F4ClientCore getClientCore()
public boolean loadGame(java.lang.String fightID)
public boolean savePosition(java.lang.String positionName, java.lang.String turnOfParty)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |