Kaydet (Commit) 94ffd567 authored tarafından Vladimir Glazounov's avatar Vladimir Glazounov

INTEGRATION: CWS toolkit01 (1.4.34); FILE MERGED

2005/02/28 12:28:41 bc 1.4.34.2: #i37478# repainting problems in Webwizard and ReportWizard addressed
2005/02/23 17:38:49 bc 1.4.34.1: ##several changes in Webwizard
üst 8a26a17a
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: WWD_Events.java,v $ * $RCSfile: WWD_Events.java,v $
* *
* $Revision: 1.5 $ * $Revision: 1.6 $
* *
* last change: $Author: vg $ $Date: 2005-02-21 14:09:04 $ * last change: $Author: vg $ $Date: 2005-03-08 15:49:29 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -169,13 +169,12 @@ public abstract class WWD_Events extends WWD_Startup { ...@@ -169,13 +169,12 @@ public abstract class WWD_Events extends WWD_Startup {
* Ha ! the session should be loaded :-) * Ha ! the session should be loaded :-)
*/ */
public void loadSession(final String sessionToLoad) { public void loadSession(final String sessionToLoad) {
try {
final StatusDialog sd = getStatusDialog(); final StatusDialog sd = getStatusDialog();
final Task task = new Task("LoadDocs", "", 10); final Task task = new Task("LoadDocs", "", 10);
sd.execute(this, task, new Runnable() { sd.execute(this, task, resources.resLoadingSession );
public void run() {
try {
task.start(); task.start();
setSelectedDoc(EMPTY_SHORT_ARRAY); setSelectedDoc(EMPTY_SHORT_ARRAY);
...@@ -205,16 +204,12 @@ public abstract class WWD_Events extends WWD_Startup { ...@@ -205,16 +204,12 @@ public abstract class WWD_Events extends WWD_Startup {
checkSteps(); checkSteps();
currentSession = sessionToLoad; currentSession = sessionToLoad;
} catch (Exception ex) {
unexpectedError(ex);
}
while (task.getStatus() <= task.getMax()) while (task.getStatus() <= task.getMax())
task.advance(false); task.advance(false);
task.removeTaskListener(sd);
} catch (Exception ex) {
unexpectedError(ex);
} }
}, resources.resLoadingSession );
//System.out.println("finished load session");
try { try {
refreshStylePreview(); updateIconsetText(); refreshStylePreview(); updateIconsetText();
...@@ -224,6 +219,7 @@ public abstract class WWD_Events extends WWD_Startup { ...@@ -224,6 +219,7 @@ public abstract class WWD_Events extends WWD_Startup {
} }
} }
/** /**
* hmm. the user clicked the delete button. * hmm. the user clicked the delete button.
*/ */
...@@ -342,15 +338,20 @@ public abstract class WWD_Events extends WWD_Startup { ...@@ -342,15 +338,20 @@ public abstract class WWD_Events extends WWD_Startup {
if (files.length > MIN_ADD_FILES_FOR_DIALOG) { if (files.length > MIN_ADD_FILES_FOR_DIALOG) {
StatusDialog sd = getStatusDialog(); StatusDialog sd = getStatusDialog();
sd.setLabel(resources.resValidatingDocuments); sd.setLabel(resources.resValidatingDocuments);
sd.execute(this, task, resources.prodName); // new LoadDocs( sd.xControl, files, task )
sd.execute(this, task, new LoadDocs( sd.xControl, files, task ), resources.prodName); LoadDocs oLoadDocs = new LoadDocs( this.xControl, files, task);
oLoadDocs.loadDocuments();
task.removeTaskListener(sd);
} }
/* /*
* When adding a single document, do not use a * When adding a single document, do not use a
* status dialog... * status dialog...
*/ */
else else{
new LoadDocs( this.xControl, files, task ).run(); LoadDocs oLoadDocs = new LoadDocs( this.xControl, files, task);
oLoadDocs.loadDocuments();
}
} }
/** /**
...@@ -415,8 +416,6 @@ public abstract class WWD_Events extends WWD_Startup { ...@@ -415,8 +416,6 @@ public abstract class WWD_Events extends WWD_Startup {
* the user clicked the "backgrounds" button * the user clicked the "backgrounds" button
*/ */
public void chooseBackground() { public void chooseBackground() {
//new Thread() {
//public void run() {
try { try {
setEnabled(btnBackgrounds, false); setEnabled(btnBackgrounds, false);
if (bgDialog == null) { if (bgDialog == null) {
...@@ -431,12 +430,7 @@ public abstract class WWD_Events extends WWD_Startup { ...@@ -431,12 +430,7 @@ public abstract class WWD_Events extends WWD_Startup {
ex.printStackTrace(); ex.printStackTrace();
} finally { } finally {
setEnabled(btnBackgrounds, true); setEnabled(btnBackgrounds, true);
} }}
//}
//}
//.start();
}
/** /**
* invoked when the BackgorundsDialog is "OKed". * invoked when the BackgorundsDialog is "OKed".
...@@ -455,8 +449,6 @@ public abstract class WWD_Events extends WWD_Startup { ...@@ -455,8 +449,6 @@ public abstract class WWD_Events extends WWD_Startup {
* *
*/ */
public void chooseIconset() { public void chooseIconset() {
//new Thread() {
//public void run() {
try { try {
setEnabled(btnIconSets, false); setEnabled(btnIconSets, false);
if (iconsDialog == null) { if (iconsDialog == null) {
...@@ -473,11 +465,7 @@ public abstract class WWD_Events extends WWD_Startup { ...@@ -473,11 +465,7 @@ public abstract class WWD_Events extends WWD_Startup {
ex.printStackTrace(); ex.printStackTrace();
} finally { } finally {
setEnabled(btnIconSets, true); setEnabled(btnIconSets, true);
} }}
//}
//}
//.start();
}
/** /**
* invoked when the Iconsets Dialog is OKed. * invoked when the Iconsets Dialog is OKed.
...@@ -534,15 +522,10 @@ public abstract class WWD_Events extends WWD_Startup { ...@@ -534,15 +522,10 @@ public abstract class WWD_Events extends WWD_Startup {
* *
*/ */
public void setFTPPublish() { public void setFTPPublish() {
//new Thread(new Runnable() {
//public void run() {
if (showFTPDialog(getPublisher(FTP_PUBLISHER))) { if (showFTPDialog(getPublisher(FTP_PUBLISHER))) {
getPublisher(FTP_PUBLISHER).cp_Publish = true; getPublisher(FTP_PUBLISHER).cp_Publish = true;
updatePublishUI(2); updatePublishUI(2);
} }
//}
//}).start();
} }
/** /**
...@@ -572,13 +555,14 @@ public abstract class WWD_Events extends WWD_Startup { ...@@ -572,13 +555,14 @@ public abstract class WWD_Events extends WWD_Startup {
private TOCPreview docPreview; private TOCPreview docPreview;
/** /**
* the user clicks the "Preview" button. * the user clicks the "Preview" button.
*/ */
public void documentPreview() { public void documentPreview() {
try { try {
if (docPreview == null) if (docPreview == null)
docPreview = new TOCPreview(xMSF, settings, resources, stylePreview.tempDir); docPreview = new TOCPreview(xMSF, settings, resources, stylePreview.tempDir, myFrame);
docPreview.refresh(settings); docPreview.refresh(settings);
} catch (Exception ex) { } catch (Exception ex) {
unexpectedError(ex); unexpectedError(ex);
...@@ -882,15 +866,11 @@ public abstract class WWD_Events extends WWD_Startup { ...@@ -882,15 +866,11 @@ public abstract class WWD_Events extends WWD_Startup {
final CGPublish p = getPublisher(FTP_PUBLISHER); final CGPublish p = getPublisher(FTP_PUBLISHER);
// if ftp is checked, and no proxies are set, and password is empty... // if ftp is checked, and no proxies are set, and password is empty...
if (p.cp_Publish && (!proxies) && (p.password == null || p.password.equals(""))) { if (p.cp_Publish && (!proxies) && (p.password == null || p.password.equals(""))) {
//new Thread(new Runnable() {
//public void run() {
if (showFTPDialog(p)) { if (showFTPDialog(p)) {
updatePublishUI(2); updatePublishUI(2);
//now continue... //now continue...
finishWizard2(); finishWizard2();
} }
//}
//}).start();
} }
else else
finishWizard2(); finishWizard2();
...@@ -984,10 +964,10 @@ public abstract class WWD_Events extends WWD_Startup { ...@@ -984,10 +964,10 @@ public abstract class WWD_Events extends WWD_Startup {
StatusDialog pd = getStatusDialog(); StatusDialog pd = getStatusDialog();
pd.setRenderer(new ProcessStatusRenderer(resources)); pd.setRenderer(new ProcessStatusRenderer(resources));
pd.setFinishedMethod(new MethodInvocation("finishWizardFinished", this)); pd.execute(this, process.myTask, resources.prodName); //process,
process.runProcess();
finishWizardFinished();
pd.execute(this, process.myTask, process, resources.prodName); process.myTask.removeTaskListener(pd);
} catch (Exception ex) { } catch (Exception ex) {
ex.printStackTrace(); ex.printStackTrace();
...@@ -1074,7 +1054,7 @@ public abstract class WWD_Events extends WWD_Startup { ...@@ -1074,7 +1054,7 @@ public abstract class WWD_Events extends WWD_Startup {
} }
class LoadDocs implements Runnable { public class LoadDocs {
private XControl xC; private XControl xC;
String[] files; String[] files;
Task task; Task task;
...@@ -1085,11 +1065,11 @@ public abstract class WWD_Events extends WWD_Startup { ...@@ -1085,11 +1065,11 @@ public abstract class WWD_Events extends WWD_Startup {
task = task_; task = task_;
} }
public void run() { public void loadDocuments() {
//LogTaskListener lts = new LogTaskListener(); //LogTaskListener lts = new LogTaskListener();
//task.addTaskListener(lts); //task.addTaskListener(lts);
task.start(); // task.start();
// where the documents are added to in the list (offset) // where the documents are added to in the list (offset)
int offset = (getSelectedDoc().length > 0 ? selectedDoc[0] + 1 : getDocsCount()); int offset = (getSelectedDoc().length > 0 ? selectedDoc[0] + 1 : getDocsCount());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment