home *** CD-ROM | disk | FTP | other *** search
- package netscape.softupdate;
-
- import java.awt.Event;
- import java.util.Enumeration;
-
- class ProgressMediator {
- private ProgressWindow progress;
- private ProgressDetails details;
- // $FF: renamed from: su netscape.softupdate.SoftwareUpdate
- private SoftwareUpdate field_0;
-
- ProgressMediator(SoftwareUpdate var1) {
- this.field_0 = var1;
- this.progress = null;
- this.details = null;
- }
-
- protected void finalize() throws Throwable {
- this.CleanUp();
- }
-
- private void CleanUp() {
- if (this.progress != null) {
- this.progress.hide();
- this.progress.dispose();
- }
-
- if (this.details != null) {
- this.details.btnCancel_Clicked((Event)null);
- }
-
- this.progress = null;
- this.details = null;
- this.field_0 = null;
- }
-
- private void ShowProgress() {
- if (!this.field_0.GetSilent()) {
- if (this.progress == null) {
- this.progress = new ProgressWindow(this);
- }
-
- this.progress.toFront();
- this.progress.show();
- this.progress.toFront();
- }
- }
-
- private void ShowDetails() {
- if (!this.field_0.GetSilent()) {
- if (this.details == null) {
- this.details = new ProgressDetails(this);
- this.details.setTitle(Strings.details_WinTitle() + this.field_0.GetUserPackageName());
- this.details.label1.setText(Strings.details_Explain(this.field_0.GetUserPackageName()));
- Enumeration var1 = this.field_0.GetInstallQueue();
-
- while(var1.hasMoreElements()) {
- InstallObject var2 = (InstallObject)var1.nextElement();
- this.details.detailArea.appendText(var2.toString() + "\n");
- }
-
- this.details.show();
- }
-
- this.details.toFront();
- }
- }
-
- protected void DetailsHidden() {
- this.details = null;
- }
-
- protected void UserCancelled() {
- if (this.field_0 != null) {
- this.field_0.UserCancelled();
- }
-
- }
-
- protected void UserApproved() {
- if (this.field_0 != null) {
- this.field_0.UserApproved();
- }
-
- }
-
- protected void MoreInfo() {
- this.ShowDetails();
- }
-
- protected void StartInstall() {
- this.ShowProgress();
- if (this.progress != null) {
- this.progress.setTitle(Strings.progress_Title() + this.field_0.GetUserPackageName());
- this.progress.status.setText(Strings.progress_GettingReady() + this.field_0.GetUserPackageName());
- this.progress.progress.setText("");
- this.progress.install.disable();
- }
-
- }
-
- protected void ConfirmWithUser() {
- this.ShowProgress();
- if (this.progress != null) {
- this.progress.progress.setText("");
- this.progress.status.setText(Strings.progress_ReadyToInstall1() + this.field_0.GetUserPackageName());
- this.progress.install.enable();
- } else {
- this.UserApproved();
- }
- }
-
- protected void ScheduleForInstall(InstallObject var1) {
- String var2 = var1.toString();
- if (this.progress != null) {
- this.progress.progress.setText(var2);
- }
-
- if (this.details != null) {
- this.details.detailArea.appendText(var2 + "\n");
- }
-
- }
-
- void Complete() {
- this.CleanUp();
- }
- }
-