コード例 #1
0
ファイル: CanvasDrawView.java プロジェクト: hikerlive/code4me
 public void surfaceDestroyed(SurfaceHolder arg0) {
   boolean retry = true;
   canvasThread.setRunning(false);
   while (retry) {
     try {
       canvasThread.join();
       retry = false;
     } catch (InterruptedException e) {
       e.printStackTrace();
     }
   }
 }
コード例 #2
0
ファイル: Panel.java プロジェクト: DaBizmonkey/BlackJackTest
 public void surfaceDestroyed(SurfaceHolder holder) {
   // TODO Auto-generated method stub
   boolean retry = true;
   canvasthread.setRunning(false);
   while (retry) {
     try {
       canvasthread.join();
       retry = false;
     } catch (InterruptedException e) {
       // we will try it again and again...
     }
   }
 }
コード例 #3
0
 public void setDrawPriority(int drawPriority) {
   if (drawPriority >= 0 && drawPriority <= 10) {
     this.drawPriority = drawPriority;
     if (mainLoop != null) {
       try {
         mainLoop.setPriority(drawPriority);
       } catch (Exception e) {
       }
     }
   }
 }
コード例 #4
0
 public final Bitmap getImage() {
   if (handler != null
       && !LSystem.AUTO_REPAINT
       && handler.getRepaintMode() == Screen.SCREEN_NOT_REPAINT) {
     return currentScreen;
   } else {
     if (mainLoop != null) {
       mainLoop.updateCapture(currentScreen);
     }
     return currentScreen;
   }
 }
コード例 #5
0
  private void stopThread() {
    try {
      if (mainLoop != null) {
        boolean result = true;
        setRunning(false);
        while (result) {
          try {
            mainLoop.join();
            result = false;
          } catch (InterruptedException e) {
          }
        }
      }
    } catch (Exception e) {

    }
  }
コード例 #6
0
ファイル: CanvasDrawView.java プロジェクト: hikerlive/code4me
 public void startDrawImage() {
   canvasThread.setRunning(true);
   canvasThread.start();
 }
コード例 #7
0
ファイル: Panel.java プロジェクト: DaBizmonkey/BlackJackTest
 public void surfaceCreated(SurfaceHolder holder) {
   // TODO Auto-generated method stub
   canvasthread.setRunning(true);
   canvasthread.start();
 }