[jsword-svn] bibledesktop/java/main/org/crosswire/bibledesktop/desktop s

jswordcvs at crosswire.org jswordcvs at crosswire.org
Tue Jun 21 20:50:51 MST 2005


Update of /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/desktop
In directory www.crosswire.org:/tmp/cvs-serv1237/java/main/org/crosswire/bibledesktop/desktop

Modified Files:
	DesktopActions.java Splash.java Desktop.properties 
	AboutPane.java Msg.java StatusBar.java package.html 
	Desktop.java ViewSourcePane.java XSLTProperty.java 
Log Message:
Added some more view options for formatting of verse numbers.
Changed JSword to BibleDesktop in the license for BibleDesktop.
Added org.gnu.lgpl.License.
Updated GPL to use html taken from the GPL website.

Index: XSLTProperty.java
===================================================================
RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/desktop/XSLTProperty.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** XSLTProperty.java	17 May 2005 00:44:31 -0000	1.6
--- XSLTProperty.java	22 Jun 2005 03:50:49 -0000	1.7
***************
*** 1,5 ****
  /**
   * Distribution License:
!  * JSword is free software; you can redistribute it and/or modify it under
   * the terms of the GNU General Public License, version 2 as published by
   * the Free Software Foundation. This program is distributed in the hope
--- 1,5 ----
  /**
   * Distribution License:
!  * BibleDesktop is free software; you can redistribute it and/or modify it under
   * the terms of the GNU General Public License, version 2 as published by
   * the Free Software Foundation. This program is distributed in the hope
***************
*** 56,59 ****
--- 56,74 ----
  
      /**
+      * Show chapter and verse numbers.
+      */
+     public static final XSLTProperty CV = new XSLTProperty("CVNum", false); //$NON-NLS-1$
+ 
+     /**
+      * Show book, chapter and verse numbers.
+      */
+     public static final XSLTProperty BCV = new XSLTProperty("BCVNum", false); //$NON-NLS-1$
+ 
+     /**
+      * Show no verse numbers
+      */
+     public static final XSLTProperty NO_VERSE_NUMBERS = new XSLTProperty("NoVNum", false); //$NON-NLS-1$
+ 
+     /**
       * Show verse numbers as a superscript.
       */
***************
*** 184,187 ****
--- 199,205 ----
          START_VERSE_ON_NEWLINE,
          VERSE_NUMBERS,
+         CV,
+         BCV,
+         NO_VERSE_NUMBERS,
          TINY_VERSE_NUMBERS,
          NOTES,

