()
| 327 | } |
| 328 | |
| 329 | public void refreshFunction() |
| 330 | { |
| 331 | Player player = graphwar.getGameData().getCurrentTurnPlayer(); |
| 332 | |
| 333 | if(player.isLocalPlayer() && !(player instanceof ComputerPlayer)) |
| 334 | { |
| 335 | final String function = player.getCurrentTurnSoldier().getFunction(); |
| 336 | |
| 337 | SwingUtilities.invokeLater( |
| 338 | new Runnable() |
| 339 | { |
| 340 | public void run() |
| 341 | { |
| 342 | funcField.setEnabled(true); |
| 343 | funcField.setText(function); |
| 344 | } |
| 345 | } |
| 346 | ); |
| 347 | } |
| 348 | else |
| 349 | { |
| 350 | SwingUtilities.invokeLater( |
| 351 | new Runnable() |
| 352 | { |
| 353 | public void run() |
| 354 | { |
| 355 | funcField.setEnabled(false); |
| 356 | } |
| 357 | } |
| 358 | ); |
| 359 | } |
| 360 | } |
| 361 | |
| 362 | public boolean isShowMessageVisible() |
| 363 | { |
no test coverage detected