[jsword-svn]
bibledesktop/java/main/org/crosswire/bibledesktop/book s
jswordcvs at crosswire.org
jswordcvs at crosswire.org
Sat Oct 2 16:51:08 MST 2004
Update of /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/book
In directory www.crosswire.org:/tmp/cvs-serv19652/java/main/org/crosswire/bibledesktop/book
Modified Files:
DisplaySelectPane.java PassageSelectionPane.java
Msg.properties Msg.java PassageSelectionPane.properties
DisplaySelectPane.properties
Log Message:
advanced search and a-a option.
Index: DisplaySelectPane.properties
===================================================================
RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/book/DisplaySelectPane.properties,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** DisplaySelectPane.properties 1 Oct 2004 22:49:37 -0000 1.6
--- DisplaySelectPane.properties 2 Oct 2004 23:51:06 -0000 1.7
***************
*** 1,57 ****
# for the Passage label
- ViewLabel.Enabled=true
ViewLabel.Name=Show Passage:
- ViewLabel.ShortDescription=
- ViewLabel.LongDescription=
- ViewLabel.SmallIcon=
- ViewLabel.LargeIcon=
ViewLabel.MnemonicKey=W
- ViewLabel.AcceleratorKey=
- ViewLabel.AcceleratorKey.Modifiers=
# for the Passage Lookup text entry field
- PassageAction.Enabled=true
PassageAction.Name=Passage
PassageAction.ShortDescription=Enter a passage to display. Press CTRL+ENTER or press the ... button for a Passage selection window.
PassageAction.LongDescription=Enter a passage to display. Press CTRL+ENTER or press the ... button for a Passage selection window.
- PassageAction.SmallIcon=
- PassageAction.LargeIcon=
- PassageAction.MnemonicKey=
- PassageAction.AcceleratorKey=
- PassageAction.AcceleratorKey.Modifiers=
# for the ... button that brings up a passage picker dialog
- More.Enabled=true
More.Name=Select
More.ShortDescription=Pick a passage to display
More.LongDescription=Open the Passage selection window.
- More.SmallIcon=
- More.LargeIcon=
- More.MnemonicKey=
- More.AcceleratorKey=
- More.AcceleratorKey.Modifiers=
# for the Passage Lookup go button
- GoPassage.Enabled=true
GoPassage.Name=Go
GoPassage.ShortDescription=Display the passage
GoPassage.LongDescription=Display the passage.
- GoPassage.SmallIcon=
- GoPassage.LargeIcon=
GoPassage.MnemonicKey=G
- GoPassage.AcceleratorKey=
- GoPassage.AcceleratorKey.Modifiers=
# for the Search label
- SearchLabel.Enabled=true
SearchLabel.Name=Search:
- SearchLabel.ShortDescription=
- SearchLabel.LongDescription=
- SearchLabel.SmallIcon=
- SearchLabel.LargeIcon=
SearchLabel.MnemonicKey=S
- SearchLabel.AcceleratorKey=
- SearchLabel.AcceleratorKey.Modifiers=
# for the Search text entry field
--- 1,35 ----
+ # Format of this file:
+ # Blah.Name=Blah
+ # Blah.ShortDescription=Short description of Blah
+ # Blah.LongDescription=A longer and more verbose description of Blah
+ # Blah.SmallIcon=some16by16graphic.gif
+ # Blah.LargeIcon=some32by32graphic.gif
+ # Blah.MnemonicKey=B
+ # Blah.AcceleratorKey=B
+ # Blah.AcceleratorKey.Modifiers=CRTL
# for the Passage label
ViewLabel.Name=Show Passage:
ViewLabel.MnemonicKey=W
# for the Passage Lookup text entry field
PassageAction.Name=Passage
PassageAction.ShortDescription=Enter a passage to display. Press CTRL+ENTER or press the ... button for a Passage selection window.
PassageAction.LongDescription=Enter a passage to display. Press CTRL+ENTER or press the ... button for a Passage selection window.
# for the ... button that brings up a passage picker dialog
More.Name=Select
More.ShortDescription=Pick a passage to display
More.LongDescription=Open the Passage selection window.
# for the Passage Lookup go button
GoPassage.Name=Go
GoPassage.ShortDescription=Display the passage
GoPassage.LongDescription=Display the passage.
GoPassage.MnemonicKey=G
# for the Search label
SearchLabel.Name=Search:
SearchLabel.MnemonicKey=S
# for the Search text entry field
***************
*** 60,96 ****
# for the Search go button
- GoSearch.Enabled=true
GoSearch.Name=Go
GoSearch.ShortDescription=Search for a passage
- GoSearch.LongDescription=
- GoSearch.SmallIcon=
- GoSearch.LargeIcon=
GoSearch.MnemonicKey=G
- GoSearch.AcceleratorKey=
- GoSearch.AcceleratorKey.Modifiers=
# for the Help button
- HelpAction.Enabled=true
HelpAction.Name=
HelpAction.ShortDescription=Quick Search Help
HelpAction.LongDescription=Show some quick help on how to search
HelpAction.SmallIcon=toolbarButtonGraphics/general/ContextualHelp16.gif
! HelpAction.LargeIcon=toolbarButtonGraphics/general/ContextualHelp32.gif
! HelpAction.MnemonicKey=
! HelpAction.AcceleratorKey=
! HelpAction.AcceleratorKey.Modifiers=
! # for the Blah label
! BlahLabel.Name=Find Verses Like:
! BlahLabel.MnemonicKey=V
! # for the Blah text entry field
! BlahAction.Enabled=true
! BlahAction.Name=Blah
! BlahAction.ShortDescription=Find passages like
! BlahAction.LongDescription=Find passages like
! BlahAction.SmallIcon=
! BlahAction.LargeIcon=
! BlahAction.MnemonicKey=
! BlahAction.AcceleratorKey=
! BlahAction.AcceleratorKey.Modifiers=
--- 38,65 ----
# for the Search go button
GoSearch.Name=Go
GoSearch.ShortDescription=Search for a passage
GoSearch.MnemonicKey=G
# for the Help button
HelpAction.Name=
HelpAction.ShortDescription=Quick Search Help
HelpAction.LongDescription=Show some quick help on how to search
HelpAction.SmallIcon=toolbarButtonGraphics/general/ContextualHelp16.gif
! HelpAction.LargeIcon=toolbarButtonGraphics/general/ContextualHelp24.gif
! # for the Bible combo box
! Bible.Name=Bible:\
! Bible.MnemonicKey=B
! # for the best match toggle button
! Match.Name=Match
! Match.MnemonicKey=M
!
! # for the advanced search button
! Advanced.Name=Advanced
! Advanced.ShortDescription=Advanced Search
! Advanced.LongDescription=Show an advanced search dialog
! Advanced.SmallIcon=toolbarButtonGraphics/general/Find16.gif
! Advanced.LargeIcon=toolbarButtonGraphics/general/Find24.gif
! Advanced.MnemonicKey=V
Index: Msg.java
===================================================================
RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/book/Msg.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Msg.java 1 Oct 2004 22:49:37 -0000 1.9
--- Msg.java 2 Oct 2004 23:51:06 -0000 1.10
***************
*** 48,54 ****
static final Msg CLEAR = new Msg("DisplaySelectPane.Clear"); //$NON-NLS-1$
static final Msg UNTITLED = new Msg("DisplaySelectPane.Untitled"); //$NON-NLS-1$
! static final Msg SELECT_BIBLE = new Msg("DisplaySelectPane.Bible"); //$NON-NLS-1$
! static final Msg SELECT_ADVANCED = new Msg("DisplaySelectPane.Advanced"); //$NON-NLS-1$
! static final Msg SELECT_MATCH = new Msg("DisplaySelectPane.Match"); //$NON-NLS-1$
static final Msg AVAILABLE_BOOKS = new Msg("SitesPane.AvailableBooks"); //$NON-NLS-1$
--- 48,54 ----
static final Msg CLEAR = new Msg("DisplaySelectPane.Clear"); //$NON-NLS-1$
static final Msg UNTITLED = new Msg("DisplaySelectPane.Untitled"); //$NON-NLS-1$
! static final Msg ADVANCED_TITLE = new Msg("DisplaySelectPane.AdvancedTitle"); //$NON-NLS-1$
! static final Msg HELP_TEXT = new Msg("DisplaySelectPane.HelpText"); //$NON-NLS-1$
! static final Msg HELP_TITLE = new Msg("DisplaySelectPane.HelpTitle"); //$NON-NLS-1$
static final Msg AVAILABLE_BOOKS = new Msg("SitesPane.AvailableBooks"); //$NON-NLS-1$
***************
*** 70,84 ****
static final Msg SUMMARY = new Msg("PassageSelectionPane.Summary"); //$NON-NLS-1$
- static final Msg SEARCH_PHRASE = new Msg("AdvancedSearchPane.Phrase"); //$NON-NLS-1$
- static final Msg SEARCH_GO = new Msg("AdvancedSearchPane.Go"); //$NON-NLS-1$
- static final Msg SEARCH_SELECT = new Msg("AdvancedSearchPane.Select"); //$NON-NLS-1$
- static final Msg SEARCH_RESTRICT = new Msg("AdvancedSearchPane.Restrict"); //$NON-NLS-1$
- static final Msg SEARCH_HEADING = new Msg("AdvancedSearchPane.Heading"); //$NON-NLS-1$
- static final Msg SEARCH_EXCLUDES = new Msg("AdvancedSearchPane.Excludes"); //$NON-NLS-1$
- static final Msg SEARCH_INCLUDES = new Msg("AdvancedSearchPane.Includes"); //$NON-NLS-1$
-
- static final Msg HELP_TEXT = new Msg("DisplaySelectPane.HelpText"); //$NON-NLS-1$
- static final Msg HELP_TITLE = new Msg("DisplaySelectPane.HelpTitle"); //$NON-NLS-1$
-
/**
* Passthrough ctor
--- 70,73 ----
Index: DisplaySelectPane.java
===================================================================
RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/book/DisplaySelectPane.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** DisplaySelectPane.java 1 Oct 2004 22:49:37 -0000 1.14
--- DisplaySelectPane.java 2 Oct 2004 23:51:06 -0000 1.15
***************
*** 25,28 ****
--- 25,29 ----
import javax.swing.JTextField;
+ import org.crosswire.bibledesktop.book.parse.AdvancedSearchPane;
import org.crosswire.bibledesktop.passage.KeyChangeEvent;
import org.crosswire.bibledesktop.passage.KeyChangeListener;
***************
*** 104,109 ****
}
});
! JLabel lblBible = new JLabel();
! lblBible.setText(Msg.SELECT_BIBLE.toString());
lblBible.setLabelFor(cboBible);
--- 105,109 ----
}
});
! JLabel lblBible = actions.createJLabel(BIBLE);
lblBible.setLabelFor(cboBible);
***************
*** 148,160 ****
dlgHelp = new QuickHelpDialog(GuiUtil.getFrame(this), Msg.HELP_TITLE.toString(), Msg.HELP_TEXT.toString());
! JButton btnAdvanced = new JButton();
! btnAdvanced.setText(Msg.SELECT_ADVANCED.toString());
! btnAdvanced.setMnemonic(KeyEvent.VK_V);
! btnAdvanced.setBorderPainted(true);
! btnAdvanced.setIcon(ICON_SEARCH);
btnAdvanced.setBorderPainted(false);
! chkMatch = new JCheckBox();
! chkMatch.setText(Msg.SELECT_MATCH.toString());
this.setLayout(new GridBagLayout());
--- 148,155 ----
dlgHelp = new QuickHelpDialog(GuiUtil.getFrame(this), Msg.HELP_TITLE.toString(), Msg.HELP_TEXT.toString());
! JButton btnAdvanced = new JButton(actions.getAction(ADVANCED));
btnAdvanced.setBorderPainted(false);
! chkMatch = new JCheckBox(actions.getAction(MATCH));
this.setLayout(new GridBagLayout());
***************
*** 284,287 ****
--- 279,304 ----
/**
+ * Someone has clicked on the advanced search button
+ */
+ public void doAdvanced()
+ {
+ String reply = advanced.showInDialog(this, Msg.ADVANCED_TITLE.toString(), true, txtSearch.getText());
+ if (reply != null)
+ {
+ txtSearch.setText(reply);
+ }
+ }
+
+ /**
+ * Match is an action, but we don't need to do anything because match is
+ * only used when search is clicked. But ActionFactory will complain if we
+ * leave it out.
+ */
+ public void doMatch()
+ {
+ // Do nothing
+ }
+
+ /**
* Someone clicked help
*/
***************
*** 400,406 ****
dlgSelect = new PassageSelectionPane();
}
String passg = dlgSelect.showInDialog(this, Msg.SELECT_PASSAGE_TITLE.toString(), true, txtKey.getText());
! txtKey.setText(passg);
! doPassageAction();
}
--- 417,427 ----
dlgSelect = new PassageSelectionPane();
}
+
String passg = dlgSelect.showInDialog(this, Msg.SELECT_PASSAGE_TITLE.toString(), true, txtKey.getText());
! if (passg != null)
! {
! txtKey.setText(passg);
! doPassageAction();
! }
}
***************
*** 487,492 ****
private static final String GO_SEARCH = "GoSearch"; //$NON-NLS-1$
private static final String SEARCH_FIELD = "SearchAction"; //$NON-NLS-1$
!
! private static final ImageIcon ICON_SEARCH = GuiUtil.getIcon("toolbarButtonGraphics/general/Find16.gif"); //$NON-NLS-1$
private static final ImageIcon ICON_SELECT = GuiUtil.getIcon("toolbarButtonGraphics/general/Edit16.gif"); //$NON-NLS-1$
--- 508,514 ----
private static final String GO_SEARCH = "GoSearch"; //$NON-NLS-1$
private static final String SEARCH_FIELD = "SearchAction"; //$NON-NLS-1$
! private static final String ADVANCED = "Advanced"; //$NON-NLS-1$
! private static final String MATCH = "Match"; //$NON-NLS-1$
! private static final String BIBLE = "Bible"; //$NON-NLS-1$
private static final ImageIcon ICON_SELECT = GuiUtil.getIcon("toolbarButtonGraphics/general/Edit16.gif"); //$NON-NLS-1$
***************
*** 514,517 ****
--- 536,541 ----
private JCheckBox chkMatch = null;
+ private AdvancedSearchPane advanced = new AdvancedSearchPane();
+
/**
* SERIALUID(dms): A placeholder for the ultimate version id.
Index: Msg.properties
===================================================================
RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/book/Msg.properties,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Msg.properties 1 Oct 2004 22:49:37 -0000 1.7
--- Msg.properties 2 Oct 2004 23:51:06 -0000 1.8
***************
*** 34,37 ****
--- 34,38 ----
DisplaySelectPane.Advanced=Advanced
DisplaySelectPane.Bible=Bible:
+ DisplaySelectPane.AdvancedTitle=Advanced Search
SitesPane.AvailableBooks=Available Books
***************
*** 52,61 ****
PassageSelectionPane.Error=Error: {0}
PassageSelectionPane.Summary=Summary: {0}
-
- AdvancedSearchPane.Phrase=Includes this phrase:
- AdvancedSearchPane.Go=Go
- AdvancedSearchPane.Select=Select
- AdvancedSearchPane.Restrict=Restrict search to these verses:
- AdvancedSearchPane.Heading=Search for verses with the following details
- AdvancedSearchPane.Excludes=Excludes these words:
- AdvancedSearchPane.Includes=Includes all these words:
--- 53,54 ----
Index: PassageSelectionPane.properties
===================================================================
RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/book/PassageSelectionPane.properties,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** PassageSelectionPane.properties 14 Jun 2004 05:27:26 -0000 1.1
--- PassageSelectionPane.properties 2 Oct 2004 23:51:06 -0000 1.2
***************
*** 26,30 ****
Done.SmallIcon=
Done.LargeIcon=
! Done.MnemonicKey=R
Done.AcceleratorKey=
Done.AcceleratorKey.Modifiers=
--- 26,30 ----
Done.SmallIcon=
Done.LargeIcon=
! Done.MnemonicKey=O
Done.AcceleratorKey=
Done.AcceleratorKey.Modifiers=
Index: PassageSelectionPane.java
===================================================================
RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/book/PassageSelectionPane.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** PassageSelectionPane.java 8 Sep 2004 19:57:58 -0000 1.11
--- PassageSelectionPane.java 2 Oct 2004 23:51:06 -0000 1.12
***************
*** 283,295 ****
dlgMain = new JDialog(JOptionPane.getFrameForComponent(parent));
! JPanel pnl_action = new JPanel();
KeyStroke esc = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0);
bailout = true;
! JButton btn_go = new JButton(actions.getAction(DONE));
! pnl_action.setLayout(new BorderLayout());
! pnl_action.setBorder(BorderFactory.createEmptyBorder(5, 5, 15, 20));
! pnl_action.add(btn_go, BorderLayout.EAST);
ActionListener closer = new ActionListener()
--- 283,295 ----
dlgMain = new JDialog(JOptionPane.getFrameForComponent(parent));
! JPanel pnlAction = new JPanel();
KeyStroke esc = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0);
bailout = true;
! JButton btnGo = new JButton(actions.getAction(DONE));
! pnlAction.setLayout(new BorderLayout());
! pnlAction.setBorder(BorderFactory.createEmptyBorder(5, 5, 15, 20));
! pnlAction.add(btnGo, BorderLayout.EAST);
ActionListener closer = new ActionListener()
***************
*** 303,308 ****
dlgMain.getContentPane().setLayout(new BorderLayout());
dlgMain.getContentPane().add(this, BorderLayout.CENTER);
! dlgMain.getContentPane().add(pnl_action, BorderLayout.SOUTH);
! dlgMain.getRootPane().setDefaultButton(btn_go);
dlgMain.getRootPane().registerKeyboardAction(closer, esc, JComponent.WHEN_IN_FOCUSED_WINDOW);
dlgMain.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
--- 303,308 ----
dlgMain.getContentPane().setLayout(new BorderLayout());
dlgMain.getContentPane().add(this, BorderLayout.CENTER);
! dlgMain.getContentPane().add(pnlAction, BorderLayout.SOUTH);
! dlgMain.getRootPane().setDefaultButton(btnGo);
dlgMain.getRootPane().registerKeyboardAction(closer, esc, JComponent.WHEN_IN_FOCUSED_WINDOW);
dlgMain.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
***************
*** 357,360 ****
--- 357,363 ----
}
+ /**
+ * Someone clicked on OK
+ */
public void doDone()
{
***************
*** 408,414 ****
private Passage ref;
! /*
! * The ActionFactory holding the actions used by this
! * EditSite.
*/
private ActionFactory actions;
--- 411,416 ----
private Passage ref;
! /**
! * The ActionFactory holding the actions used by this Component.
*/
private ActionFactory actions;
More information about the jsword-svn
mailing list