Index: Msg.java
===================================================================
RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/desktop/Msg.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** Msg.java	2 Jun 2005 23:40:31 -0000	1.17
--- Msg.java	22 Jun 2005 03:50:49 -0000	1.18
***************
*** 1,5 ****
  /**
   * Distribution License:
!  * JSword is free software; you can redistribute it and/or modify it under
   * the terms of the GNU General Public License, version 2 as published by
   * the Free Software Foundation. This program is distributed in the hope
--- 1,5 ----
  /**
   * Distribution License:
!  * BibleDesktop is free software; you can redistribute it and/or modify it under
   * the terms of the GNU General Public License, version 2 as published by
   * the Free Software Foundation. This program is distributed in the hope

Index: AboutPane.java
===================================================================
RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/desktop/AboutPane.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** AboutPane.java	2 Jun 2005 23:40:31 -0000	1.14
--- AboutPane.java	22 Jun 2005 03:50:49 -0000	1.15
***************
*** 1,5 ****
  /**
   * Distribution License:
!  * JSword is free software; you can redistribute it and/or modify it under
   * the terms of the GNU General Public License, version 2 as published by
   * the Free Software Foundation. This program is distributed in the hope
--- 1,5 ----
  /**
   * Distribution License:
!  * BibleDesktop is free software; you can redistribute it and/or modify it under
   * the terms of the GNU General Public License, version 2 as published by
   * the Free Software Foundation. This program is distributed in the hope

Index: Desktop.properties
===================================================================
RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/desktop/Desktop.properties,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** Desktop.properties	6 Apr 2005 04:07:41 -0000	1.8
--- Desktop.properties	22 Jun 2005 03:50:49 -0000	1.9
***************
*** 270,273 ****
--- 270,282 ----
  VLine.AcceleratorKey.Modifiers=
  
+ Verse.Name=Verse Numbers
+ Verse.ShortDescription=Verse number style
+ Verse.LongDescription=Set the style for verse numbers
+ Verse.SmallIcon=
+ Verse.LargeIcon=
+ Verse.MnemonicKey=
+ Verse.AcceleratorKey=
+ Verse.AcceleratorKey.Modifiers=
+ 
  VNum.Name=Show Verse Numbers
  VNum.ShortDescription=Show Verse numbers
***************
*** 279,282 ****
--- 288,318 ----
  VNum.AcceleratorKey.Modifiers=
  
+ CVNum.Name=Show Chapter and Verse Numbers
+ CVNum.ShortDescription=Show Chapter and Verse numbers
+ CVNum.LongDescription=Show Chapter and verse numbers
+ CVNum.SmallIcon=
+ CVNum.LargeIcon=
+ CVNum.MnemonicKey=
+ CVNum.AcceleratorKey=
+ CVNum.AcceleratorKey.Modifiers=
+ 
+ BCVNum.Name=Show Book, Chapter and Verse Numbers
+ BCVNum.ShortDescription=Show Book, Chapter and Verse numbers
+ BCVNum.LongDescription=Show Book, Chapter and verse numbers
+ BCVNum.SmallIcon=
+ BCVNum.LargeIcon=
+ BCVNum.MnemonicKey=
+ BCVNum.AcceleratorKey=
+ BCVNum.AcceleratorKey.Modifiers=
+ 
+ NoVNum.Name=Hide Verse Numbers
+ NoVNum.ShortDescription=Hide Verse numbers
+ NoVNum.LongDescription=Hide verse numbers
+ NoVNum.SmallIcon=
+ NoVNum.LargeIcon=
+ NoVNum.MnemonicKey=
+ NoVNum.AcceleratorKey=
+ NoVNum.AcceleratorKey.Modifiers=
+ 
  TinyVNum.Name=Use Small Verse Numbers
  TinyVNum.ShortDescription=Use small verse numbers

Index: DesktopActions.java
===================================================================
RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/desktop/DesktopActions.java,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** DesktopActions.java	17 May 2005 00:44:31 -0000	1.29
--- DesktopActions.java	22 Jun 2005 03:50:49 -0000	1.30
***************
*** 1,5 ****
  /**
   * Distribution License:
!  * JSword is free software; you can redistribute it and/or modify it under
   * the terms of the GNU General Public License, version 2 as published by
   * the Free Software Foundation. This program is distributed in the hope
--- 1,5 ----
  /**
   * Distribution License:
!  * BibleDesktop is free software; you can redistribute it and/or modify it under
   * the terms of the GNU General Public License, version 2 as published by
   * the Free Software Foundation. This program is distributed in the hope
***************
*** 260,267 ****
      }
  
!     public void doVNum(ActionEvent ev)
      {
!         JCheckBoxMenuItem toggle = (JCheckBoxMenuItem) ev.getSource();
!         XSLTProperty.VERSE_NUMBERS.setState(toggle.isSelected());
          BibleViewPane view = (BibleViewPane) getDesktop().getViews().getSelected();
          SplitBookDataDisplay da = view.getPassagePane();
--- 260,269 ----
      }
  
!     public void doVNum()
      {
!         XSLTProperty.VERSE_NUMBERS.setState(true);
!         XSLTProperty.CV.setState(false);
!         XSLTProperty.BCV.setState(false);
!         XSLTProperty.NO_VERSE_NUMBERS.setState(false);
          BibleViewPane view = (BibleViewPane) getDesktop().getViews().getSelected();
          SplitBookDataDisplay da = view.getPassagePane();
***************
*** 278,281 ****
--- 280,305 ----
      }
  
+     public void doBCVNum()
+     {
+         XSLTProperty.VERSE_NUMBERS.setState(false);
+         XSLTProperty.CV.setState(false);
+         XSLTProperty.BCV.setState(true);
+         XSLTProperty.NO_VERSE_NUMBERS.setState(false);
+         BibleViewPane view = (BibleViewPane) getDesktop().getViews().getSelected();
+         SplitBookDataDisplay da = view.getPassagePane();
+         da.getBookDataDisplay().refresh();
+     }
+ 
+     public void doCVNum()
+     {
+         XSLTProperty.VERSE_NUMBERS.setState(false);
+         XSLTProperty.CV.setState(true);
+         XSLTProperty.BCV.setState(false);
+         XSLTProperty.NO_VERSE_NUMBERS.setState(false);
+         BibleViewPane view = (BibleViewPane) getDesktop().getViews().getSelected();
+         SplitBookDataDisplay da = view.getPassagePane();
+         da.getBookDataDisplay().refresh();
+     }
+ 
      public void doNotes(ActionEvent ev)
      {
***************
*** 451,454 ****
--- 475,479 ----
      static final String STATUS_TOGGLE = "StatusToggle"; //$NON-NLS-1$
      static final String SIDEBAR_TOGGLE = "SidebarToggle"; //$NON-NLS-1$
+     static final String VERSE = "Verse"; //$NON-NLS-1$
      static final String VIEW_SOURCE = "ViewSource"; //$NON-NLS-1$
      static final String BOOKS = "Books"; //$NON-NLS-1$

Index: package.html
===================================================================
RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/desktop/package.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** package.html	20 Apr 2004 20:53:40 -0000	1.1
--- package.html	22 Jun 2005 03:50:49 -0000	1.2
***************
*** 2,6 ****
  
  <head>
! <title>com.eireneh.bible.swing</title>
  </head>
  
--- 2,6 ----
  
  <head>
! <title>org.crosswire.bibledesktop.desktop</title>
  </head>
  

Index: Splash.java
===================================================================
RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/desktop/Splash.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** Splash.java	17 May 2005 00:44:31 -0000	1.15
--- Splash.java	22 Jun 2005 03:50:49 -0000	1.16
***************
*** 1,5 ****
  /**
   * Distribution License:
!  * JSword is free software; you can redistribute it and/or modify it under
   * the terms of the GNU General Public License, version 2 as published by
   * the Free Software Foundation. This program is distributed in the hope
--- 1,5 ----
  /**
   * Distribution License:
!  * BibleDesktop is free software; you can redistribute it and/or modify it under
   * the terms of the GNU General Public License, version 2 as published by
   * the Free Software Foundation. This program is distributed in the hope

Index: StatusBar.java
===================================================================
RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/desktop/StatusBar.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** StatusBar.java	17 May 2005 00:44:31 -0000	1.10
--- StatusBar.java	22 Jun 2005 03:50:49 -0000	1.11
***************
*** 1,5 ****
  /**
   * Distribution License:
!  * JSword is free software; you can redistribute it and/or modify it under
   * the terms of the GNU General Public License, version 2 as published by
   * the Free Software Foundation. This program is distributed in the hope
--- 1,5 ----
  /**
   * Distribution License:
!  * BibleDesktop is free software; you can redistribute it and/or modify it under
   * the terms of the GNU General Public License, version 2 as published by
   * the Free Software Foundation. This program is distributed in the hope

Index: ViewSourcePane.java
===================================================================
RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/desktop/ViewSourcePane.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** ViewSourcePane.java	11 Jun 2005 20:41:15 -0000	1.19
--- ViewSourcePane.java	22 Jun 2005 03:50:49 -0000	1.20
***************
*** 1,5 ****
  /**
   * Distribution License:
!  * JSword is free software; you can redistribute it and/or modify it under
   * the terms of the GNU General Public License, version 2 as published by
   * the Free Software Foundation. This program is distributed in the hope
--- 1,5 ----
  /**
   * Distribution License:
!  * BibleDesktop is free software; you can redistribute it and/or modify it under
   * the terms of the GNU General Public License, version 2 as published by
   * the Free Software Foundation. This program is distributed in the hope
***************
*** 93,101 ****
                  htmlsep.setParameter(XSLTProperty.START_VERSE_ON_NEWLINE.getName(), Boolean.toString(XSLTProperty.START_VERSE_ON_NEWLINE.getState()));
                  htmlsep.setParameter(XSLTProperty.VERSE_NUMBERS.getName(), Boolean.toString(XSLTProperty.VERSE_NUMBERS.getState()));
                  htmlsep.setParameter(XSLTProperty.TINY_VERSE_NUMBERS.getName(), Boolean.toString(XSLTProperty.TINY_VERSE_NUMBERS.getState()));
                  htmlsep.setParameter(XSLTProperty.NOTES.getName(), Boolean.toString(XSLTProperty.NOTES.getState()));
                  htmlsep.setParameter(XSLTProperty.XREF.getName(), Boolean.toString(XSLTProperty.XREF.getState()));
-                 htmlsep.setParameter("direction", direction ? "ltr" : "rtl"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
              }
  
              // This really looks nice but its performance was terrible.
--- 93,103 ----
                  htmlsep.setParameter(XSLTProperty.START_VERSE_ON_NEWLINE.getName(), Boolean.toString(XSLTProperty.START_VERSE_ON_NEWLINE.getState()));
                  htmlsep.setParameter(XSLTProperty.VERSE_NUMBERS.getName(), Boolean.toString(XSLTProperty.VERSE_NUMBERS.getState()));
+                 htmlsep.setParameter(XSLTProperty.CV.getName(), Boolean.toString(XSLTProperty.CV.getState()));
+                 htmlsep.setParameter(XSLTProperty.BCV.getName(), Boolean.toString(XSLTProperty.BCV.getState()));
                  htmlsep.setParameter(XSLTProperty.TINY_VERSE_NUMBERS.getName(), Boolean.toString(XSLTProperty.TINY_VERSE_NUMBERS.getState()));
                  htmlsep.setParameter(XSLTProperty.NOTES.getName(), Boolean.toString(XSLTProperty.NOTES.getState()));
                  htmlsep.setParameter(XSLTProperty.XREF.getName(), Boolean.toString(XSLTProperty.XREF.getState()));
              }
+             htmlsep.setParameter("direction", direction ? "ltr" : "rtl"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
  
              // This really looks nice but its performance was terrible.

Index: Desktop.java
===================================================================
RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/desktop/Desktop.java,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** Desktop.java	11 Jun 2005 20:41:15 -0000	1.47
--- Desktop.java	22 Jun 2005 03:50:49 -0000	1.48
***************
*** 1,5 ****
  /**
   * Distribution License:
!  * JSword is free software; you can redistribute it and/or modify it under
   * the terms of the GNU General Public License, version 2 as published by
   * the Free Software Foundation. This program is distributed in the hope
--- 1,5 ----
  /**
   * Distribution License:
!  * BibleDesktop is free software; you can redistribute it and/or modify it under
   * the terms of the GNU General Public License, version 2 as published by
   * the Free Software Foundation. This program is distributed in the hope
***************
*** 38,41 ****
--- 38,42 ----
  import java.util.Set;
  
+ import javax.swing.ButtonGroup;
  import javax.swing.ImageIcon;
  import javax.swing.JCheckBoxMenuItem;
***************
*** 47,50 ****
--- 48,52 ----
  import javax.swing.JPanel;
  import javax.swing.JPopupMenu;
+ import javax.swing.JRadioButtonMenuItem;
  import javax.swing.JSplitPane;
  import javax.swing.SwingUtilities;
***************
*** 96,106 ****
  
  /**
!  * A container for various tools, particularly the BibleGenerator and
!  * the Tester. These tools are generally only of use to developers, and
!  * not to end users.
!  *
!  * <p>2 Things to think about, if you change the LaF when you have run
!  * some tests already, then the window can grow quite a lot. Also do we
!  * want to disable the Exit button if work is going on?</p>
   *
   * @see gnu.gpl.License for license details.
--- 98,102 ----
  
  /**
!  * The Desktop is the user's view of BibleDesktop.
   *
   * @see gnu.gpl.License for license details.
***************
*** 236,240 ****
      {
          barStatus = new StatusBar();
-         pnlTbar = new ToolBar(this);
          //barSide = new SidebarPane();
          //barBook = new ReferencedPane();
--- 232,235 ----
***************
*** 251,254 ****
--- 246,352 ----
      private void init()
      {
+         addWindowListener(new WindowAdapter()
+         {
+             public void windowClosed(WindowEvent ev)
+             {
+                 actions.getAction(DesktopActions.EXIT).actionPerformed(new ActionEvent(this, 0, EMPTY_STRING));
+             }
+         });
+ 
+         setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
+ 
+         TDIViewLayout tdi = (TDIViewLayout) LayoutType.TDI.getLayout();
+         tdi.addPopup(createPopupMenu());
+ 
+         //barBook.addHyperlinkListener(this);
+         //barSide.addHyperlinkListener(this);
+         reference.addURLEventListener(this);
+ 
+         sptBooks.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
+         sptBooks.setRightComponent(reference);
+         sptBooks.setLeftComponent(views.getDesktop());
+         sptBooks.setResizeWeight(0.8D);
+         sptBooks.setDividerSize(7);
+         sptBooks.setOpaque(true);
+         sptBooks.setBorder(null);
+ 
+         // The toolbar needs to be in the outermost container, on the border
+         // And the only other item in that container can be CENTER
+         JComponent contentPane = (JComponent) getContentPane();
+         contentPane.setLayout(new BorderLayout());
+         ToolBar toolbar = createToolBar();
+         contentPane.add(toolbar, BorderLayout.NORTH);
+ 
+         // Put everything else in its own panel
+         corePanel = new JPanel(new BorderLayout());
+         corePanel.add(barStatus, BorderLayout.SOUTH);
+         corePanel.add(sptBooks, BorderLayout.CENTER);
+         contentPane.add(corePanel, BorderLayout.CENTER);
+         setJMenuBar(createMenuBar(toolbar));
+ 
+         setIconImage(ICON_APP.getImage());
+         setEnabled(true);
+         setTitle(Msg.getApplicationTitle());
+     }
+ 
+     private JMenuBar createMenuBar(ToolBar toolbar)
+     {
+         JMenuBar barMenu = new JMenuBar();
+         barMenu.add(createFileMenu());
+         barMenu.add(createEditMenu());
+         barMenu.add(createViewMenu(toolbar));
+         barMenu.add(createGoMenu());
+         barMenu.add(createToolsMenu());
+         barMenu.add(createHelpMenu());
+         return barMenu;
+     }
+ 
+     private JPopupMenu createPopupMenu()
+     {
+         JPopupMenu popup = new JPopupMenu();
+         popup.add(views.getContextAction(ViewManager.NEW_TAB)).addMouseListener(barStatus);
+         popup.add(views.getContextAction(ViewManager.CLOSE_VIEW)).addMouseListener(barStatus);
+         popup.add(views.getContextAction(ViewManager.CLEAR_VIEW)).addMouseListener(barStatus);
+         popup.add(views.getContextAction(ViewManager.CLOSE_OTHER_VIEWS)).addMouseListener(barStatus);
+         popup.add(views.getContextAction(ViewManager.CLOSE_ALL_VIEWS)).addMouseListener(barStatus);
+         popup.addSeparator();
+         popup.add(actions.getAction(DesktopActions.OPEN)).addMouseListener(barStatus);
+         popup.add(actions.getAction(DesktopActions.SAVE)).addMouseListener(barStatus);
+         popup.add(actions.getAction(DesktopActions.SAVE_AS)).addMouseListener(barStatus);
+         popup.add(actions.getAction(DesktopActions.SAVE_ALL)).addMouseListener(barStatus);
+         return popup;
+     }
+ 
+     private ToolBar createToolBar()
+     {
+         ToolBar toolbar = new ToolBar(this);
+         toolbar.setRollover(true);
+         toolbar.setFloatable(true);
+ 
+         toolbar.add(views.getContextAction(ViewManager.NEW_TAB)).addMouseListener(barStatus);
+         toolbar.add(actions.getAction(DesktopActions.OPEN)).addMouseListener(barStatus);
+         toolbar.add(actions.getAction(DesktopActions.SAVE)).addMouseListener(barStatus);
+         toolbar.addSeparator();
+         //toolbar.add(actions.getAction(DesktopActions.CUT)).addMouseListener(barStatus);
+         toolbar.add(actions.getAction(DesktopActions.COPY)).addMouseListener(barStatus);
+         //toolbar.add(actions.getAction(DesktopActions.PASTE)).addMouseListener(barStatus);
+         toolbar.addSeparator();
+         toolbar.add(actions.getAction(DesktopActions.BACK)).addMouseListener(barStatus);
+         toolbar.add(actions.getAction(DesktopActions.FORWARD)).addMouseListener(barStatus);
+         toolbar.addSeparator();
+         //toolbar.add(actions.getAction("Generate")).addMouseListener(barStatus);
+         //toolbar.add(actions.getAction("Diff")).addMouseListener(barStatus);
+         //toolbar.addSeparator();
+         toolbar.add(actions.getAction(DesktopActions.CONTENTS)).addMouseListener(barStatus);
+         toolbar.add(actions.getAction(DesktopActions.ABOUT)).addMouseListener(barStatus);
+ 
+         return toolbar;
+     }
+     /**
+      * Create the file menu
+      * @return the file menu
+      */
+     private JMenu createFileMenu()
+     {
          JMenu menuFile = new JMenu(actions.getAction(DesktopActions.FILE));
          menuFile.add(views.getContextAction(ViewManager.NEW_TAB)).addMouseListener(barStatus);
***************
*** 268,287 ****
          menuFile.add(actions.getAction(DesktopActions.EXIT)).addMouseListener(barStatus);
          menuFile.setToolTipText(null);
  
!         JPopupMenu popup = new JPopupMenu();
!         popup.add(views.getContextAction(ViewManager.NEW_TAB)).addMouseListener(barStatus);
!         popup.add(views.getContextAction(ViewManager.CLOSE_VIEW)).addMouseListener(barStatus);
!         popup.add(views.getContextAction(ViewManager.CLEAR_VIEW)).addMouseListener(barStatus);
!         popup.add(views.getContextAction(ViewManager.CLOSE_OTHER_VIEWS)).addMouseListener(barStatus);
!         popup.add(views.getContextAction(ViewManager.CLOSE_ALL_VIEWS)).addMouseListener(barStatus);
!         popup.addSeparator();
!         popup.add(actions.getAction(DesktopActions.OPEN)).addMouseListener(barStatus);
!         popup.add(actions.getAction(DesktopActions.SAVE)).addMouseListener(barStatus);
!         popup.add(actions.getAction(DesktopActions.SAVE_AS)).addMouseListener(barStatus);
!         popup.add(actions.getAction(DesktopActions.SAVE_ALL)).addMouseListener(barStatus);
! 
!         TDIViewLayout tdi = (TDIViewLayout) LayoutType.TDI.getLayout();
!         tdi.addPopup(popup);
! 
          JMenu menuEdit = new JMenu(actions.getAction(DesktopActions.EDIT));
          //menuEdit.add(actions.getAction(DesktopActions.CUT)).addMouseListener(barStatus);
--- 366,374 ----
          menuFile.add(actions.getAction(DesktopActions.EXIT)).addMouseListener(barStatus);
          menuFile.setToolTipText(null);
+         return menuFile;
+     }
  
