PageRenderTime 35ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

/jEdit/tags/jedit-4-2-pre14/org/gjt/sp/jedit/msg/DockableWindowUpdate.java

#
Java | 108 lines | 34 code | 12 blank | 62 comment | 2 complexity | e52d2fe2b2d8a98c6318d44c42ab0ca9 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. * DockableWindowUpdate.java - Dockable window update message
  3. * :tabSize=8:indentSize=8:noTabs=false:
  4. * :folding=explicit:collapseFolds=1:
  5. *
  6. * Copyright (C) 2003 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 org.gjt.sp.jedit.msg;
  23. import org.gjt.sp.jedit.gui.DockableWindowManager;
  24. import org.gjt.sp.jedit.*;
  25. /**
  26. * Message sent when dockable window state changes.
  27. * @author Slava Pestov
  28. * @version $Id: DockableWindowUpdate.java 5004 2004-03-28 00:07:27Z spestov $
  29. *
  30. * @since jEdit 4.2pre1
  31. */
  32. public class DockableWindowUpdate extends EBMessage
  33. {
  34. //{{{ Message types
  35. /**
  36. * Properties changed. Fired instead of global
  37. * <code>PropertiesChanged</code> for improved performance.
  38. * @since jEdit 4.2pre1
  39. */
  40. public static final Object PROPERTIES_CHANGED = "PROPERTIES_CHANGED";
  41. /**
  42. * Dockable activated. This is sent when the dockable is made visible.
  43. * @since jEdit 4.2pre1
  44. */
  45. public static final Object ACTIVATED = "ACTIVATED";
  46. /**
  47. * Dockable deactivated. This is sent when the dockable is hidden.
  48. * @since jEdit 4.2pre1
  49. */
  50. public static final Object DEACTIVATED = "DEACTIVATED";
  51. //}}}
  52. //{{{ DockableWindowUpdate constructor
  53. /**
  54. * Creates a new dockable window update message.
  55. * @param wm The dockable window manager
  56. * @param what What happened
  57. * @param dockable The dockable window in question
  58. */
  59. public DockableWindowUpdate(DockableWindowManager wm, Object what,
  60. String dockable)
  61. {
  62. super(wm);
  63. if(what == null)
  64. throw new NullPointerException("What must be non-null");
  65. this.what = what;
  66. this.dockable = dockable;
  67. } //}}}
  68. //{{{ getWhat() method
  69. /**
  70. * Returns what caused this dockable update.
  71. */
  72. public Object getWhat()
  73. {
  74. return what;
  75. } //}}}
  76. //{{{ getDockable() method
  77. /**
  78. * Returns the dockable in question, or null if the message type is
  79. * <code>PROPERTIES_CHANGED</code>.
  80. */
  81. public String getDockable()
  82. {
  83. return dockable;
  84. } //}}}
  85. //{{{ paramString() method
  86. public String paramString()
  87. {
  88. return "what=" + what
  89. + ",dockable=" + dockable
  90. + "," + super.paramString();
  91. } //}}}
  92. //{{{ Private members
  93. private Object what;
  94. private String dockable;
  95. //}}}
  96. }