public void run()
	{
        requestScreenParam();
        
		while(true)
		{
			try
			{
				int command = is.read();
				switch(command)
				{
				case RoboProtocol.SCREEN_ADJUSTMENT_END: screenAdjustmentEnd(true);  break;
                case RoboProtocol.SCREEN_RESPONSE_PART:  screenAdjustmentEnd(false); break;
                case RoboProtocol.SCREEN_NOP:            screenNop();                break;
                case RoboProtocol.SCREEN_PARAM_RESPONSE: screenParam();              break;
                case RoboProtocol.SCREEN_COLOR_MODEL:    screenColorModel();         break;
                case RoboProtocol.CONNECTION_CLOSED:     roboClient.window.close();  return;
                default:
                    RoboClient.log("Unknown command " + command);
                    break;
                }
			}
			catch(Exception e)
			{
				RoboClient.log(e);
				break;
			}
        }
    }