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
|
|
15 import dwt.dwthelper.utils;
|
|
16
|
|
17
|
|
18 /**
|
|
19 * A browser input contains an input element and
|
|
20 * a previous and a next input, if available.
|
|
21 *
|
|
22 * The browser input also provides a human readable
|
|
23 * name of its input element.
|
|
24 *
|
|
25 * @since 3.4
|
|
26 */
|
|
27 public abstract class BrowserInput {
|
|
28
|
|
29 private final BrowserInput fPrevious;
|
|
30 private BrowserInput fNext;
|
|
31
|
|
32 /**
|
|
33 * Create a new Browser input.
|
|
34 *
|
|
35 * @param previous the input previous to this or <code>null</code> if this is the first
|
|
36 */
|
|
37 public BrowserInput(BrowserInput previous) {
|
|
38 fPrevious= previous;
|
|
39 if (previous !is null)
|
|
40 previous.fNext= this;
|
|
41 }
|
|
42
|
|
43 /**
|
|
44 * The previous input or <code>null</code> if this
|
|
45 * is the first.
|
|
46 *
|
|
47 * @return the previous input or <code>null</code>
|
|
48 */
|
|
49 public BrowserInput getPrevious() {
|
|
50 return fPrevious;
|
|
51 }
|
|
52
|
|
53 /**
|
|
54 * The next input or <code>null</code> if this
|
|
55 * is the last.
|
|
56 *
|
|
57 * @return the next input or <code>null</code>
|
|
58 */
|
|
59 public BrowserInput getNext() {
|
|
60 return fNext;
|
|
61 }
|
|
62
|
|
63 /**
|
|
64 * The element to use to set the browsers input.
|
|
65 *
|
|
66 * @return the input element
|
|
67 */
|
|
68 public abstract Object getInputElement();
|
|
69
|
|
70 /**
|
|
71 * A human readable name for the input.
|
|
72 *
|
|
73 * @return the input name
|
|
74 */
|
|
75 public abstract String getInputName();
|
|
76 }
|