!     private JMenu createEditMenu()
!     {
          JMenu menuEdit = new JMenu(actions.getAction(DesktopActions.EDIT));
          //menuEdit.add(actions.getAction(DesktopActions.CUT)).addMouseListener(barStatus);
***************
*** 289,307 ****
          //menuEdit.add(actions.getAction(DesktopActions.PASTE)).addMouseListener(barStatus);
          menuEdit.setToolTipText(null);
  
          JMenu menuGo = new JMenu(actions.getAction(DesktopActions.GO));
          menuGo.add(actions.getAction(DesktopActions.BACK)).addMouseListener(barStatus);
          menuGo.add(actions.getAction(DesktopActions.FORWARD)).addMouseListener(barStatus);
! 
          JMenu menuView = new JMenu(actions.getAction(DesktopActions.VIEW));
!         JCheckBoxMenuItem toggle = new JCheckBoxMenuItem(actions.getAction(XSLTProperty.START_VERSE_ON_NEWLINE.getName()));
!         toggle.setSelected(XSLTProperty.START_VERSE_ON_NEWLINE.getDefault());
!         menuView.add(toggle).addMouseListener(barStatus);
!         toggle = new JCheckBoxMenuItem(actions.getAction(XSLTProperty.VERSE_NUMBERS.getName()));
!         toggle.setSelected(XSLTProperty.VERSE_NUMBERS.getDefault());
!         menuView.add(toggle).addMouseListener(barStatus);
          toggle = new JCheckBoxMenuItem(actions.getAction(XSLTProperty.TINY_VERSE_NUMBERS.getName()));
          toggle.setSelected(XSLTProperty.TINY_VERSE_NUMBERS.getDefault());
          menuView.add(toggle).addMouseListener(barStatus);
          toggle = new JCheckBoxMenuItem(actions.getAction(XSLTProperty.NOTES.getName()));
          toggle.setSelected(XSLTProperty.NOTES.getDefault());
--- 376,424 ----
          //menuEdit.add(actions.getAction(DesktopActions.PASTE)).addMouseListener(barStatus);
          menuEdit.setToolTipText(null);
+         return menuEdit;
+     }
  
