[brailleblaster] [brailleblaster.newdesign] 3 new revisions pushed by kcre...@xxxxxxxxx on 2013-01-11 14:00 GMT

  • From: brailleblaster@xxxxxxxxxxxxxx
  • To: brailleblaster@xxxxxxxxxxxxx
  • Date: Fri, 11 Jan 2013 14:00:16 +0000

3 new revisions:

Revision: b7955f32d286
Branch:   default
Author:   Keith Creasy <kcreasy@xxxxxxxxx>
Date:     Thu Jan 10 11:53:41 2013
Log: Removed DaisyContent and DaisyView. Replaced with TextView and the emb...
http://code.google.com/p/brailleblaster/source/detail?r=b7955f32d286&repo=newdesign

Revision: f671ba50801d
Branch:   default
Author:   Keith Creasy <kcreasy@xxxxxxxxx>
Date:     Fri Jan 11 05:50:13 2013
Log: Removed classes DaisyView and DaisyContent. Added TextView with embedd...
http://code.google.com/p/brailleblaster/source/detail?r=f671ba50801d&repo=newdesign

Revision: aeec9b89e563
Branch:   default
Author:   Keith Creasy <kcreasy@xxxxxxxxx>
Date:     Fri Jan 11 05:59:27 2013
Log: Fixed some odd conflicts. Need to study Mercurial a bit more I think.
http://code.google.com/p/brailleblaster/source/detail?r=aeec9b89e563&repo=newdesign

==============================================================================
Revision: b7955f32d286
Branch:   default
Author:   Keith Creasy <kcreasy@xxxxxxxxx>
Date:     Thu Jan 10 11:53:41 2013
Log: Removed DaisyContent and DaisyView. Replaced with TextView and the embedded class TextContent
http://code.google.com/p/brailleblaster/source/detail?r=b7955f32d286&repo=newdesign

Added:
 /src/main/org/brailleblaster/wordprocessor/SaveOptionsDialog.java.orig
 /src/main/org/brailleblaster/wordprocessor/TextView.java
Deleted:
 /src/main/org/brailleblaster/wordprocessor/DaisyContent.java
 /src/main/org/brailleblaster/wordprocessor/DaisyView.java

