1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package org.xmlhammer.gui.input;
23
24 import java.awt.BorderLayout;
25 import java.net.URI;
26 import java.util.ArrayList;
27 import java.util.List;
28
29 import javax.swing.JPanel;
30 import javax.swing.border.EmptyBorder;
31
32 import org.xmlhammer.gui.history.HistoryUtilities;
33 import org.xmlhammer.gui.overview.OverviewNode;
34 import org.xmlhammer.gui.util.URIsPanel;
35 import org.xmlhammer.model.project.Document;
36
37 /***
38 * Input Panel.
39 *
40 * Allows to select either one URI, multiple URIs or
41 * a range of files.
42 *
43 * @version $Revision: 1.10 $, $Date: 2006/09/06 17:48:19 $
44 * @author Edwin Dankert <edankert@gmail.com>
45 */
46
47 public class InputURIsPanel extends JPanel {
48 private static final long serialVersionUID = 3257852090755134776L;
49
50 private URIsPanel urisPanel = null;
51
52 /***
53 * @param parent the parent page or null if no parent page.
54 */
55 public InputURIsPanel(InputPage parent) {
56 this(parent, false);
57 }
58
59 /***
60 * Constructs a new Input Panel.
61 */
62 public InputURIsPanel(InputPage parent, boolean resultEnabled) {
63 super( new BorderLayout());
64 setBorder( new EmptyBorder( 10, 10, 10, 10));
65
66 urisPanel = new URIsPanel(parent, HistoryUtilities.getInstance().getSourcesModel(), resultEnabled);
67 add(urisPanel, BorderLayout.NORTH);
68 }
69
70 public ArrayList<OverviewNode> getNodes() {
71 return urisPanel.getNodes();
72 }
73
74 public void setURIs( URI base, List uris) {
75 urisPanel.reset();
76 urisPanel.setURIs(base, uris);
77 }
78
79 public List<Document> getURIs(URI base) {
80 return urisPanel.getURIs(base);
81 }
82
83 public void dispose() {
84 urisPanel.dispose();
85 }
86 }