+     private JMenu createGoMenu()
+     {
          JMenu menuGo = new JMenu(actions.getAction(DesktopActions.GO));
          menuGo.add(actions.getAction(DesktopActions.BACK)).addMouseListener(barStatus);
          menuGo.add(actions.getAction(DesktopActions.FORWARD)).addMouseListener(barStatus);
!         return menuGo;
!     }
!     /**
!      * Create the view menu.
!      * @return the view menu.
!      */
!     private JMenu createViewMenu(ToolBar toolbar)
!     {
          JMenu menuView = new JMenu(actions.getAction(DesktopActions.VIEW));
!         JCheckBoxMenuItem toggle = new JCheckBoxMenuItem(actions.getAction(XSLTProperty.TINY_VERSE_NUMBERS.getName()));
          toggle = new JCheckBoxMenuItem(actions.getAction(XSLTProperty.TINY_VERSE_NUMBERS.getName()));
          toggle.setSelected(XSLTProperty.TINY_VERSE_NUMBERS.getDefault());
          menuView.add(toggle).addMouseListener(barStatus);
+         toggle = new JCheckBoxMenuItem(actions.getAction(XSLTProperty.START_VERSE_ON_NEWLINE.getName()));
+         toggle.setSelected(XSLTProperty.START_VERSE_ON_NEWLINE.getDefault());
+         menuView.add(toggle).addMouseListener(barStatus);
+         JMenu verseMenu = new JMenu(actions.getAction(DesktopActions.VERSE));
+         menuView.add(verseMenu);
+         ButtonGroup grpNumbering = new ButtonGroup();
+         JRadioButtonMenuItem radio = new JRadioButtonMenuItem(actions.getAction(XSLTProperty.VERSE_NUMBERS.getName()));
+         grpNumbering.add(radio);
+         radio.setSelected(XSLTProperty.VERSE_NUMBERS.getDefault());
+         verseMenu.add(radio).addMouseListener(barStatus);
+         radio = new JRadioButtonMenuItem(actions.getAction(XSLTProperty.CV.getName()));
+         grpNumbering.add(radio);
+         radio.setSelected(XSLTProperty.CV.getDefault());
+         verseMenu.add(radio).addMouseListener(barStatus);
+         radio = new JRadioButtonMenuItem(actions.getAction(XSLTProperty.BCV.getName()));
+         grpNumbering.add(radio);
+         radio.setSelected(XSLTProperty.BCV.getDefault());
+         verseMenu.add(radio).addMouseListener(barStatus);
+         radio = new JRadioButtonMenuItem(actions.getAction(XSLTProperty.NO_VERSE_NUMBERS.getName()));
+         grpNumbering.add(radio);
+         radio.setSelected(XSLTProperty.NO_VERSE_NUMBERS.getDefault());
+         verseMenu.add(radio).addMouseListener(barStatus);
+ 
+         menuView.addSeparator();        
          toggle = new JCheckBoxMenuItem(actions.getAction(XSLTProperty.NOTES.getName()));
          toggle.setSelected(XSLTProperty.NOTES.getDefault());
***************
*** 321,327 ****
          //menuView.add(chkViewTbar);
          menuView.addSeparator();
!         menuView.add(pnlTbar.getShowToggle()).addMouseListener(barStatus);
!         menuView.add(pnlTbar.getTextToggle()).addMouseListener(barStatus);
!         menuView.add(pnlTbar.getIconSizeToggle()).addMouseListener(barStatus);
          toggle = new JCheckBoxMenuItem(actions.getAction(DesktopActions.TOOLTIP_TOGGLE));
          toggle.setSelected(true);
--- 438,444 ----
          //menuView.add(chkViewTbar);
          menuView.addSeparator();
!         menuView.add(toolbar.getShowToggle()).addMouseListener(barStatus);
!         menuView.add(toolbar.getTextToggle()).addMouseListener(barStatus);
!         menuView.add(toolbar.getIconSizeToggle()).addMouseListener(barStatus);
          toggle = new JCheckBoxMenuItem(actions.getAction(DesktopActions.TOOLTIP_TOGGLE));
          toggle.setSelected(true);
***************
*** 336,340 ****
--- 453,461 ----
          menuView.add(actions.getAction(DesktopActions.VIEW_SOURCE)).addMouseListener(barStatus);
          menuView.setToolTipText(null);
+         return menuView;
+     }
  
