001        package com.croftsoft.apps.jogl;
002         
003        import com.croftsoft.apps.jogl.JoglMoveState.EnumDirection;
004    
005        /***********************************************************************
006        * Request to move in a given direction.
007        * 
008        * @version
009        *   $Id: JoglMoveRequest.java,v 1.2 2008/02/18 20:54:46 croft Exp $
010        * @since
011        *   2008-02-10
012        * @author
013        *   <a href="https://www.croftsoft.com/">David Wallace Croft</a>
014        ***********************************************************************/
015    
016        public final class  JoglMoveRequest
017          extends JoglMessage
018        ////////////////////////////////////////////////////////////////////////
019        ////////////////////////////////////////////////////////////////////////
020        {
021          
022        private final JoglMoveState  joglMoveState;
023          
024        ////////////////////////////////////////////////////////////////////////
025        ////////////////////////////////////////////////////////////////////////
026         
027        public JoglMoveRequest ( )
028        ////////////////////////////////////////////////////////////////////////
029        {
030          super ( JoglMessage.Type.MOVE_REQUEST );
031          
032          joglMoveState = new JoglMoveState ( );
033        }
034        
035        ////////////////////////////////////////////////////////////////////////
036        ////////////////////////////////////////////////////////////////////////
037        
038        public void  clear ( )
039        ////////////////////////////////////////////////////////////////////////
040        {
041          joglMoveState.clear ( );
042        }
043        
044        public boolean  get ( final EnumDirection  enumDirection )
045        ////////////////////////////////////////////////////////////////////////
046        {
047          return joglMoveState.get ( enumDirection );
048        }
049        
050        public void  set (
051          final EnumDirection  enumDirection,
052          final boolean        flag )
053        ////////////////////////////////////////////////////////////////////////
054        {
055          joglMoveState.set ( enumDirection, flag );
056        }
057          
058        ////////////////////////////////////////////////////////////////////////
059        ////////////////////////////////////////////////////////////////////////
060        }