예제 #1
0
  public void destroyApp(boolean unconditional) {
    if (state != STATE_STOPPED) {
      svgAnimator.stop();
      state = STATE_STOPPED;
    }

    svgAnimator = null;
    svgCanvas = null;
    System.gc();
  }
예제 #2
0
  public void keyPressed(int keyCode) {
    if ((keyCode == KEY_PLAY) && (state != STATE_PLAYING)) {
      svgAnimator.play();
      state = STATE_PLAYING;
      System.err.println("PLAYING...");
    }

    if ((keyCode == KEY_PAUSE) && (state == STATE_PLAYING)) {
      svgAnimator.pause();
      state = STATE_PAUSED;
      System.err.println("PAUSED...");
    }

    if ((keyCode == KEY_STOP) && (state != STATE_STOPPED)) {
      svgAnimator.stop();
      svg.setCurrentTime(0);
      state = STATE_STOPPED;
      System.err.println("STOPPED...");
    }
  }