PageRenderTime 568ms CodeModel.GetById 29ms RepoModel.GetById 9ms 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
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
  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. package console;
  23. public class ConsoleHistoryText extends HistoryText
  24. {
  25. private ConsolePane pane;
  26. public ConsoleHistoryText(ConsolePane pane)
  27. {
  28. super(pane,null);
  29. this.pane = pane;
  30. }
  31. public int getInputStart()
  32. {
  33. return pane.getInputStart();
  34. }
  35. public String getText()
  36. {
  37. return pane.getInput();
  38. }
  39. public void setText(String text)
  40. {
  41. setIndex(-1);
  42. pane.setInput(text);
  43. }
  44. }