PageRenderTime 78ms CodeModel.GetById 73ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/bundles/plugins-trunk/Console/console/ConsoleHistoryText.java

#
Java | 51 lines | 23 code | 7 blank | 21 comment | 0 complexity | 16ae812f018dbe1041876d7bc64294cb MD5 | raw file
 1/*
 2 * ConsoleHistoryText.java - The console input/output pane
 3 * :tabSize=8:indentSize=8:noTabs=false:
 4 * :folding=explicit:collapseFolds=1:
 5 *
 6 * Copyright (C) 2004 Slava Pestov
 7 *
 8 * This program is free software; you can redistribute it and/or
 9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
21 */
22
23package console;
24
25
26public class ConsoleHistoryText extends HistoryText
27{
28	private ConsolePane pane;
29
30	public ConsoleHistoryText(ConsolePane pane)
31	{
32		super(pane,null);
33		this.pane = pane;
34	}
35
36	public int getInputStart()
37	{
38		return pane.getInputStart();
39	}
40	
41	public String getText()
42	{
43		return pane.getInput();
44	}
45	
46	public void setText(String text)
47	{
48		setIndex(-1);
49		pane.setInput(text);
50	}
51}