Example #1
0
  /** スレッド実行処理です。 */
  public void run() {
    beginThread();
    while (isValidThread()) {
      try {
        if (splashIcons != null) {
          long current = System.currentTimeMillis();
          int index = (int) ((current - baseTimeMillis) / 100) % splashIcons.length;
          getMessageLabel().setIcon(splashIcons[index]);
        } else {
          if (tryFlag) {
            tryFlag = false;
            baseTimeMillis = System.currentTimeMillis();
            loadSplash();
            continue;
          }
        }
        processThread();
        repaint();
        getContents().paintImmediately(getContents().getVisibleRect());

        Thread.sleep(100);
      } catch (Throwable ex) {
        close();
      }
    }
    endThread();
  }
Example #2
0
 // ウィンドウが閉じられたときに終了するようにオーバーライド
 protected void processWindowEvent(WindowEvent e) {
   if (e.getID() == WindowEvent.WINDOW_CLOSING) {
     close();
   }
   super.processWindowEvent(e);
 }
Example #3
0
 /** スプラッシュを終了します。 */
 public void stop() {
   close();
 }