01: /*
02: * PropertiesChanging.java - Properties changing message
03: * Copyright (C) 2007 Marcelo Vanzin
04: *
05: * This program is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU General Public License
07: * as published by the Free Software Foundation; either version 2
08: * of the License, or any later version.
09: *
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: public enum State {
38: LOADING, CANCELED
39: }
40:
41: /**
42: * Creates a new properties changing message.
43: * @param source The message source
44: * @param state An enum describing what is happening.
45: */
46: public PropertiesChanging(EBComponent source, State state) {
47: super (source);
48: assert (state != null) : "state shouldn't be null";
49: this .state = state;
50: }
51:
52: public State getState() {
53: return state;
54: }
55:
56: private final State state;
57:
58: }
|