KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > gjt > sp > jedit > msg > DockableWindowUpdate


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
23 package org.gjt.sp.jedit.msg;
24
25 import org.gjt.sp.jedit.gui.DockableWindowManager;
26 import 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  */

35 public 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 JavaDoc 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 JavaDoc 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 JavaDoc 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 JavaDoc what,
66         String JavaDoc dockable)
67     {
68         super(wm);
69
70         if(what == null)
71             throw new NullPointerException JavaDoc("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 JavaDoc 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 JavaDoc getDockable()
92     {
93         return dockable;
94     } //}}}
95

96     //{{{ paramString() method
97
public String JavaDoc paramString()
98     {
99         return "what=" + what
100             + ",dockable=" + dockable
101             + "," + super.paramString();
102     } //}}}
103

104     //{{{ Private members
105
private Object JavaDoc what;
106     private String JavaDoc dockable;
107     //}}}
108
}
109
Popular Tags