comparison dwtx/jface/internal/text/DelayedInputChangeListener.d @ 129:eb30df5ca28b

Added JFace Text sources
author Frank Benoit <benoit@tionex.de>
date Sat, 23 Aug 2008 19:10:48 +0200
parents
children c4fb132a086c
comparison
equal deleted inserted replaced
128:8df1d4193877 129:eb30df5ca28b
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.DelayedInputChangeListener;
14
15 import dwt.dwthelper.utils;
16
17 import dwtx.jface.text.IDelayedInputChangeProvider;
18 import dwtx.jface.text.IInputChangedListener;
19
20
21 /**
22 * A delayed input change listener that forwards delayed input changes to an information control replacer.
23 *
24 * @since 3.4
25 */
26 public final class DelayedInputChangeListener : IInputChangedListener {
27
28 private final IDelayedInputChangeProvider fChangeProvider;
29 private final InformationControlReplacer fInformationControlReplacer;
30
31 /**
32 * Creates a new listener.
33 *
34 * @param changeProvider the information control with delayed input changes
35 * @param informationControlReplacer the information control replacer, whose information control should get the new input
36 */
37 public DelayedInputChangeListener(IDelayedInputChangeProvider changeProvider, InformationControlReplacer informationControlReplacer) {
38 fChangeProvider= changeProvider;
39 fInformationControlReplacer= informationControlReplacer;
40 }
41
42 /*
43 * @see dwtx.jface.text.IDelayedInputChangeListener#inputChanged(java.lang.Object)
44 */
45 public void inputChanged(Object newInput) {
46 fChangeProvider.setDelayedInputChangeListener(null);
47 fInformationControlReplacer.setDelayedInput(newInput);
48 }
49 }