[brailleblaster] push by john.bo...@xxxxxxxxxxxxxxxxx - AbstractPreview and changes on 2011-10-21 16:21 GMT
- From: brailleblaster@xxxxxxxxxxxxxx
- To: brailleblaster@xxxxxxxxxxxxx
- Date: Fri, 21 Oct 2011 16:21:43 +0000
Revision: 74e7ab12b3af
Author: John Boyer <john.boyer@xxxxxxxxxxxxxxxxx>
Date: Fri Oct 21 09:20:33 2011
Log: AbstractPreview and changes
http://code.google.com/p/brailleblaster/source/detail?r=74e7ab12b3af
Modified:
/src/main/org/brailleblaster/wordprocessor/AbstractContent.java
/src/main/org/brailleblaster/wordprocessor/AbstractPrinting.java
/src/main/org/brailleblaster/wordprocessor/AbstractView.java
/src/main/org/brailleblaster/wordprocessor/BrailleContent.java
/src/main/org/brailleblaster/wordprocessor/BrailleView.java
/src/main/org/brailleblaster/wordprocessor/DaisyContent.java
/src/main/org/brailleblaster/wordprocessor/DaisyView.java
/src/main/org/brailleblaster/wordprocessor/DocumentManager.java
=======================================
--- /src/main/org/brailleblaster/wordprocessor/AbstractContent.java Fri Oct
21 08:05:32 2011
+++ /src/main/org/brailleblaster/wordprocessor/AbstractContent.java Fri Oct
21 09:20:33 2011
@@ -1,12 +1,13 @@
-import org.eclipse.swt.custom.Styled/Text;
+package org.brailleblaster.wordprocessor;
+
+import org.eclipse.swt.custom.StyledText;
import nu.xom.*;
-class BrailleContent implements StyledTextContent
-entends Node
-{
+abstract class AbstractContent implements StyledTextContent {
+
private StyledTextContent baseContent;
-BrailleContent (final StyledText styledText) {
+AbstractContent (final StyledText styledText) {
baseContent = styledText.getContent();
styledText.setContent(this);
}
@@ -15,3 +16,4 @@
baseContent.addTextChangeListener(listener);
}
+}
=======================================
--- /src/main/org/brailleblaster/wordprocessor/AbstractPrinting.java Fri
Oct 21 08:05:32 2011
+++ /src/main/org/brailleblaster/wordprocessor/AbstractPrinting.java Fri
Oct 21 09:20:33 2011
@@ -51,13 +51,13 @@
* here.
*/
-class BBPrint {
+abstract class AbstractPrinting {
PrinterData data = null;
/**
* This constructor takes care of printer setup.
*/
-BBPrint() {
+AbstractPrinting() {
Shell shell = new Shell (BBIni.getDisplay(), SWT.DIALOG_TRIM);
PrintDialog printer = new PrintDialog (shell);
data = printer.open();
=======================================
--- /src/main/org/brailleblaster/wordprocessor/AbstractView.java Fri Oct 21
08:05:32 2011
+++ /src/main/org/brailleblaster/wordprocessor/AbstractView.java Fri Oct 21
09:20:33 2011
@@ -36,7 +36,11 @@
import org.eclipse.swt.custom.VerifyKeyListener;
import org.eclipse.swt.events.VerifyEvent;
-abstract class ProtoView {
+abstract class AbstractView {
StyledText view;
boolean hasFocus = false;
-}
+
+AbstractView() {
+}
+
+}
=======================================
--- /src/main/org/brailleblaster/wordprocessor/BrailleContent.java Tue Oct
18 08:28:56 2011
+++ /src/main/org/brailleblaster/wordprocessor/BrailleContent.java Fri Oct
21 09:20:33 2011
@@ -34,5 +34,5 @@
import org.eclipse.swt.*;
-class BrailleContent {
-}
+class BrailleContent extends AbstractContent {
+}
=======================================
--- /src/main/org/brailleblaster/wordprocessor/BrailleView.java Fri Oct 21
08:05:32 2011
+++ /src/main/org/brailleblaster/wordprocessor/BrailleView.java Fri Oct 21
09:20:33 2011
@@ -38,9 +38,9 @@
-class BrailleView extends ProtoView {
-
-// (in ProtoView) StyledText view;
+class BrailleView extends AbstractView {
+
+// (in AbstractView) StyledText view;
BrailleView (Shell documentWindow) {
view = new StyledText (documentWindow, SWT.BORDER | SWT.H_SCROLL |
SWT.V_SCROLL | SWT.WRAP);
=======================================
--- /src/main/org/brailleblaster/wordprocessor/DaisyContent.java Tue Oct 18
08:28:56 2011
+++ /src/main/org/brailleblaster/wordprocessor/DaisyContent.java Fri Oct 21
09:20:33 2011
@@ -34,5 +34,5 @@
import org.eclipse.swt.*;
-class DaisyContent {
-}
+class DaisyContent extends AbstractContent {
+}
=======================================
--- /src/main/org/brailleblaster/wordprocessor/DaisyView.java Tue Oct 18
08:28:56 2011
+++ /src/main/org/brailleblaster/wordprocessor/DaisyView.java Fri Oct 21
09:20:33 2011
@@ -36,9 +36,8 @@
import org.eclipse.swt.events.VerifyEvent;
import org.eclipse.swt.custom.VerifyKeyListener;
-class DaisyView {
-StyledText view;
-boolean hasFocus = true;
+class DaisyView extends AbstractVieww {
+// (in AbstractView) StyledText view;
DaisyView (Shell documentWindow) {
view = new StyledText (documentWindow, SWT.BORDER | SWT.H_SCROLL |
SWT.V_SCROLL | SWT.WRAP);
=======================================
--- /src/main/org/brailleblaster/wordprocessor/DocumentManager.java Fri Oct
21 08:05:32 2011
+++ /src/main/org/brailleblaster/wordprocessor/DocumentManager.java Fri Oct
21 09:20:33 2011
@@ -68,7 +68,7 @@
String documentName = null;
BBToolBar toolBar;
BBMenu menu;
-ProtoView activeView;
+AbstractView activeView;
DaisyView daisy;
BrailleView braille;
BBStatusBar statusBar;
@@ -102,7 +102,7 @@
toolBar = new BBToolBar (this);
daisy = new DaisyView (documentWindow);
braille = new BrailleView (documentWindow);
-activeView = (ProtoView)daisy;
+// activeView = (ProtoView)daisy;
statusBar = new BBStatusBar (documentWindow);
documentWindow.setSize (1000, 700);
documentWindow.layout(true, true);
Other related posts:
- » [brailleblaster] push by john.bo...@xxxxxxxxxxxxxxxxx - AbstractPreview and changes on 2011-10-21 16:21 GMT - brailleblaster