01: /*
02: * RegisterChanged.java - Register changed message
03: * Copyright (C) 2004 Nicholas O'Leary
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: import org.gjt.sp.jedit.Registers;
25:
26: /**
27: * Message sent when a register is updated.
28: * @author Nicholas O'Leary
29: * @version $Id: RegisterChanged.java 5115 2004-09-01 23:20:37Z spestov $
30: *
31: * @since jEdit 4.3pre1
32: */
33: public class RegisterChanged extends EBMessage {
34: private char registerName;
35:
36: /**
37: * Creates a new registers changed message.
38: * @param source The message source
39: */
40: public RegisterChanged(EBComponent source, char name) {
41: super (source);
42: registerName = name;
43: }
44:
45: public char getRegisterName() {
46: return registerName;
47: }
48:
49: public String getRegisterValue() {
50: return Registers.getRegister(registerName).toString();
51: }
52:
53: public String paramString() {
54: return "register=" + registerName + "," + super.paramString();
55: }
56: }
|