Skip to content

Commit

Permalink
progressbar text change
Browse files Browse the repository at this point in the history
  • Loading branch information
siqq committed Sep 6, 2014
1 parent 29a6fe1 commit de4b380
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Java-Missle/src/missile/DestructedLanucher.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void run() {
for(int time = 0 ; time <= super.getDelayBeforeLaunch() ; time++){
Thread.sleep(War.TIME_INTERVAL);
for (WarEventListener l : allListeners) {
l.UpdatedMissileProgressToModelEvent(time, target.getLauncherId() , "destructor");
l.UpdatedMissileProgressToModelEvent(time, target.getLauncherId() , "destructor",(destructor.getType()+" #" + destructor.getDestructorId()),0,super.getDelayBeforeLaunch());
}
}
for (WarEventListener l : allListeners) {
Expand Down
2 changes: 1 addition & 1 deletion Java-Missle/src/missile/Missile.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public void run() {
for(int time = 0 ; time <= flyTime ; time++){
Thread.sleep(War.TIME_INTERVAL);
for (WarEventListener l : allListeners) {
l.UpdatedMissileProgressToModelEvent(time, missileId , "missile");
l.UpdatedMissileProgressToModelEvent(time, missileId , "missile",destination,damage,flyTime);
}
}
for (WarEventListener l : allListeners) {
Expand Down
3 changes: 2 additions & 1 deletion Java-Missle/src/war/controller/AbstractWarView.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ public interface AbstractWarView {
void addMissileToUI(String missileId, String destination, int damage,
int flyTime);
void destroyMissileProgress(String missileId, String type);
void updateMissileProgress(int time, String missileId, String type);
void addDestroyerProgress(String destructor_id, String target_id,
int destruct_time);
void removeLauncherFromView(String launcherId);
void updateMissileProgress(int time, String missileId, String type,
String destination, int damage, int flyTime);

}
20 changes: 11 additions & 9 deletions Java-Missle/src/war/controller/WarController.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,6 @@ public void addMissileToProgress(String name, String dest,

}


@Override
public void UpdatedMissileProgressToModelEvent(int time , String missileId , String type) {
// TODO Auto-generated method stub
warView.updateMissileProgress(time , missileId , type);
}



@Override
public void destroyLauncherInUI(String destroyerId,
String launcherIdToDestroy) {
Expand Down Expand Up @@ -171,6 +162,17 @@ public void RemovedLauncherFromUI(String launcherId) {



@Override
public void UpdatedMissileProgressToModelEvent(int time, String missileId,
String type, String destination, int damage, int flyTime) {
warView.updateMissileProgress(time , missileId , type,destination,damage,flyTime);

}








Expand Down
4 changes: 2 additions & 2 deletions Java-Missle/src/war/controller/WarEventListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ void addedMissileToModelEvent(String missileId, String destination,
int damage, int flyTime);
void addedLauncherToDestroy(String destructor_id, String target_id, int destruct_time);
void DestroyMissileProgressBar(String missileId, String string);
void UpdatedMissileProgressToModelEvent(int time, String missileId,
String string);
void RemovedLauncherFromUI(String launcherId);
void UpdatedMissileProgressToModelEvent(int time, String missileId,
String string, String destination, int damage, int flyTime);

}

0 comments on commit de4b380

Please sign in to comment.