[jsword-svn] jsword/java/jsword/org/crosswire/jsword/book s
jswordcvs at crosswire.org
jswordcvs at crosswire.org
Sat Jun 25 14:41:36 MST 2005
Update of /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book
In directory www.crosswire.org:/tmp/cvs-serv28176/java/jsword/org/crosswire/jsword/book
Modified Files:
Defaults.java
Log Message:
Added two preferences (both defaulting to true):
1) Open links in current BibleView
2) Use current Bible for new BibleViews.
Index: Defaults.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/Defaults.java,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** Defaults.java 17 May 2005 00:43:15 -0000 1.32
--- Defaults.java 25 Jun 2005 21:41:33 -0000 1.33
***************
*** 45,50 ****
}
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.BookDefault#setDefault(org.crosswire.jsword.book.Book)
*/
public static void setBible(Book book)
--- 45,84 ----
}
+ /**
+ * Determine whether the getBible should return the current Bible
+ * or the user's chosen default.
+ * @return true if the bible tracks the user's selection
+ */
+ public static boolean isCurrentBible()
+ {
+ return currentBible;
+ }
+
+ /**
+ * Establish whether the getBible should return the current Bible
+ * or the user's chosen default.
+ * @param current
+ */
+ public static void setCurrentBible(boolean current)
+ {
+ currentBible = current;
+ }
+
+ /**
+ * If the user has chosen to remember the book (by type)
+ * then set the current book for that type.
+ * @param book
+ */
+ public static void setCurrentBook(Book book)
+ {
+ BookCategory type = book.getType();
+ if (type.equals(BookCategory.BIBLE) && isCurrentBible())
+ {
+ setBible(book);
+ }
+ }
+
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.DefaultBook#setDefault(org.crosswire.jsword.book.Book)
*/
public static void setBible(Book book)
***************
*** 54,58 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.BookDefault#unsetDefault()
*/
protected static void unsetBible()
--- 88,92 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.DefaultBook#unsetDefault()
*/
protected static void unsetBible()
***************
*** 62,66 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.BookDefault#getDefault()
*/
public static Book getBible()
--- 96,100 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.DefaultBook#getDefault()
*/
public static Book getBible()
***************
*** 70,74 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.BookDefault#getDefaultName()
*/
public static String getBibleByName()
--- 104,108 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.DefaultBook#getDefaultName()
*/
public static String getBibleByName()
***************
*** 78,82 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.BookDefault#setDefaultByName(java.lang.String)
*/
public static void setBibleByName(String name)
--- 112,116 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.DefaultBook#setDefaultByName(java.lang.String)
*/
public static void setBibleByName(String name)
***************
*** 86,90 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.BookDefault#setDefault(org.crosswire.jsword.book.Book)
*/
public static void setCommentary(Book book)
--- 120,124 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.DefaultBook#setDefault(org.crosswire.jsword.book.Book)
*/
public static void setCommentary(Book book)
***************
*** 94,98 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.BookDefault#unsetDefault()
*/
protected static void unsetCommentary()
--- 128,132 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.DefaultBook#unsetDefault()
*/
protected static void unsetCommentary()
***************
*** 102,106 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.BookDefault#getDefault()
*/
public static Book getCommentary()
--- 136,140 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.DefaultBook#getDefault()
*/
public static Book getCommentary()
***************
*** 110,114 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.BookDefault#getDefaultName()
*/
public static String getCommentaryByName()
--- 144,148 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.DefaultBook#getDefaultName()
*/
public static String getCommentaryByName()
***************
*** 118,122 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.BookDefault#setDefaultByName(java.lang.String)
*/
public static void setCommentaryByName(String name)
--- 152,156 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.DefaultBook#setDefaultByName(java.lang.String)
*/
public static void setCommentaryByName(String name)
***************
*** 126,130 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.BookDefault#setDefault(org.crosswire.jsword.book.Book)
*/
public static void setDictionary(Book book)
--- 160,164 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.DefaultBook#setDefault(org.crosswire.jsword.book.Book)
*/
public static void setDictionary(Book book)
***************
*** 134,138 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.BookDefault#unsetDefault()
*/
protected static void unsetDictionary()
--- 168,172 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.DefaultBook#unsetDefault()
*/
protected static void unsetDictionary()
***************
*** 142,146 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.BookDefault#getDefault()
*/
public static Book getDictionary()
--- 176,180 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.DefaultBook#getDefault()
*/
public static Book getDictionary()
***************
*** 150,154 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.BookDefault#getDefaultName()
*/
public static String getDictionaryByName()
--- 184,188 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.DefaultBook#getDefaultName()
*/
public static String getDictionaryByName()
***************
*** 158,162 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.BookDefault#setDefaultByName(java.lang.String)
*/
public static void setDictionaryByName(String name)
--- 192,196 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.DefaultBook#setDefaultByName(java.lang.String)
*/
public static void setDictionaryByName(String name)
***************
*** 166,170 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.BookDefault#setDefault(org.crosswire.jsword.book.Book)
*/
public static void setGreekDefinitions(Book book)
--- 200,204 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.DefaultBook#setDefault(org.crosswire.jsword.book.Book)
*/
public static void setGreekDefinitions(Book book)
***************
*** 174,178 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.BookDefault#unsetDefault()
*/
protected static void unsetGreekDefinitions()
--- 208,212 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.DefaultBook#unsetDefault()
*/
protected static void unsetGreekDefinitions()
***************
*** 182,186 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.BookDefault#getDefault()
*/
public static Book getGreekDefinitions()
--- 216,220 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.DefaultBook#getDefault()
*/
public static Book getGreekDefinitions()
***************
*** 190,194 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.BookDefault#getDefaultName()
*/
public static String getGreekDefinitionsByName()
--- 224,228 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.DefaultBook#getDefaultName()
*/
public static String getGreekDefinitionsByName()
***************
*** 198,202 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.BookDefault#setDefaultByName(java.lang.String)
*/
public static void setGreekDefinitionsByName(String name)
--- 232,236 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.DefaultBook#setDefaultByName(java.lang.String)
*/
public static void setGreekDefinitionsByName(String name)
***************
*** 206,210 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.BookDefault#setDefault(org.crosswire.jsword.book.Book)
*/
public static void setHebrewDefinitions(Book book)
--- 240,244 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.DefaultBook#setDefault(org.crosswire.jsword.book.Book)
*/
public static void setHebrewDefinitions(Book book)
***************
*** 214,218 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.BookDefault#unsetDefault()
*/
protected static void unsetHebrewDefinitions()
--- 248,252 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.DefaultBook#unsetDefault()
*/
protected static void unsetHebrewDefinitions()
***************
*** 222,226 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.BookDefault#getDefault()
*/
public static Book getHebrewDefinitions()
--- 256,260 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.DefaultBook#getDefault()
*/
public static Book getHebrewDefinitions()
***************
*** 230,234 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.BookDefault#getDefaultName()
*/
public static String getHebrewDefinitionsByName()
--- 264,268 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.DefaultBook#getDefaultName()
*/
public static String getHebrewDefinitionsByName()
***************
*** 238,242 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.BookDefault#setDefaultByName(java.lang.String)
*/
public static void setHebrewDefinitionsByName(String name)
--- 272,276 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.DefaultBook#setDefaultByName(java.lang.String)
*/
public static void setHebrewDefinitionsByName(String name)
***************
*** 246,250 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.BookDefault#setDefault(org.crosswire.jsword.book.Book)
*/
public static void setGreekParse(Book book)
--- 280,284 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.DefaultBook#setDefault(org.crosswire.jsword.book.Book)
*/
public static void setGreekParse(Book book)
***************
*** 254,258 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.BookDefault#unsetDefault()
*/
protected static void unsetGreekParse()
--- 288,292 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.DefaultBook#unsetDefault()
*/
protected static void unsetGreekParse()
***************
*** 262,266 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.BookDefault#getDefault()
*/
public static Book getGreekParse()
--- 296,300 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.DefaultBook#getDefault()
*/
public static Book getGreekParse()
***************
*** 270,274 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.BookDefault#getDefaultName()
*/
public static String getGreekParseByName()
--- 304,308 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.DefaultBook#getDefaultName()
*/
public static String getGreekParseByName()
***************
*** 278,282 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.BookDefault#setDefaultByName(java.lang.String)
*/
public static void setGreekParseByName(String name)
--- 312,316 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.DefaultBook#setDefaultByName(java.lang.String)
*/
public static void setGreekParseByName(String name)
***************
*** 286,290 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.BookDefault#setDefault(org.crosswire.jsword.book.Book)
*/
public static void setHebrewParse(Book book)
--- 320,324 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.DefaultBook#setDefault(org.crosswire.jsword.book.Book)
*/
public static void setHebrewParse(Book book)
***************
*** 294,298 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.BookDefault#unsetDefault()
*/
protected static void unsetHebrewParse()
--- 328,332 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.DefaultBook#unsetDefault()
*/
protected static void unsetHebrewParse()
***************
*** 302,306 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.BookDefault#getDefault()
*/
public static Book getHebrewParse()
--- 336,340 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.DefaultBook#getDefault()
*/
public static Book getHebrewParse()
***************
*** 310,314 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.BookDefault#getDefaultName()
*/
public static String getHebrewParseByName()
--- 344,348 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.DefaultBook#getDefaultName()
*/
public static String getHebrewParseByName()
***************
*** 318,322 ****
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.BookDefault#setDefaultByName(java.lang.String)
*/
public static void setHebrewParseByName(String name)
--- 352,356 ----
/* (non-Javadoc)
! * @see org.crosswire.jsword.book.DefaultBook#setDefaultByName(java.lang.String)
*/
public static void setHebrewParseByName(String name)
***************
*** 484,487 ****
--- 518,526 ----
/**
+ * Indicates whether the last book of each type is used next time.
+ */
+ private static boolean currentBible = true;
+
+ /**
* The default Bible
*/
More information about the jsword-svn
mailing list