KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * PropertiesChanging.java - Properties changing message
3  * Copyright (C) 2007 Marcelo Vanzin
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
20 package org.gjt.sp.jedit.msg;
21
22 import org.gjt.sp.jedit.EBComponent;
23 import org.gjt.sp.jedit.EBMessage;
24
25 /**
26  * Message sent right before the global options dialog is shown. This
27  * allows plugins to flush any state before the options pane is loaded
28  * and the properties are read by the panes.
29  *
30  * @author Marcelo Vanzin
31  * @version $Id$
32  *
33  * @since jEdit 4.3pre9
34  */

35 public class PropertiesChanging extends EBMessage
36 {
37
38     public enum State {
39         LOADING,
40         CANCELED
41     }
42
43     /**
44      * Creates a new properties changing message.
45      * @param source The message source
46      * @param what Object describing what's happening.
47      */

48     public PropertiesChanging(EBComponent source, State state)
49     {
50         super(source);
51         assert (state != null) : "state shouldn't be null";
52         this.state = state;
53     }
54
55     public State getState()
56     {
57         return state;
58     }
59
60     private final State state;
61
62 }
63
Popular Tags