=======================================
--- /dev/null
+++ /src/main/org/brailleblaster/wordprocessor/SaveOptionsDialog.java.orig Thu Jan 10 11:53:41 2013
@@ -0,0 +1,152 @@
+package org.brailleblaster.wordprocessor;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.TraverseEvent;
+import org.eclipse.swt.events.TraverseListener;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Dialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Monitor;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Control;
+
+
+import org.brailleblaster.BBIni;
+import org.brailleblaster.localization.LocaleHandler;
+import org.brailleblaster.util.Notify;
+
+enum SaveSelection {
+    TEXT_AND_BRAILLE, TEXT_ONLY, CANCELLED
+}
+public class SaveOptionsDialog extends Dialog {
+        SaveSelection result = SaveSelection.CANCELLED;
+        private LocaleHandler lh = new LocaleHandler();
+        private boolean textAndBraille;
+        private BrailleView braille;
+
+
+        public SaveOptionsDialog (Shell parent, int style) {
+                super (parent, style);
+        }
+        public SaveOptionsDialog (Shell parent) {
+                this (parent, SWT.NONE);
+        }
+        public SaveSelection open () {
+                Shell parent = getParent();
+                Display display = parent.getDisplay();
+ final Shell selShell = new Shell(parent, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL | SWT.CENTER);
+                selShell.setText(getText());
+        selShell.setMinimumSize (300, 150);
+
+        FillLayout layout = new FillLayout(SWT.VERTICAL);
+        layout.marginWidth = 8;
+        selShell.setLayout(layout);
+        final Composite radioGroup = new Composite(selShell, SWT.NONE);
+        radioGroup.setLayout(new RowLayout(SWT.VERTICAL));
+        final Button b1 = new Button (radioGroup, SWT.RADIO);
+               b1.setText(lh.localValue("saveTextBraille"));
+/*             if (BBIni.useUtd()) {
+                       b1.setSelection(true);
+               } else {
+*/
+                   b1.setEnabled(false);
+//             }
+               b1.pack();
+
+               final Button b2 = new Button (radioGroup, SWT.RADIO);
+               b2.setText(lh.localValue("saveTextOnly"));
+               b2.pack();
+               radioGroup.pack();
+               Composite c = new Composite(selShell, SWT.NONE);
+               RowLayout clayout = new RowLayout();
+               clayout.type = SWT.HORIZONTAL;
+               clayout.spacing = 30;
+               clayout.marginWidth = 8;
+               clayout.center = true;
+               clayout.pack = true;
+               clayout.justify = true;
+               c.setLayout(clayout);
+
+               Button b3 = new Button (c, SWT.PUSH);
+               b3.setText(lh.localValue("buttonSave"));
+               b3.pack();
+
+               Button b4 = new Button (c, SWT.PUSH);
+               b4.setText(lh.localValue("buttonCancel"));
+               b4.pack();
+
+               c.pack();
+
+               Control tabList[] = new Control[] { radioGroup, c, radioGroup};
+               try {
+                       selShell.setTabList(tabList);
+               } catch (IllegalArgumentException e) {
+                       System.err.println ("setTabList exception " + 
e.getMessage());
+               }
+
+               selShell.setDefaultButton(b3);
+
+               selShell.pack();
+
+               Monitor primary = display.getPrimaryMonitor ();
+               Rectangle bounds = primary.getBounds ();
+               Rectangle rect = selShell.getBounds ();
+               int x = bounds.x + (bounds.width - rect.width) / 2;
+               int y = bounds.y + (bounds.height - rect.height) / 2;
+               selShell.setLocation (x, y);
+
+               /* text and Braille */
+               b1.addSelectionListener (new SelectionAdapter() {
+               public void widgetSelected (SelectionEvent e) {
+                       textAndBraille = true;
+               }
+       });
+
+               /* Text only */
+               b2.addSelectionListener (new SelectionAdapter() {
+               public void widgetSelected (SelectionEvent e) {
+                       textAndBraille = false;
+               }
+       });
+
+               /* Save */
+       b3.addSelectionListener (new SelectionAdapter() {
+               public void widgetSelected (SelectionEvent e) {
+
+                       if ((b1.getSelection()) || (b2.getSelection()) ) {
+                               //FO make sure we get the default selection
+                               if (textAndBraille || b1.getSelection()) {
+                                       result = SaveSelection.TEXT_AND_BRAILLE;
+                               } else {
+                                       result = SaveSelection.TEXT_ONLY;
+                               }
+                               selShell.dispose();
+                       } else {
+                                new Notify (lh.localValue("mustSelect"));
+                       }
+               }
+       });
+
+       /* Cancel */
+       b4.addSelectionListener (new SelectionAdapter() {
+               public void widgetSelected (SelectionEvent e) {
+               selShell.dispose();
+               }
+       });
+
+
+        selShell.open();
+        while (!selShell.isDisposed()) {
+                if (!display.readAndDispatch()) display.sleep();
+            }
+
+        return result;
+        }
+}
=======================================
--- /dev/null
+++ /src/main/org/brailleblaster/wordprocessor/TextView.java Thu Jan 10 11:53:41 2013
@@ -0,0 +1,55 @@
+/* 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 org.eclipse.swt.*;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.events.VerifyEvent;
+import org.eclipse.swt.custom.VerifyKeyListener;
+
+class TextView extends AbstractView {
+
+TextView (Shell documentWindow) {
+// super (documentWindow, 0, 55, 12, 92);
+super (documentWindow, 0, 49, 12, 92);
+
+}
+
+/* This is a derivative work from
+ * org.eclipse.swt.custom.DefaultContent.java
+*/
+
+private class TextContent extends AbstractContent {
+}
+
+
+}
=======================================
--- /src/main/org/brailleblaster/wordprocessor/DaisyContent.java Fri Oct 21 09:20:33 2011
+++ /dev/null
@@ -1,38 +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
-*/
-
-/* This is a derivative work from
- * org.eclipse.swt.custom.DefaultContent.java
-*/
-
-package org.brailleblaster.wordprocessor;
-
-import org.eclipse.swt.*;
-
-class DaisyContent extends AbstractContent {
-}
=======================================
--- /src/main/org/brailleblaster/wordprocessor/DaisyView.java Wed Jul 18 15:52:42 2012
+++ /dev/null
@@ -1,47 +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 org.eclipse.swt.*;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.events.VerifyEvent;
-import org.eclipse.swt.custom.VerifyKeyListener;
-
-class DaisyView extends AbstractView {
-
-DaisyView (Shell documentWindow) {
-// super (documentWindow, 0, 55, 12, 92);
-super (documentWindow, 0, 49, 12, 92);
-
-}
-
-}

