View Javadoc

1   /*
2    * $Id$
3    *
4    * The contents of this file are subject to the Mozilla Public License 
5    * Version 1.1 (the "License"); you may not use this file except in 
6    * compliance with the License. You may obtain a copy of the License at 
7    * http://www.mozilla.org/MPL/ 
8    *
9    * Software distributed under the License is distributed on an "AS IS" basis, 
10   * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 
11   * for the specific language governing rights and limitations under the License.
12   *
13   * The Original Code is XML Hammer code. (org.xmlhammer.*)
14   *
15   * The Initial Developer of the Original Code is Edwin Dankert. Portions created 
16   * by the Initial Developer are Copyright (C) 2005 - 2006 the Initial Developer. 
17   * All Rights Reserved.
18   *
19   * Contributor(s): Edwin Dankert <edankert@gmail.com>
20   */
21  
22  package org.xmlhammer.gui.wizard;
23  
24  import java.awt.BorderLayout;
25  import java.util.List;
26  
27  import javax.swing.border.EmptyBorder;
28  
29  import org.bounce.wizard.WizardPage;
30  import org.xmlhammer.gui.input.InputURIsPanel;
31  import org.xmlhammer.gui.util.wizard.HelpEnabledWizardPage;
32  import org.xmlhammer.model.project.Document;
33  
34  public class InputURIsPage extends HelpEnabledWizardPage {
35      private static final long serialVersionUID = 6688922851481710915L;
36      private WizardPage next = null;
37      private InputURIsPanel urisPanel = null;
38  
39      public InputURIsPage(String helpID, WizardPage next) {
40          this(helpID, next, false);
41      }
42  
43      public InputURIsPage(String helpID, WizardPage next, boolean resultEnabled) {
44          super(new BorderLayout(), helpID);
45  
46          this.next = next;
47          
48          setBorder(new EmptyBorder(10, 0, 0, 0));
49          urisPanel = new InputURIsPanel(null, resultEnabled);
50          
51          add(urisPanel, BorderLayout.CENTER);
52          
53          urisPanel.setURIs(null, null);
54      }
55  
56      public List<Document> getURIs() {
57          return urisPanel.getURIs(null);
58      }
59      
60      @Override
61      public String getTitle() {
62          return "Specify Input URIs";
63      }
64  
65      @Override
66      public String getDescription() {
67          return "Specify specific Input Document URIs";
68      }
69  
70      @Override
71      public WizardPage getNext() {
72          return next;
73      }
74  }