org.xistrat.gui.d3
Class GameBehavior

java.lang.Object
  extended by javax.media.j3d.SceneGraphObject
      extended by javax.media.j3d.Node
          extended by javax.media.j3d.Leaf
              extended by javax.media.j3d.Behavior
                  extended by org.xistrat.gui.d3.ClickBehavior
                      extended by org.xistrat.gui.d3.GameBehavior

public class GameBehavior
extends ClickBehavior

used to pick-select a face (or chess piece for that game family) (might be replaced by using PickMouseBehavior class)

Since:
0.5.42
See Also:
ID

Field Summary
static int MARK
           
static int MOVE
           
static int NOTHING
           
static int PUT
           
static int REMOVE
           
static int SELECT
           
 
Fields inherited from class javax.media.j3d.Node
ALLOW_AUTO_COMPUTE_BOUNDS_READ, ALLOW_AUTO_COMPUTE_BOUNDS_WRITE, ALLOW_BOUNDS_READ, ALLOW_BOUNDS_WRITE, ALLOW_COLLIDABLE_READ, ALLOW_COLLIDABLE_WRITE, ALLOW_LOCAL_TO_VWORLD_READ, ALLOW_LOCALE_READ, ALLOW_PARENT_READ, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING
 
Method Summary
 void afterMove()
          remote (or me) done s.th., so do it in graphical display now
 void afterMove(int index, FigurData figData)
          remote (or me) done s.th., so do it in graphical display now
 void afterPut(StonesBean stonesBean)
          remote (or me) done s.th., so do it in graphical display now
 void afterRemove(StonesBean stonesBean)
          remote (or me) done s.th., so do it in graphical display now
 void setID(int id)
          you are only allowed to touch your own 'figs' (pieces)!
 void setMode(int mode)
           
 void shiftClicked(int pos)
          a shift click in all game families
 void shiftClickedChess(int pos)
          may be selecting, may be a move done by user so it does some client - side rule checking in order to try to understand what the user wants
 void shiftClickedGo(int pos)
          Go user clicking
(may be putting a stone, in the end removing dead stones, or setting marks in analysis)
 
Methods inherited from class org.xistrat.gui.d3.ClickBehavior
ctrlClicked, initialize, processStimulus
 
Methods inherited from class javax.media.j3d.Behavior
getEnable, getNumSchedulingIntervals, getSchedulingBoundingLeaf, getSchedulingBounds, getSchedulingInterval, getView, getWakeupCondition, postId, setEnable, setSchedulingBoundingLeaf, setSchedulingBounds, setSchedulingInterval, updateNodeReferences, wakeupOn
 
Methods inherited from class javax.media.j3d.Node
cloneNode, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, duplicateNode, getBounds, getBoundsAutoCompute, getCollidable, getLocale, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable
 
Methods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SELECT

public static final int SELECT
See Also:
Constant Field Values

MOVE

public static final int MOVE
See Also:
Constant Field Values

NOTHING

public static final int NOTHING
See Also:
Constant Field Values

PUT

public static final int PUT
See Also:
Constant Field Values

MARK

public static final int MARK
See Also:
Constant Field Values

REMOVE

public static final int REMOVE
See Also:
Constant Field Values
Method Detail

setMode

public void setMode(int mode)

afterPut

public void afterPut(StonesBean stonesBean)
remote (or me) done s.th., so do it in graphical display now


afterRemove

public void afterRemove(StonesBean stonesBean)
remote (or me) done s.th., so do it in graphical display now


afterMove

public void afterMove(int index,
                      FigurData figData)
remote (or me) done s.th., so do it in graphical display now

Parameters:
index - what 3d shape is to be refreshed

afterMove

public void afterMove()
remote (or me) done s.th., so do it in graphical display now


setID

public void setID(int id)
you are only allowed to touch your own 'figs' (pieces)!


shiftClicked

public void shiftClicked(int pos)
a shift click in all game families

Overrides:
shiftClicked in class ClickBehavior

shiftClickedChess

public void shiftClickedChess(int pos)
may be selecting, may be a move done by user

so it does some client - side rule checking in order to try to understand what the user wants

See Also:
ChessRules.doMove(int, FigurData[], int, int, FastFace, int), ExportData, (float, float, FigurData, int, int, int, int), (FigurData[], Players, int, int)

shiftClickedGo

public void shiftClickedGo(int pos)
Go user clicking
(may be putting a stone, in the end removing dead stones, or setting marks in analysis)