==============================================================================
Revision: f671ba50801d
Branch:   default
Author:   Keith Creasy <kcreasy@xxxxxxxxx>
Date:     Fri Jan 11 05:50:13 2013
Log: Removed classes DaisyView and DaisyContent. Added TextView with embedded TextContent.
http://code.google.com/p/brailleblaster/source/detail?r=f671ba50801d&repo=newdesign

Added:
 /src/main/org/brailleblaster/wordprocessor/TextView.java
Deleted:
 /src/main/org/brailleblaster/wordprocessor/DaisyContent.java
 /src/main/org/brailleblaster/wordprocessor/DaisyView.java

=======================================
--- /dev/null
+++ /src/main/org/brailleblaster/wordprocessor/TextView.java Fri Jan 11 05:50:13 2013
@@ -0,0 +1,54 @@
+/* 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 org.eclipse.swt.*;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.events.VerifyEvent;
+import org.eclipse.swt.custom.VerifyKeyListener;
+
+class TextView extends AbstractView {
+
+TextView (Shell documentWindow) {
+// super (documentWindow, 0, 55, 12, 92);
+super (documentWindow, 0, 49, 12, 92);
+
+}
+
+/* This is a derivative work from
+ * org.eclipse.swt.custom.DefaultContent.java
+*/
+
+
+private class TextContent extends AbstractContent {
+}
+}
=======================================
--- /src/main/org/brailleblaster/wordprocessor/DaisyContent.java Fri Oct 21 09:20:33 2011
+++ /dev/null
@@ -1,38 +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
-*/
-
-/* This is a derivative work from
- * org.eclipse.swt.custom.DefaultContent.java
-*/
-
-package org.brailleblaster.wordprocessor;
-
-import org.eclipse.swt.*;
-
-class DaisyContent extends AbstractContent {
-}
=======================================
--- /src/main/org/brailleblaster/wordprocessor/DaisyView.java Wed Jul 18 15:52:42 2012
+++ /dev/null
@@ -1,47 +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 org.eclipse.swt.*;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.events.VerifyEvent;
-import org.eclipse.swt.custom.VerifyKeyListener;
-
-class DaisyView extends AbstractView {
-
-DaisyView (Shell documentWindow) {
-// super (documentWindow, 0, 55, 12, 92);
-super (documentWindow, 0, 49, 12, 92);
-
-}
-
-}

==============================================================================
Revision: aeec9b89e563
Branch:   default
Author:   Keith Creasy <kcreasy@xxxxxxxxx>
Date:     Fri Jan 11 05:59:27 2013
Log: Fixed some odd conflicts. Need to study Mercurial a bit more I think.
http://code.google.com/p/brailleblaster/source/detail?r=aeec9b89e563&repo=newdesign

Added:
 /src/main/org/brailleblaster/wordprocessor/TextView.java.orig
Modified:
 /src/main/org/brailleblaster/wordprocessor/TextView.java

=======================================
--- /dev/null
+++ /src/main/org/brailleblaster/wordprocessor/TextView.java.orig Fri Jan 11 05:59:27 2013
@@ -0,0 +1,54 @@
+/* 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 org.eclipse.swt.*;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.events.VerifyEvent;
+import org.eclipse.swt.custom.VerifyKeyListener;
+
+class TextView extends AbstractView {
+
+TextView (Shell documentWindow) {
+// super (documentWindow, 0, 55, 12, 92);
+super (documentWindow, 0, 49, 12, 92);
+
+}
+
+/* This is a derivative work from
+ * org.eclipse.swt.custom.DefaultContent.java
+*/
+
+
+private class TextContent extends AbstractContent {
+}
+}
=======================================
--- /src/main/org/brailleblaster/wordprocessor/TextView.java Fri Jan 11 05:50:13 2013 +++ /src/main/org/brailleblaster/wordprocessor/TextView.java Fri Jan 11 05:59:27 2013
@@ -48,7 +48,7 @@
  * org.eclipse.swt.custom.DefaultContent.java
 */

-
 private class TextContent extends AbstractContent {
 }
+
 }

Other related posts:

  • » [brailleblaster] [brailleblaster.newdesign] 3 new revisions pushed by kcre...@xxxxxxxxx on 2013-01-11 14:00 GMT - brailleblaster