129
|
1 /*******************************************************************************
|
|
2 * Copyright (c) 2008 IBM Corporation and others.
|
|
3 * All rights reserved. This program and the accompanying materials
|
|
4 * are made available under the terms of the Eclipse Public License v1.0
|
|
5 * which accompanies this distribution, and is available at
|
|
6 * http://www.eclipse.org/legal/epl-v10.html
|
|
7 *
|
|
8 * Contributors:
|
|
9 * IBM Corporation - initial API and implementation
|
|
10 * Port to the D programming language:
|
|
11 * Frank Benoit <benoit@tionex.de>
|
|
12 *******************************************************************************/
|
|
13 module dwtx.jface.internal.text.html.BrowserInput;
|
|
14
|
131
|
15 import dwtx.jface.internal.text.html.HTML2TextReader; // packageimport
|
|
16 import dwtx.jface.internal.text.html.HTMLPrinter; // packageimport
|
|
17 import dwtx.jface.internal.text.html.BrowserInformationControl; // packageimport
|
|
18 import dwtx.jface.internal.text.html.SubstitutionTextReader; // packageimport
|
|
19 import dwtx.jface.internal.text.html.HTMLTextPresenter; // packageimport
|
|
20 import dwtx.jface.internal.text.html.SingleCharReader; // packageimport
|
|
21 import dwtx.jface.internal.text.html.BrowserInformationControlInput; // packageimport
|
|
22 import dwtx.jface.internal.text.html.HTMLMessages; // packageimport
|
|
23
|
|
24
|
129
|
25 import dwt.dwthelper.utils;
|
|
26
|
|
27
|
|
28 /**
|
|
29 * A browser input contains an input element and
|
|
30 * a previous and a next input, if available.
|
|
31 *
|
|
32 * The browser input also provides a human readable
|
|
33 * name of its input element.
|
|
34 *
|
|
35 * @since 3.4
|
|
36 */
|
|
37 public abstract class BrowserInput {
|
|
38
|
|
39 private final BrowserInput fPrevious;
|
|
40 private BrowserInput fNext;
|
|
41
|
|
42 /**
|
|
43 * Create a new Browser input.
|
|
44 *
|
|
45 * @param previous the input previous to this or <code>null</code> if this is the first
|
|
46 */
|
|
47 public BrowserInput(BrowserInput previous) {
|
|
48 fPrevious= previous;
|
|
49 if (previous !is null)
|
|
50 previous.fNext= this;
|
|
51 }
|
|
52
|
|
53 /**
|
|
54 * The previous input or <code>null</code> if this
|
|
55 * is the first.
|
|
56 *
|
|
57 * @return the previous input or <code>null</code>
|
|
58 */
|
|
59 public BrowserInput getPrevious() {
|
|
60 return fPrevious;
|
|
61 }
|
|
62
|
|
63 /**
|
|
64 * The next input or <code>null</code> if this
|
|
65 * is the last.
|
|
66 *
|
|
67 * @return the next input or <code>null</code>
|
|
68 */
|
|
69 public BrowserInput getNext() {
|
|
70 return fNext;
|
|
71 }
|
|
72
|
|
73 /**
|
|
74 * The element to use to set the browsers input.
|
|
75 *
|
|
76 * @return the input element
|
|
77 */
|
|
78 public abstract Object getInputElement();
|
|
79
|
|
80 /**
|
|
81 * A human readable name for the input.
|
|
82 *
|
|
83 * @return the input name
|
|
84 */
|
|
85 public abstract String getInputName();
|
|
86 }
|