()
| 150 | } |
| 151 | |
| 152 | private GUIHistory getGUIHistory() throws Exception { |
| 153 | // 環境変数RESTORE_HISTORYで指定されている場合promptせずに起動 |
| 154 | String restoreHistoryEnv = System.getenv("RESTORE_HISTORY"); |
| 155 | if (restoreHistoryEnv != null) { |
| 156 | |
| 157 | if (restoreHistoryEnv.matches("(?i)(true|yes|y|restore)")) { |
| 158 | |
| 159 | return GUIHistory.restoreLastInstance(this); |
| 160 | } else if (restoreHistoryEnv.matches("(?i)(false|no|n|drop)")) { |
| 161 | |
| 162 | return GUIHistory.getInstance(this); |
| 163 | } |
| 164 | } |
| 165 | |
| 166 | // 環境変数RESTORE_HISTORYで指定されていなかった場合Historyをrestoreするか聞く |
| 167 | int restoreHistory = JOptionPane.showConfirmDialog(this, |
| 168 | I18nString.get("Do you want to load the previous packet data?"), |
| 169 | I18nString.get("Loading previous packet data"), YES_NO_OPTION); |
| 170 | if (restoreHistory == YES_NO_OPTION) { |
| 171 | |
| 172 | return GUIHistory.restoreLastInstance(this); |
| 173 | } else { |
| 174 | |
| 175 | return GUIHistory.getInstance(this); |
| 176 | } |
| 177 | } |
| 178 | |
| 179 | private void setLookandFeel() throws Exception { |
| 180 | if (PacketProxyUtility.getInstance().isUnix()) { |
no test coverage detected