Revision: 4e5a3e1fdbc2 Branch: default Author: Brandon Roller <brandon.r.roller@xxxxxxxxx> Date: Wed Jul 17 12:21:04 2013 Log: Continued Cleaning up wordprocessor package http://code.google.com/p/brailleblaster/source/detail?r=4e5a3e1fdbc2&repo=newdesign Added: /src/main/org/brailleblaster/messages/BBEvent.java /src/main/org/brailleblaster/messages/Message.java Deleted: /src/main/org/brailleblaster/wordprocessor/BBEvent.java /src/main/org/brailleblaster/wordprocessor/Message.java Modified: /src/main/org/brailleblaster/abstractClasses/AbstractView.java /src/main/org/brailleblaster/document/BBDocument.java /src/main/org/brailleblaster/mapping/MapList.java /src/main/org/brailleblaster/printers/PrintPreview.java /src/main/org/brailleblaster/views/BrailleView.java /src/main/org/brailleblaster/views/TextView.java /src/main/org/brailleblaster/views/TreeView.java /src/main/org/brailleblaster/wordprocessor/DocumentManager.java ======================================= --- /dev/null+++ /src/main/org/brailleblaster/messages/BBEvent.java Wed Jul 17 12:21:04 2013
@@ -0,0 +1,46 @@ +/* BrailleBlaster Braille Transcription Application + * + * Copyright (C) 2010, 2012 + * ViewPlus Technologies, Inc. www.viewplus.com + * and + * Abilitiessoft, Inc. www.abilitiessoft.com + * All rights reserved + * + * This file may contain code borrowed from files produced by various + * Java development teams. These are gratefully acknoledged. + * + * This file is free software; you can redistribute it and/or modify it + * under the terms of the Apache 2.0 License, as given at + * http://www.apache.org/licenses/ + * + * This file is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE + * See the Apache 2.0 License for more details. + * + * You should have received a copy of the Apache 2.0 License along with + * this program; see the file LICENSE.txt + * If not, see + * http://www.apache.org/licenses/ + * + * Maintained by John J. Boyer john.boyer@xxxxxxxxxxxxxxxxx +*/ +package org.brailleblaster.messages; ++//Enumeration used by Message class used by the DocumentManager to redirect messages between views
+public enum BBEvent { + INCREMENT, + DECREMENT, + TEXT_DELETION, + UPDATE, + REMOVE_NODE, + SET_CURRENT, + GET_CURRENT, + GET_TEXT_MAP_ELEMENTS, + ADJUST_ALIGNMENT, + ADJUST_INDENT, + UPDATE_STATUSBAR, + UPDATE_CURSORS, + UPDATE_SCROLLBAR, + ADJUST_RANGE; +} ======================================= --- /dev/null+++ /src/main/org/brailleblaster/messages/Message.java Wed Jul 17 12:21:04 2013
@@ -0,0 +1,63 @@ +/* BrailleBlaster Braille Transcription Application + * + * Copyright (C) 2010, 2012 + * ViewPlus Technologies, Inc. www.viewplus.com + * and + * Abilitiessoft, Inc. www.abilitiessoft.com + * All rights reserved + * + * This file may contain code borrowed from files produced by various + * Java development teams. These are gratefully acknoledged. + * + * This file is free software; you can redistribute it and/or modify it + * under the terms of the Apache 2.0 License, as given at + * http://www.apache.org/licenses/ + * + * This file is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE + * See the Apache 2.0 License for more details. + * + * You should have received a copy of the Apache 2.0 License along with + * this program; see the file LICENSE.txt + * If not, see + * http://www.apache.org/licenses/ + * + * Maintained by John J. Boyer john.boyer@xxxxxxxxxxxxxxxxx +*/ + +package org.brailleblaster.messages; + +import java.util.HashMap; + + +//Passes data between different views and the parent DocumentManager class +public class Message { + public BBEvent type; + HashMap<String, Object> args; + + public Message(BBEvent type){ + this.type = type; + this.args = new HashMap<String, Object>(); + } + + public void put(String key, Object value){ + args.put(key, value); + } + + public <T> Object getValue(String key){ + return args.get(key); + } + + public void clearMessage(){ + this.args.clear(); + } + + public boolean contains(String key){ + return this.args.containsKey(key); + } + + public void remove(String key){ + this.args.remove(key); + } +} =======================================--- /src/main/org/brailleblaster/wordprocessor/BBEvent.java Tue Jul 2 09:14:48 2013
+++ /dev/null @@ -1,46 +0,0 @@ -/* BrailleBlaster Braille Transcription Application - * - * Copyright (C) 2010, 2012 - * ViewPlus Technologies, Inc. www.viewplus.com - * and - * Abilitiessoft, Inc. www.abilitiessoft.com - * All rights reserved - * - * This file may contain code borrowed from files produced by various - * Java development teams. These are gratefully acknoledged. - * - * This file is free software; you can redistribute it and/or modify it - * under the terms of the Apache 2.0 License, as given at - * http://www.apache.org/licenses/ - * - * This file is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE - * See the Apache 2.0 License for more details. - * - * You should have received a copy of the Apache 2.0 License along with - * this program; see the file LICENSE.txt - * If not, see - * http://www.apache.org/licenses/ - * - * Maintained by John J. Boyer john.boyer@xxxxxxxxxxxxxxxxx -*/ -package org.brailleblaster.wordprocessor; --//Enumeration used by Message class used by the DocumentManager to redirect messages between views
-public enum BBEvent { - INCREMENT, - DECREMENT, - TEXT_DELETION, - UPDATE, - REMOVE_NODE, - SET_CURRENT, - GET_CURRENT, - GET_TEXT_MAP_ELEMENTS, - ADJUST_ALIGNMENT, - ADJUST_INDENT, - UPDATE_STATUSBAR, - UPDATE_CURSORS, - UPDATE_SCROLLBAR, - ADJUST_RANGE; -} =======================================--- /src/main/org/brailleblaster/wordprocessor/Message.java Thu May 23 07:34:42 2013
+++ /dev/null @@ -1,62 +0,0 @@ -/* BrailleBlaster Braille Transcription Application - * - * Copyright (C) 2010, 2012 - * ViewPlus Technologies, Inc. www.viewplus.com - * and - * Abilitiessoft, Inc. www.abilitiessoft.com - * All rights reserved - * - * This file may contain code borrowed from files produced by various - * Java development teams. These are gratefully acknoledged. - * - * This file is free software; you can redistribute it and/or modify it - * under the terms of the Apache 2.0 License, as given at - * http://www.apache.org/licenses/ - * - * This file is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE - * See the Apache 2.0 License for more details. - * - * You should have received a copy of the Apache 2.0 License along with - * this program; see the file LICENSE.txt - * If not, see - * http://www.apache.org/licenses/ - * - * Maintained by John J. Boyer john.boyer@xxxxxxxxxxxxxxxxx -*/ - -package org.brailleblaster.wordprocessor; - -import java.util.HashMap; - -//Passes data between different views and the parent DocumentManager class -public class Message { - public BBEvent type; - HashMap<String, Object> args; - - public Message(BBEvent type){ - this.type = type; - this.args = new HashMap<String, Object>(); - } - - public void put(String key, Object value){ - args.put(key, value); - } - - public <T> Object getValue(String key){ - return args.get(key); - } - - public void clearMessage(){ - this.args.clear(); - } - - public boolean contains(String key){ - return this.args.containsKey(key); - } - - public void remove(String key){ - this.args.remove(key); - } -} =======================================--- /src/main/org/brailleblaster/abstractClasses/AbstractView.java Mon Jul 15 11:47:33 2013 +++ /src/main/org/brailleblaster/abstractClasses/AbstractView.java Wed Jul 17 12:21:04 2013
@@ -31,9 +31,9 @@ import nu.xom.Element; import nu.xom.Node; -import org.brailleblaster.wordprocessor.BBEvent; +import org.brailleblaster.messages.BBEvent; +import org.brailleblaster.messages.Message; import org.brailleblaster.wordprocessor.DocumentManager; -import org.brailleblaster.wordprocessor.Message; import org.eclipse.swt.*; import org.eclipse.swt.custom.StyleRange; import org.eclipse.swt.custom.StyledText; =======================================--- /src/main/org/brailleblaster/document/BBDocument.java Wed Jul 17 12:13:32 2013 +++ /src/main/org/brailleblaster/document/BBDocument.java Wed Jul 17 12:21:04 2013
@@ -54,11 +54,11 @@ import org.brailleblaster.mapping.BrailleMapElement; import org.brailleblaster.mapping.MapList; import org.brailleblaster.mapping.TextMapElement; +import org.brailleblaster.messages.Message; import org.brailleblaster.util.CheckLiblouisutdmlLog; import org.brailleblaster.util.FileUtils; import org.brailleblaster.util.Notify; import org.brailleblaster.wordprocessor.DocumentManager; -import org.brailleblaster.wordprocessor.Message; import org.liblouis.liblouisutdml; =======================================--- /src/main/org/brailleblaster/mapping/MapList.java Mon Jul 15 11:47:33 2013 +++ /src/main/org/brailleblaster/mapping/MapList.java Wed Jul 17 12:21:04 2013
@@ -33,9 +33,9 @@ import nu.xom.Text; -import org.brailleblaster.wordprocessor.BBEvent; +import org.brailleblaster.messages.BBEvent; +import org.brailleblaster.messages.Message; import org.brailleblaster.wordprocessor.DocumentManager; -import org.brailleblaster.wordprocessor.Message; public class MapList extends LinkedList<TextMapElement>{ private class UpdaterThread extends Thread { =======================================--- /src/main/org/brailleblaster/printers/PrintPreview.java Wed Jul 17 12:13:32 2013 +++ /src/main/org/brailleblaster/printers/PrintPreview.java Wed Jul 17 12:21:04 2013
@@ -4,13 +4,14 @@ import java.io.FileNotFoundException; import java.util.Scanner; + import org.brailleblaster.BBIni; import org.brailleblaster.abstractClasses.AbstractView; import org.brailleblaster.document.BBDocument; +import org.brailleblaster.messages.Message; import org.brailleblaster.util.Notify; import org.brailleblaster.wordprocessor.DocumentManager; import org.brailleblaster.wordprocessor.FontManager; -import org.brailleblaster.wordprocessor.Message; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.VerifyKeyListener; import org.eclipse.swt.events.VerifyEvent; =======================================--- /src/main/org/brailleblaster/views/BrailleView.java Wed Jul 17 12:13:32 2013 +++ /src/main/org/brailleblaster/views/BrailleView.java Wed Jul 17 12:21:04 2013
@@ -42,9 +42,9 @@ import org.brailleblaster.document.BBSemanticsTable.StylesType; import org.brailleblaster.mapping.BrailleMapElement; import org.brailleblaster.mapping.TextMapElement; -import org.brailleblaster.wordprocessor.BBEvent; +import org.brailleblaster.messages.BBEvent; +import org.brailleblaster.messages.Message; import org.brailleblaster.wordprocessor.DocumentManager; -import org.brailleblaster.wordprocessor.Message; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.CaretEvent; =======================================--- /src/main/org/brailleblaster/views/TextView.java Wed Jul 17 12:13:32 2013 +++ /src/main/org/brailleblaster/views/TextView.java Wed Jul 17 12:21:04 2013
@@ -40,9 +40,9 @@ import org.brailleblaster.document.BBSemanticsTable.Styles; import org.brailleblaster.document.BBSemanticsTable.StylesType; import org.brailleblaster.mapping.TextMapElement; -import org.brailleblaster.wordprocessor.BBEvent; +import org.brailleblaster.messages.BBEvent; +import org.brailleblaster.messages.Message; import org.brailleblaster.wordprocessor.DocumentManager; -import org.brailleblaster.wordprocessor.Message; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.CaretEvent; import org.eclipse.swt.custom.CaretListener; =======================================--- /src/main/org/brailleblaster/views/TreeView.java Mon Jul 15 07:48:47 2013 +++ /src/main/org/brailleblaster/views/TreeView.java Wed Jul 17 12:21:04 2013
@@ -41,9 +41,9 @@ import org.brailleblaster.abstractClasses.AbstractView; import org.brailleblaster.mapping.TextMapElement; -import org.brailleblaster.wordprocessor.BBEvent; +import org.brailleblaster.messages.BBEvent; +import org.brailleblaster.messages.Message; import org.brailleblaster.wordprocessor.DocumentManager; -import org.brailleblaster.wordprocessor.Message; import org.eclipse.swt.SWT; import org.eclipse.swt.events.FocusEvent; import org.eclipse.swt.events.FocusListener; =======================================--- /src/main/org/brailleblaster/wordprocessor/DocumentManager.java Wed Jul 17 12:13:32 2013 +++ /src/main/org/brailleblaster/wordprocessor/DocumentManager.java Wed Jul 17 12:21:04 2013
@@ -55,6 +55,8 @@ import org.brailleblaster.localization.LocaleHandler; import org.brailleblaster.mapping.MapList; import org.brailleblaster.mapping.TextMapElement; +import org.brailleblaster.messages.BBEvent; +import org.brailleblaster.messages.Message; import org.brailleblaster.printers.PrintPreview; import org.brailleblaster.printers.PrintersManager; import org.brailleblaster.util.Notify;