/* (非 Javadoc)
   * @see org.eclipse.jface.dialogs.DialogPage#setVisible(boolean)
   * ページがアクティブになった時に通る
   */
  public void setVisible(boolean visible) {

    // 前画面までを取得
    wizard = (WareWolfWizard) getWizard();
    wizard.setCurrentPageNum(4);

    // 初回時以外は再描画
    if (!this.isFirst && composite != null) {
      this.composite.dispose();
      this.createControl(this.parent);
      this.parent.layout();
    }

    this.isFirst = false;

    // 前画面から遷移してきた場合、リスト出力
    if (wizard.getBeforePageNum() == 3) {

      // リスト出力
      this.outputGameStartFile();

      // テキストセット
      this.setAnnounceText();
    }

    setPageComplete(true);
    super.setVisible(visible);
  }
 /** 配役決定アナウンス文をテキストにセットする */
 private void setAnnounceText() {
   String announce = "配役が決定しました。" + StringUtil.LINE_CODE;
   announce += "●配役:" + wizard.getCastName() + StringUtil.LINE_CODE;
   announce += "●参加者:" + StringUtil.LINE_CODE;
   for (Player role : wizard.getRoleList()) {
     announce +=
         StringUtil.FULL_WIDTH_SPACE
             + role.getCharacter().getCharacterName()
             + StringUtil.LINE_CODE;
   }
   announce += StringUtil.LINE_CODE + "ただいまよりキャラクター・役職の告知、および役職実行を行います。\r\n個別skypeでの連絡をお待ちください。";
   this.announceText.setText(announce);
 }
  /** ゲーム開始アナウンス用ファイルを出力する */
  private void outputGameStartFile() {

    // 選択された配役
    Cast cast = wizard.getCastModel();

    // 選択された難易度
    DifficultyEnum difficulty = wizard.getDifficultyEnum();

    // 告知コピペ文作成
    ArrayList<String> announceList =
        WareWolfAnnounceFactory.createStartBeforeAnnounce(wizard.getRoleList(), cast, difficulty);

    // 全てのゲーム設定が完了したら、コピペ用のビューを表示させる
    System.out.println("");

    // とりあえずファイルに出力してみる
    Util.outputFileStrList(announceList, path);
  }