PageRenderTime 48ms CodeModel.GetById 42ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

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

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