|
From: <de...@us...> - 2003-06-27 14:09:45
|
Update of /cvsroot/babeldoc/babeldoc/modules/scanner/src/com/babeldoc/scanner/gui
In directory sc8-pr-cvs1:/tmp/cvs-serv20202/modules/scanner/src/com/babeldoc/scanner/gui
Modified Files:
ScannerMonitorFrame.java ScannerOptionNode.java
ScannerMonitorFrame_AboutBoxPanel.java ScannerWorkerNode.java
ScannerMonitor.java ConnectionDlg.java
Log Message:
Changing licence to Apache and fixed MailboxScanner
Index: ScannerMonitorFrame.java
===================================================================
RCS file: /cvsroot/babeldoc/babeldoc/modules/scanner/src/com/babeldoc/scanner/gui/ScannerMonitorFrame.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** ScannerMonitorFrame.java 10 Jun 2003 02:23:54 -0000 1.5
--- ScannerMonitorFrame.java 27 Jun 2003 14:00:14 -0000 1.6
***************
*** 1,26 ****
! /*
! * $Header$
! * $DateTime: 2002/07/24 18:15:55 $
*
*
! * babeldoc: universal document processor
! * Copyright (C) 2002 Dejan Krsmanovic.
*
! * This program is free software; you can redistribute it and/or
! * modify it under the terms of the GNU General Public License
[...1059 lines suppressed...]
! System.out.println("Pause all scanners");
! } else {
selected = (DefaultMutableTreeNode) path.getLastPathComponent();
! if (selected == rootNode) {
! stopAllScanners();
! System.out.println("Pause all scanners");
! } else if (rootNode.isNodeChild(selected)) {
ScannerWorkerNode scannerNode = (ScannerWorkerNode) selected.getUserObject();
! if (scannerNode.isScanning()) {
! scannerNode.pauseScanner();
! System.out.println(scannerNode.getName() + " paused");
} else {
! System.out.println(scannerNode.getName() + " paused");
}
} else {
! System.out.println("You must select a scanner!");
}
}
Index: ScannerOptionNode.java
===================================================================
RCS file: /cvsroot/babeldoc/babeldoc/modules/scanner/src/com/babeldoc/scanner/gui/ScannerOptionNode.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ScannerOptionNode.java 11 Jun 2003 08:24:34 -0000 1.2
--- ScannerOptionNode.java 27 Jun 2003 14:00:14 -0000 1.3
***************
*** 1,36 ****
! /*
! * $Header$
! * $DateTime: 2002/07/24 18:15:55 $
*
*
! * babeldoc: universal document processor
! * Copyright (C) 2002 Dejan Krsmanovic.
*
! * This program is free software; you can redistribute it and/or
! * modify it under the terms of the GNU General Public License
! * as published by the Free Software Foundation; either version 2
! * of the License, or (at your option) any later version.
*
! * This program is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package com.babeldoc.scanner.gui;
import com.babeldoc.core.option.ConfigOption;
import com.babeldoc.scanner.ScannerWorkerConfig;
public class ScannerOptionNode {
private ScannerWorkerConfig config;
private String key;
private String value;
- private ConfigOption optionMeta;
public ScannerOptionNode(ConfigOption option, ScannerWorkerConfig config) {
this.config = config;
--- 1,92 ----
! /* ====================================================================
! * The Apache Software License, Version 1.1
*
+ * Copyright (c) 2000 The Apache Software Foundation. All rights
+ * reserved.
*
! * Redistribution and use in source and binary forms, with or without
! * modification, are permitted provided that the following conditions
! * are met:
*
! * 1. Redistributions of source code must retain the above copyright
! * notice, this list of conditions and the following disclaimer.
*
! * 2. Redistributions in binary form must reproduce the above copyright
! * notice, this list of conditions and the following disclaimer in
! * the documentation and/or other materials provided with the
! * distribution.
! *
! * 3. The end-user documentation included with the redistribution,
! * if any, must include the following acknowledgment:
! * "This product includes software developed by the
! * Apache Software Foundation (http://www.apache.org/)."
! * Alternately, this acknowledgment may appear in the software itself,
! * if and wherever such third-party acknowledgments normally appear.
! *
! * 4. The names "Apache" and "Apache Software Foundation" must
! * not be used to endorse or promote products derived from this
! * software without prior written permission. For written
! * permission, please contact ap...@ap....
! *
! * 5. Products derived from this software may not be called "Apache",
! * nor may "Apache" appear in their name, without prior written
! * permission of the Apache Software Foundation.
! *
! * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
! * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
! * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
! * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
! * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
! * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
! * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
! * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
! * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
! * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
! * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
! * SUCH DAMAGE.
! * ====================================================================
! *
! * This software consists of voluntary contributions made by many
! * individuals on behalf of the Apache Software Foundation. For more
! * information on the Apache Software Foundation, please see
! * <http://www.apache.org/>.
! *
! * Portions of this software are based upon public domain software
! * originally written at the National Center for Supercomputing Applications,
! * University of Illinois, Urbana-Champaign.
! * ====================================================================
! *
! * Babeldoc: The Universal Document Processor
! *
! * $Header$
! * $DateTime$
! * $Author$
*
*/
package com.babeldoc.scanner.gui;
import com.babeldoc.core.option.ConfigOption;
+
import com.babeldoc.scanner.ScannerWorkerConfig;
+ /**
+ * TODO: DOCUMENT ME!
+ *
+ * @author $author$
+ * @version $Revision$
+ */
public class ScannerOptionNode {
+ private ConfigOption optionMeta;
private ScannerWorkerConfig config;
private String key;
private String value;
+ /**
+ * Creates a new ScannerOptionNode object.
+ *
+ * @param option DOCUMENT ME!
+ * @param config DOCUMENT ME!
+ */
public ScannerOptionNode(ConfigOption option, ScannerWorkerConfig config) {
this.config = config;
***************
*** 40,43 ****
--- 96,122 ----
}
+ /**
+ * TODO: DOCUMENT ME!
+ *
+ * @return DOCUMENT ME!
+ */
+ public String getKey() {
+ return key;
+ }
+
+ /**
+ * TODO: DOCUMENT ME!
+ *
+ * @return DOCUMENT ME!
+ */
+ public ConfigOption getMetaInfo() {
+ return this.optionMeta;
+ }
+
+ /**
+ * TODO: DOCUMENT ME!
+ *
+ * @param value DOCUMENT ME!
+ */
public void setNewValue(String value) {
this.value = value;
***************
*** 45,62 ****
}
! public String toString() {
! return key + "=" + value;
! }
!
public String getValue() {
return value;
}
! public String getKey() {
! return key;
! }
!
! public ConfigOption getMetaInfo() {
! return this.optionMeta;
}
}
--- 124,143 ----
}
! /**
! * TODO: DOCUMENT ME!
! *
! * @return DOCUMENT ME!
! */
public String getValue() {
return value;
}
! /**
! * TODO: DOCUMENT ME!
! *
! * @return DOCUMENT ME!
! */
! public String toString() {
! return key + "=" + value;
}
}
Index: ScannerMonitorFrame_AboutBoxPanel.java
===================================================================
RCS file: /cvsroot/babeldoc/babeldoc/modules/scanner/src/com/babeldoc/scanner/gui/ScannerMonitorFrame_AboutBoxPanel.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ScannerMonitorFrame_AboutBoxPanel.java 1 Apr 2003 14:19:28 -0000 1.1
--- ScannerMonitorFrame_AboutBoxPanel.java 27 Jun 2003 14:00:14 -0000 1.2
***************
*** 1,39 ****
! /*
! * $Header$
! * $DateTime: 2002/07/24 18:15:55 $
*
*
! * babeldoc: universal document processor
! * Copyright (C) 2002 Dejan Krsmanovic.
*
! * This program is free software; you can redistribute it and/or
! * modify it under the terms of the GNU General Public License
! * as published by the Free Software Foundation; either version 2
! * of the License, or (at your option) any later version.
*
! * This program is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package com.babeldoc.scanner.gui;
import javax.swing.*;
import javax.swing.border.Border;
- import java.awt.*;
public class ScannerMonitorFrame_AboutBoxPanel extends JPanel {
private Border border = BorderFactory.createEtchedBorder();
private GridBagLayout layoutMain = new GridBagLayout();
private JLabel labelCompany = new JLabel();
private JLabel labelCopyright = new JLabel();
- private JLabel labelAuthor = new JLabel();
private JLabel labelTitle = new JLabel();
public ScannerMonitorFrame_AboutBoxPanel() {
try {
--- 1,92 ----
! /* ====================================================================
! * The Apache Software License, Version 1.1
*
+ * Copyright (c) 2000 The Apache Software Foundation. All rights
+ * reserved.
*
! * Redistribution and use in source and binary forms, with or without
! * modification, are permitted provided that the following conditions
! * are met:
*
! * 1. Redistributions of source code must retain the above copyright
! * notice, this list of conditions and the following disclaimer.
*
! * 2. Redistributions in binary form must reproduce the above copyright
! * notice, this list of conditions and the following disclaimer in
! * the documentation and/or other materials provided with the
! * distribution.
! *
! * 3. The end-user documentation included with the redistribution,
! * if any, must include the following acknowledgment:
! * "This product includes software developed by the
! * Apache Software Foundation (http://www.apache.org/)."
! * Alternately, this acknowledgment may appear in the software itself,
! * if and wherever such third-party acknowledgments normally appear.
! *
! * 4. The names "Apache" and "Apache Software Foundation" must
! * not be used to endorse or promote products derived from this
! * software without prior written permission. For written
! * permission, please contact ap...@ap....
! *
! * 5. Products derived from this software may not be called "Apache",
! * nor may "Apache" appear in their name, without prior written
! * permission of the Apache Software Foundation.
! *
! * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
! * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
! * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
! * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
! * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
! * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
! * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
! * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
! * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
! * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
! * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
! * SUCH DAMAGE.
! * ====================================================================
! *
! * This software consists of voluntary contributions made by many
! * individuals on behalf of the Apache Software Foundation. For more
! * information on the Apache Software Foundation, please see
! * <http://www.apache.org/>.
! *
! * Portions of this software are based upon public domain software
! * originally written at the National Center for Supercomputing Applications,
! * University of Illinois, Urbana-Champaign.
! * ====================================================================
! *
! * Babeldoc: The Universal Document Processor
! *
! * $Header$
! * $DateTime$
! * $Author$
*
*/
package com.babeldoc.scanner.gui;
+ import java.awt.*;
+
import javax.swing.*;
import javax.swing.border.Border;
+ /**
+ * TODO: DOCUMENT ME!
+ *
+ * @author $author$
+ * @version $Revision$
+ */
public class ScannerMonitorFrame_AboutBoxPanel extends JPanel {
private Border border = BorderFactory.createEtchedBorder();
private GridBagLayout layoutMain = new GridBagLayout();
+ private JLabel labelAuthor = new JLabel();
private JLabel labelCompany = new JLabel();
private JLabel labelCopyright = new JLabel();
private JLabel labelTitle = new JLabel();
+ /**
+ * Creates a new ScannerMonitorFrame_AboutBoxPanel object.
+ */
public ScannerMonitorFrame_AboutBoxPanel() {
try {
***************
*** 44,47 ****
--- 97,105 ----
}
+ /**
+ * TODO: DOCUMENT ME!
+ *
+ * @throws Exception DOCUMENT ME!
+ */
private void jbInit() throws Exception {
this.setLayout(layoutMain);
***************
*** 52,66 ****
labelCompany.setText("Company");
this.add(labelTitle,
! new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST,
! GridBagConstraints.NONE, new Insets(5, 15, 0, 15), 0, 0));
this.add(labelAuthor,
! new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST,
! GridBagConstraints.NONE, new Insets(0, 15, 0, 15), 0, 0));
this.add(labelCopyright,
! new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST,
! GridBagConstraints.NONE, new Insets(0, 15, 0, 15), 0, 0));
this.add(labelCompany,
! new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0, GridBagConstraints.WEST,
! GridBagConstraints.NONE, new Insets(0, 15, 5, 15), 0, 0));
}
}
--- 110,124 ----
labelCompany.setText("Company");
this.add(labelTitle,
! new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST,
! GridBagConstraints.NONE, new Insets(5, 15, 0, 15), 0, 0));
this.add(labelAuthor,
! new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST,
! GridBagConstraints.NONE, new Insets(0, 15, 0, 15), 0, 0));
this.add(labelCopyright,
! new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST,
! GridBagConstraints.NONE, new Insets(0, 15, 0, 15), 0, 0));
this.add(labelCompany,
! new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0, GridBagConstraints.WEST,
! GridBagConstraints.NONE, new Insets(0, 15, 5, 15), 0, 0));
}
}
Index: ScannerWorkerNode.java
===================================================================
RCS file: /cvsroot/babeldoc/babeldoc/modules/scanner/src/com/babeldoc/scanner/gui/ScannerWorkerNode.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ScannerWorkerNode.java 3 Jun 2003 10:40:29 -0000 1.2
--- ScannerWorkerNode.java 27 Jun 2003 14:00:14 -0000 1.3
***************
*** 1,23 ****
! /*
! * $Header$
! * $DateTime: 2002/07/24 18:15:55 $
*
*
! * babeldoc: universal document processor
! * Copyright (C) 2002 Dejan Krsmanovic.
*
! * This program is free software; you can redistribute it and/or
! * modify it under the terms of the GNU General Public License
! * as published by the Free Software Foundation; either version 2
! * of the License, or (at your option) any later version.
*
! * This program is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package com.babeldoc.scanner.gui;
--- 1,66 ----
! /* ====================================================================
! * The Apache Software License, Version 1.1
*
+ * Copyright (c) 2000 The Apache Software Foundation. All rights
+ * reserved.
*
! * Redistribution and use in source and binary forms, with or without
! * modification, are permitted provided that the following conditions
! * are met:
*
! * 1. Redistributions of source code must retain the above copyright
! * notice, this list of conditions and the following disclaimer.
*
! * 2. Redistributions in binary form must reproduce the above copyright
! * notice, this list of conditions and the following disclaimer in
! * the documentation and/or other materials provided with the
! * distribution.
! *
! * 3. The end-user documentation included with the redistribution,
! * if any, must include the following acknowledgment:
! * "This product includes software developed by the
! * Apache Software Foundation (http://www.apache.org/)."
! * Alternately, this acknowledgment may appear in the software itself,
! * if and wherever such third-party acknowledgments normally appear.
! *
! * 4. The names "Apache" and "Apache Software Foundation" must
! * not be used to endorse or promote products derived from this
! * software without prior written permission. For written
! * permission, please contact ap...@ap....
! *
! * 5. Products derived from this software may not be called "Apache",
! * nor may "Apache" appear in their name, without prior written
! * permission of the Apache Software Foundation.
! *
! * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
! * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
! * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
! * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
! * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
! * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
! * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
! * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
! * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
! * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
! * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
! * SUCH DAMAGE.
! * ====================================================================
! *
! * This software consists of voluntary contributions made by many
! * individuals on behalf of the Apache Software Foundation. For more
! * information on the Apache Software Foundation, please see
! * <http://www.apache.org/>.
! *
! * Portions of this software are based upon public domain software
! * originally written at the National Center for Supercomputing Applications,
! * University of Illinois, Urbana-Champaign.
! * ====================================================================
! *
! * Babeldoc: The Universal Document Processor
! *
! * $Header$
! * $DateTime$
! * $Author$
*
*/
package com.babeldoc.scanner.gui;
***************
*** 32,66 ****
public class ScannerWorkerNode {
private IRemoteScanner scanner;
- private String workerName = "";
private ScannerWorkerConfig configOptions;
private String lastDescription = "";
public ScannerWorkerNode(String workerName, IRemoteScanner scanner,
! ScannerWorkerConfig config) {
this.scanner = scanner;
! this.workerName = workerName;
! this.configOptions = config;
}
! /*
! public ScannerThread getScanner() {
! return scanner;
! }
! */
! void resumeScanner() throws ScannerException, RemoteException {
! scanner.restartWorker(workerName);
}
! public void pauseScanner() throws ScannerException, RemoteException {
! scanner.stopWorker(workerName);
}
public String toString() {
! try {
ScannerWorkerVO worker = scanner.getWorker(workerName);
! lastDescription = worker.status.toString() + "....";
} catch (Exception re) {
//
--- 75,162 ----
+ /**
+ * TODO: DOCUMENT ME!
+ *
+ * @author $author$
+ * @version $Revision$
+ */
public class ScannerWorkerNode {
private IRemoteScanner scanner;
private ScannerWorkerConfig configOptions;
private String lastDescription = "";
+ private String workerName = "";
+ /**
+ * Creates a new ScannerWorkerNode object.
+ *
+ * @param workerName DOCUMENT ME!
+ * @param scanner DOCUMENT ME!
+ * @param config DOCUMENT ME!
+ */
public ScannerWorkerNode(String workerName, IRemoteScanner scanner,
! ScannerWorkerConfig config) {
this.scanner = scanner;
! this.workerName = workerName;
! this.configOptions = config;
}
! /**
! * TODO: DOCUMENT ME!
! *
! * @param newConfigOptions DOCUMENT ME!
! */
! public void setConfigOptions(ScannerWorkerConfig newConfigOptions) {
! configOptions = newConfigOptions;
}
! /**
! * TODO: DOCUMENT ME!
! *
! * @return DOCUMENT ME!
! */
! public ScannerWorkerConfig getConfigOptions() {
! return configOptions;
! }
!
! /**
! * TODO: DOCUMENT ME!
! *
! * @return DOCUMENT ME!
! */
! public String getName() {
! return workerName;
! }
!
! /**
! * TODO: DOCUMENT ME!
! *
! * @return DOCUMENT ME!
! *
! * @throws RemoteException DOCUMENT ME!
! * @throws ScannerException DOCUMENT ME!
! */
! public boolean isScanning() throws RemoteException, ScannerException {
! return false;
}
+ /**
+ * TODO: DOCUMENT ME!
+ *
+ * @throws ScannerException DOCUMENT ME!
+ * @throws RemoteException DOCUMENT ME!
+ */
+ public void pauseScanner() throws ScannerException, RemoteException {
+ scanner.stopWorker(workerName);
+ }
+ /**
+ * TODO: DOCUMENT ME!
+ *
+ * @return DOCUMENT ME!
+ */
public String toString() {
! try {
ScannerWorkerVO worker = scanner.getWorker(workerName);
! lastDescription = worker.status.toString() + "....";
} catch (Exception re) {
//
***************
*** 70,88 ****
}
! public String getName() {
! return workerName;
! }
!
! public boolean isScanning() throws RemoteException, ScannerException {
!
! return false;
! }
!
! public ScannerWorkerConfig getConfigOptions() {
! return configOptions;
! }
!
! public void setConfigOptions(ScannerWorkerConfig newConfigOptions) {
! configOptions = newConfigOptions;
}
}
--- 166,176 ----
}
! /*
! public ScannerThread getScanner() {
! return scanner;
! }
! */
! void resumeScanner() throws ScannerException, RemoteException {
! scanner.restartWorker(workerName);
}
}
Index: ScannerMonitor.java
===================================================================
RCS file: /cvsroot/babeldoc/babeldoc/modules/scanner/src/com/babeldoc/scanner/gui/ScannerMonitor.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ScannerMonitor.java 1 Apr 2003 14:19:28 -0000 1.1
--- ScannerMonitor.java 27 Jun 2003 14:00:14 -0000 1.2
***************
*** 1,23 ****
! /*
! * $Header$
! * $DateTime: 2002/07/24 18:15:55 $
*
*
! * babeldoc: universal document processor
! * Copyright (C) 2002 Dejan Krsmanovic.
*
! * This program is free software; you can redistribute it and/or
! * modify it under the terms of the GNU General Public License
! * as published by the Free Software Foundation; either version 2
! * of the License, or (at your option) any later version.
*
! * This program is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package com.babeldoc.scanner.gui;
--- 1,66 ----
! /* ====================================================================
! * The Apache Software License, Version 1.1
*
+ * Copyright (c) 2000 The Apache Software Foundation. All rights
+ * reserved.
*
! * Redistribution and use in source and binary forms, with or without
! * modification, are permitted provided that the following conditions
! * are met:
*
! * 1. Redistributions of source code must retain the above copyright
! * notice, this list of conditions and the following disclaimer.
*
! * 2. Redistributions in binary form must reproduce the above copyright
! * notice, this list of conditions and the following disclaimer in
! * the documentation and/or other materials provided with the
! * distribution.
! *
! * 3. The end-user documentation included with the redistribution,
! * if any, must include the following acknowledgment:
! * "This product includes software developed by the
! * Apache Software Foundation (http://www.apache.org/)."
! * Alternately, this acknowledgment may appear in the software itself,
! * if and wherever such third-party acknowledgments normally appear.
! *
! * 4. The names "Apache" and "Apache Software Foundation" must
! * not be used to endorse or promote products derived from this
! * software without prior written permission. For written
! * permission, please contact ap...@ap....
! *
! * 5. Products derived from this software may not be called "Apache",
! * nor may "Apache" appear in their name, without prior written
! * permission of the Apache Software Foundation.
! *
! * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
! * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
! * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
! * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
! * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
! * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
! * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
! * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
! * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
! * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
! * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
! * SUCH DAMAGE.
! * ====================================================================
! *
! * This software consists of voluntary contributions made by many
! * individuals on behalf of the Apache Software Foundation. For more
! * information on the Apache Software Foundation, please see
! * <http://www.apache.org/>.
! *
! * Portions of this software are based upon public domain software
! * originally written at the National Center for Supercomputing Applications,
! * University of Illinois, Urbana-Champaign.
! * ====================================================================
! *
! * Babeldoc: The Universal Document Processor
! *
! * $Header$
! * $DateTime$
! * $Author$
*
*/
package com.babeldoc.scanner.gui;
***************
*** 25,35 ****
import com.babeldoc.core.EnvironmentLoader;
- import javax.swing.*;
import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
public class ScannerMonitor {
public ScannerMonitor() {
Frame frame = new ScannerMonitorFrame();
--- 68,88 ----
import com.babeldoc.core.EnvironmentLoader;
import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
+ import javax.swing.*;
+
+ /**
+ * TODO: DOCUMENT ME!
+ *
+ * @author $author$
+ * @version $Revision$
+ */
public class ScannerMonitor {
+ /**
+ * Creates a new ScannerMonitor object.
+ */
public ScannerMonitor() {
Frame frame = new ScannerMonitorFrame();
***************
*** 46,58 ****
frame.setLocation((screenSize.width - frameSize.width) / 2,
! (screenSize.height - frameSize.height) / 2);
frame.addWindowListener(new WindowAdapter() {
! public void windowClosing(WindowEvent e) {
! System.exit(0);
! }
! });
frame.setVisible(true);
}
public static void main(String[] args) {
try {
--- 99,116 ----
frame.setLocation((screenSize.width - frameSize.width) / 2,
! (screenSize.height - frameSize.height) / 2);
frame.addWindowListener(new WindowAdapter() {
! public void windowClosing(WindowEvent e) {
! System.exit(0);
! }
! });
frame.setVisible(true);
}
+ /**
+ * TODO: DOCUMENT ME!
+ *
+ * @param args DOCUMENT ME!
+ */
public static void main(String[] args) {
try {
Index: ConnectionDlg.java
===================================================================
RCS file: /cvsroot/babeldoc/babeldoc/modules/scanner/src/com/babeldoc/scanner/gui/ConnectionDlg.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ConnectionDlg.java 1 Apr 2003 14:19:27 -0000 1.1
--- ConnectionDlg.java 27 Jun 2003 14:00:14 -0000 1.2
***************
*** 1,46 ****
! /*
! * $Header$
! * $DateTime: 2002/07/24 18:15:55 $
*
*
! * babeldoc: universal document processor
! * Copyright (C) 2002 Dejan Krsmanovic.
*
! * This program is free software; you can redistribute it and/or
! * modify it under the terms of the GNU General Public License
! * as published by the Free Software Foundation; either version 2
! * of the License, or (at your option) any later version.
*
! * This program is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package com.babeldoc.scanner.gui;
- import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class ConnectionDlg extends JDialog {
private JLabel lblHost = new JLabel();
- private JTextField txtHost = new JTextField();
private JLabel lblPort = new JLabel();
private JTextField txtPort = new JTextField();
- private JLabel lblDescript = new JLabel();
- private JButton btnConnect = new JButton();
- private int port;
private String host;
public ConnectionDlg() {
this(null, "", false);
}
public ConnectionDlg(Frame parent, String title, boolean modal) {
super(parent, title, modal);
--- 1,106 ----
! /* ====================================================================
! * The Apache Software License, Version 1.1
*
+ * Copyright (c) 2000 The Apache Software Foundation. All rights
+ * reserved.
*
! * Redistribution and use in source and binary forms, with or without
! * modification, are permitted provided that the following conditions
! * are met:
*
! * 1. Redistributions of source code must retain the above copyright
! * notice, this list of conditions and the following disclaimer.
*
! * 2. Redistributions in binary form must reproduce the above copyright
! * notice, this list of conditions and the following disclaimer in
! * the documentation and/or other materials provided with the
! * distribution.
! *
! * 3. The end-user documentation included with the redistribution,
! * if any, must include the following acknowledgment:
! * "This product includes software developed by the
! * Apache Software Foundation (http://www.apache.org/)."
! * Alternately, this acknowledgment may appear in the software itself,
! * if and wherever such third-party acknowledgments normally appear.
! *
! * 4. The names "Apache" and "Apache Software Foundation" must
! * not be used to endorse or promote products derived from this
! * software without prior written permission. For written
! * permission, please contact ap...@ap....
! *
! * 5. Products derived from this software may not be called "Apache",
! * nor may "Apache" appear in their name, without prior written
! * permission of the Apache Software Foundation.
! *
! * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
! * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
! * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
! * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
! * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
! * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
! * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
! * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
! * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
! * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
! * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
! * SUCH DAMAGE.
! * ====================================================================
! *
! * This software consists of voluntary contributions made by many
! * individuals on behalf of the Apache Software Foundation. For more
! * information on the Apache Software Foundation, please see
! * <http://www.apache.org/>.
! *
! * Portions of this software are based upon public domain software
! * originally written at the National Center for Supercomputing Applications,
! * University of Illinois, Urbana-Champaign.
! * ====================================================================
! *
! * Babeldoc: The Universal Document Processor
! *
! * $Header$
! * $DateTime$
! * $Author$
*
*/
package com.babeldoc.scanner.gui;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
+ import javax.swing.*;
+
+ /**
+ * TODO: DOCUMENT ME!
+ *
+ * @author $author$
+ * @version $Revision$
+ */
public class ConnectionDlg extends JDialog {
+ private JButton btnConnect = new JButton();
+ private JLabel lblDescript = new JLabel();
private JLabel lblHost = new JLabel();
private JLabel lblPort = new JLabel();
+ private JTextField txtHost = new JTextField();
private JTextField txtPort = new JTextField();
private String host;
+ private int port;
+ /**
+ * Creates a new ConnectionDlg object.
+ */
public ConnectionDlg() {
this(null, "", false);
}
+ /**
+ * Creates a new ConnectionDlg object.
+ *
+ * @param parent DOCUMENT ME!
+ * @param title DOCUMENT ME!
+ * @param modal DOCUMENT ME!
+ */
public ConnectionDlg(Frame parent, String title, boolean modal) {
super(parent, title, modal);
***************
*** 53,56 ****
--- 113,170 ----
}
+ /**
+ * TODO: DOCUMENT ME!
+ *
+ * @return DOCUMENT ME!
+ */
+ public String getHost() {
+ return host;
+ }
+
+ /**
+ * TODO: DOCUMENT ME!
+ *
+ * @return DOCUMENT ME!
+ */
+ public int getPort() {
+ return port;
+ }
+
+ /**
+ * TODO: DOCUMENT ME!
+ */
+ public void show() {
+ //Centralize!
+ int x = this.getParent().getX() + (this.getParent().getWidth() / 2);
+ int y = this.getParent().getY() + (this.getParent().getHeight() / 2);
+ x = x - (this.getWidth() / 2);
+ y = y - (this.getHeight() / 2);
+ this.setLocation(x, y);
+ super.show();
+ }
+
+ /**
+ * TODO: DOCUMENT ME!
+ *
+ * @param e DOCUMENT ME!
+ */
+ private void btnConnect_actionPerformed(ActionEvent e) {
+ //check Values
+ host = txtHost.getText();
+ port = -1;
+
+ try {
+ port = Integer.parseInt(txtPort.getText());
+ } catch (Exception ex) {
+ }
+
+ this.hide();
+ }
+
+ /**
+ * TODO: DOCUMENT ME!
+ *
+ * @throws Exception DOCUMENT ME!
+ */
private void jbInit() throws Exception {
this.setSize(new Dimension(258, 224));
***************
*** 83,90 ****
btnConnect.setBounds(new Rectangle(80, 160, 80, 25));
btnConnect.addActionListener(new ActionListener() {
! public void actionPerformed(ActionEvent e) {
! btnConnect_actionPerformed(e);
! }
! });
this.getContentPane().add(btnConnect, null);
this.getContentPane().add(lblDescript, null);
--- 197,204 ----
btnConnect.setBounds(new Rectangle(80, 160, 80, 25));
btnConnect.addActionListener(new ActionListener() {
! public void actionPerformed(ActionEvent e) {
! btnConnect_actionPerformed(e);
! }
! });
this.getContentPane().add(btnConnect, null);
this.getContentPane().add(lblDescript, null);
***************
*** 93,127 ****
this.getContentPane().add(txtHost, null);
this.getContentPane().add(lblHost, null);
- }
-
- private void btnConnect_actionPerformed(ActionEvent e) {
- //check Values
- host = txtHost.getText();
- port = -1;
-
- try {
- port = Integer.parseInt(txtPort.getText());
- } catch (Exception ex) {
- }
-
- this.hide();
- }
-
- public int getPort() {
- return port;
- }
-
- public String getHost() {
- return host;
- }
-
- public void show() {
- //Centralize!
- int x = this.getParent().getX() + (this.getParent().getWidth() / 2);
- int y = this.getParent().getY() + (this.getParent().getHeight() / 2);
- x = x - (this.getWidth() / 2);
- y = y - (this.getHeight() / 2);
- this.setLocation(x, y);
- super.show();
}
}
--- 207,210 ----
|