diff options
author | Kurt Zenker <kz@openoffice.org> | 2004-05-19 12:21:34 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2004-05-19 12:21:34 +0000 |
commit | 0e9d01dd6412d09d2d73f5e83712b329dae413e2 (patch) | |
tree | d5bf977ca7594df8291e01133eb2f17e35ad0d1a /wizards | |
parent | 8a4895742411908ef198acce7ba8e6a7247d483f (diff) |
INTEGRATION: CWS qwizards1 (1.1.2); FILE ADDED
2004/03/12 16:17:02 rpiterman 1.1.2.2: documentation and small implementation-fixes
2003/11/05 14:14:40 rpiterman 1.1.2.1: An implementation of TaskListener which logs all events to a PrintStream.
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/com/sun/star/wizards/web/status/LogTaskListener.java | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/wizards/com/sun/star/wizards/web/status/LogTaskListener.java b/wizards/com/sun/star/wizards/web/status/LogTaskListener.java new file mode 100644 index 000000000000..5a28c7c24f6c --- /dev/null +++ b/wizards/com/sun/star/wizards/web/status/LogTaskListener.java @@ -0,0 +1,60 @@ +/* + * Created on 04.11.2003 + * + * To change the template for this generated file go to + * Window>Preferences>Java>Code Generation>Code and Comments + */ +package com.sun.star.wizards.web.status; + +import java.io.PrintStream; + +/** + * @author rpiterman + * + * To change the template for this generated type comment go to + * Window>Preferences>Java>Code Generation>Code and Comments + */ +public class LogTaskListener implements TaskListener { + + private PrintStream out; + + public LogTaskListener(PrintStream os) { + out = os; + } + + /* (non-Javadoc) + * @see com.sun.star.wizards.web.status.TaskListener#taskStarted(com.sun.star.wizards.web.status.TaskEvent) + */ + public void taskStarted(TaskEvent te) { + out.println("TASK " + te.getTask().getTaskName() + + " STARTED."); + + } + + /* (non-Javadoc) + * @see com.sun.star.wizards.web.status.TaskListener#taskFinished(com.sun.star.wizards.web.status.TaskEvent) + */ + public void taskFinished(TaskEvent te) { + out.println("TASK " + te.getTask().getTaskName() + + " FINISHED: " + te.getTask().getSuccessfull() + "/" + te.getTask().getMax() + "Succeeded."); + + } + + /* (non-Javadoc) + * @see com.sun.star.wizards.web.status.TaskListener#taskStatusChanged(com.sun.star.wizards.web.status.TaskEvent) + */ + public void taskStatusChanged(TaskEvent te) { + out.println("TASK " + te.getTask().getTaskName() + + " status : " + te.getTask().getSuccessfull() + "(+" + te.getTask().getFailed() + ")/" + te.getTask().getMax()); + } + + /* (non-Javadoc) + * @see com.sun.star.wizards.web.status.TaskListener#subtaskNameChanged(com.sun.star.wizards.web.status.TaskEvent) + */ + public void subtaskNameChanged(TaskEvent te) { + out.println("SUBTASK Name:" + te.getTask().getSubtaskName()); + } + + + +} |