PageRenderTime 44ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/jEdit/tags/jedit-4-3-pre5/org/gjt/sp/jedit/msg/EditPaneUpdate.java

#
Java | 93 lines | 29 code | 13 blank | 51 comment | 2 complexity | 772d3df50020e74b8d9f2a14b7c3fd2b 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. * EditPaneUpdate.java - Edit pane update message
  3. * Copyright (C) 1999, 2000 Slava Pestov
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License
  7. * as published by the Free Software Foundation; either version 2
  8. * of the License, or any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  18. */
  19. package org.gjt.sp.jedit.msg;
  20. import org.gjt.sp.jedit.*;
  21. /**
  22. * Message sent when an edit pane-related change occurs.
  23. * @author Slava Pestov
  24. * @version $Id: EditPaneUpdate.java 5518 2006-07-03 17:24:07Z ezust $
  25. *
  26. * @since jEdit 2.5pre1
  27. */
  28. public class EditPaneUpdate extends EBMessage
  29. {
  30. /**
  31. * Edit pane created.
  32. */
  33. public static final Object CREATED = "CREATED";
  34. /**
  35. * Edit pane destroyed.
  36. */
  37. public static final Object DESTROYED = "DESTROYED";
  38. /**
  39. * Edit pane buffer changed.
  40. */
  41. public static final Object BUFFER_CHANGED = "BUFFER_CHANGED";
  42. /**
  43. * Edit pane buffer about to change. Note: this could be an instance of BufferChanging class,
  44. * which also contains information about the new buffer that is about to be opened.
  45. * @since 4.3pre3
  46. */
  47. public static final Object BUFFER_CHANGING = "BUFFER_CHANGING";
  48. /**
  49. * Creates a new edit pane update message.
  50. * @param editPane The edit pane
  51. * @param what What happened
  52. */
  53. public EditPaneUpdate(EditPane editPane, Object what)
  54. {
  55. super(editPane);
  56. if(what == null)
  57. throw new NullPointerException("What must be non-null");
  58. this.what = what;
  59. }
  60. /**
  61. * Returns what caused this edit pane update.
  62. */
  63. public Object getWhat()
  64. {
  65. return what;
  66. }
  67. /**
  68. * Returns the edit pane involved.
  69. */
  70. public EditPane getEditPane()
  71. {
  72. return (EditPane)getSource();
  73. }
  74. public String paramString()
  75. {
  76. return "what=" + what + "," + super.paramString();
  77. }
  78. // private members
  79. private Object what;
  80. }