+     private JMenu createToolsMenu()
+     {
          JMenu menuTools = new JMenu(actions.getAction(DesktopActions.TOOLS));
          //menuTools.add(actions.getAction(DesktopActions.GENERATE)).addMouseListener(barStatus);
***************
*** 344,348 ****
--- 465,473 ----
          menuTools.add(actions.getAction(DesktopActions.OPTIONS)).addMouseListener(barStatus);
          menuTools.setToolTipText(null);
+         return menuTools;
+     }
  
+     private JMenu createHelpMenu()
+     {
          JMenu menuHelp = new JMenu(actions.getAction(DesktopActions.HELP));
          menuHelp.add(actions.getAction(DesktopActions.CONTENTS)).addMouseListener(barStatus);
***************
*** 350,422 ****
          menuHelp.add(actions.getAction(DesktopActions.ABOUT)).addMouseListener(barStatus);
          menuHelp.setToolTipText(null);
! 
!         JMenuBar barMenu = new JMenuBar();
!         barMenu.add(menuFile);
!         barMenu.add(menuEdit);
!         barMenu.add(menuView);
!         barMenu.add(menuTools);
!         barMenu.add(menuTools);
!         barMenu.add(menuHelp);
! 
!         pnlTbar.setRollover(true);
!         pnlTbar.setFloatable(true);
! 
!         pnlTbar.add(views.getContextAction(ViewManager.NEW_TAB)).addMouseListener(barStatus);
!         pnlTbar.add(actions.getAction(DesktopActions.OPEN)).addMouseListener(barStatus);
!         pnlTbar.add(actions.getAction(DesktopActions.SAVE)).addMouseListener(barStatus);
!         pnlTbar.addSeparator();
!         //pnlTbar.add(actions.getAction(DesktopActions.CUT)).addMouseListener(barStatus);
!         pnlTbar.add(actions.getAction(DesktopActions.COPY)).addMouseListener(barStatus);
!         //pnlTbar.add(actions.getAction(DesktopActions.PASTE)).addMouseListener(barStatus);
!         pnlTbar.addSeparator();
!         pnlTbar.add(actions.getAction(DesktopActions.BACK)).addMouseListener(barStatus);
!         pnlTbar.add(actions.getAction(DesktopActions.FORWARD)).addMouseListener(barStatus);
!         pnlTbar.addSeparator();
!         //pnlTbar.add(actions.getAction("Generate")).addMouseListener(barStatus);
!         //pnlTbar.add(actions.getAction("Diff")).addMouseListener(barStatus);
!         //pnlTbar.addSeparator();
!         pnlTbar.add(actions.getAction(DesktopActions.CONTENTS)).addMouseListener(barStatus);
!         pnlTbar.add(actions.getAction(DesktopActions.ABOUT)).addMouseListener(barStatus);
! 
!         //barBook.addHyperlinkListener(this);
!         //barSide.addHyperlinkListener(this);
!         reference.addURLEventListener(this);
! 
!         sptBooks.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
!         sptBooks.setRightComponent(reference);
!         sptBooks.setLeftComponent(views.getDesktop());
!         sptBooks.setResizeWeight(0.8D);
!         sptBooks.setDividerSize(7);
!         sptBooks.setOpaque(true);
!         sptBooks.setBorder(null);
! 
!         addWindowListener(new WindowAdapter()
!         {
!             public void windowClosed(WindowEvent ev)
!             {
!                 actions.getAction(DesktopActions.EXIT).actionPerformed(new ActionEvent(this, 0, EMPTY_STRING));
!             }
!         });
! 
!         setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
! 
!         // The toolbar needs to be in the outermost container, on the border
!         // And the only other item in that container can be CENTER
!         final JComponent contentPane = (JComponent) getContentPane();
!         contentPane.setLayout(new BorderLayout());
!         contentPane.add(pnlTbar, BorderLayout.NORTH);
! 
!         // Put everything else in its own panel
!         corePanel = new JPanel(new BorderLayout());
!         corePanel.add(barStatus, BorderLayout.SOUTH);
!         corePanel.add(sptBooks, BorderLayout.CENTER);
!         contentPane.add(corePanel, BorderLayout.CENTER);
!         setJMenuBar(barMenu);
! 
!         setIconImage(ICON_APP.getImage());
!         setEnabled(true);
!         setTitle(Msg.getApplicationTitle());
      }
- 
      /**
       * Get the size of the content panel and make that the preferred size.
--- 475,480 ----
          menuHelp.add(actions.getAction(DesktopActions.ABOUT)).addMouseListener(barStatus);
          menuHelp.setToolTipText(null);
!         return menuHelp;
      }
      /**
       * Get the size of the content panel and make that the preferred size.
***************
*** 894,898 ****
      private transient ViewManager views;
      private JPanel corePanel;
-     private ToolBar pnlTbar;
      private JCheckBoxMenuItem sidebarToggle;
      private StatusBar barStatus;
--- 952,955 ----



More information about the jsword-svn mailing list