[jsword-svn] r1393 - in trunk: bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop bibledesktop/src/main/resources bibledesktop/src/main/resources/xsl/cswing common/src/main/java/org/crosswire/common/config common-swing/src/main/java/org/crosswire/common/config/swing
dmsmith at www.crosswire.org
dmsmith at www.crosswire.org
Thu Jun 7 11:37:46 MST 2007
Author: dmsmith
Date: 2007-06-07 11:37:44 -0700 (Thu, 07 Jun 2007)
New Revision: 1393
Added:
trunk/bibledesktop/src/main/resources/limboConfig.properties
Modified:
trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/Desktop.java
trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/XSLTProperty.java
trunk/bibledesktop/src/main/resources/config.properties
trunk/bibledesktop/src/main/resources/config.xml
trunk/bibledesktop/src/main/resources/config_de.properties
trunk/bibledesktop/src/main/resources/desktop.properties
trunk/bibledesktop/src/main/resources/xsl/cswing/simple.xsl
trunk/common-swing/src/main/java/org/crosswire/common/config/swing/AbstractConfigEditor.java
trunk/common-swing/src/main/java/org/crosswire/common/config/swing/AdvancedConfigEditor.java
trunk/common-swing/src/main/java/org/crosswire/common/config/swing/TabbedConfigEditor.java
trunk/common-swing/src/main/java/org/crosswire/common/config/swing/TreeConfigEditor.java
trunk/common-swing/src/main/java/org/crosswire/common/config/swing/WizardConfigEditor.java
trunk/common/src/main/java/org/crosswire/common/config/AbstractReflectedChoice.java
trunk/common/src/main/java/org/crosswire/common/config/Choice.java
trunk/common/src/main/java/org/crosswire/common/config/Config.java
Log:
Made it possible to have expert/hidden configuration items so that developers can hack desktop.properties.
Made it possible to override CSS with a new property.
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/Desktop.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/Desktop.java 2007-06-07 14:41:28 UTC (rev 1392)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/Desktop.java 2007-06-07 18:37:44 UTC (rev 1393)
@@ -932,6 +932,22 @@
}
/**
+ * @param override The path to the CSS that should be used to override.
+ */
+ public static void setCSSOverride(String override)
+ {
+ XSLTProperty.CSS.setState(override);
+ }
+
+ /**
+ * @return the current override
+ */
+ public static String getCSSOverride()
+ {
+ return XSLTProperty.CSS.getStringState();
+ }
+
+ /**
* @param maxHeight The maxHeight to set.
*/
public static void setMaxHeight(int maxHeight)
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/XSLTProperty.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/XSLTProperty.java 2007-06-07 14:41:28 UTC (rev 1392)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/XSLTProperty.java 2007-06-07 18:37:44 UTC (rev 1393)
@@ -21,8 +21,12 @@
*/
package org.crosswire.bibledesktop.desktop;
+import java.io.File;
import java.io.Serializable;
+import java.net.MalformedURLException;
+import org.crosswire.common.util.NetUtil;
+import org.crosswire.common.util.Reporter;
import org.crosswire.common.xml.TransformingSAXEventProvider;
@@ -33,7 +37,7 @@
* The copyright to this program is held by it's authors.
* @author DM Smith [ dmsmith555 at yahoo dot com]
*/
-public final class XSLTProperty implements Serializable
+public class XSLTProperty implements Serializable
{
/**
* Determines whether Strong's Numbers should show
@@ -94,7 +98,7 @@
* What is the base of the current document.
* Note this needs to be set each time the document is shown.
*/
- public static final XSLTProperty BASE_URL = new XSLTProperty("baseURL", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ public static final XSLTProperty BASE_URL = new XSLTProperty("baseURL", "", true); //$NON-NLS-1$ //$NON-NLS-2$
/**
* What is the base of the current document.
@@ -111,7 +115,7 @@
/**
* What is the base of the current document.
*/
- public static final XSLTProperty CSS = new XSLTProperty("css", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ public static final XSLTProperty CSS = new XSLTProperty("css", "", true); //$NON-NLS-1$ //$NON-NLS-2$
/**
* @param name The name of this property
@@ -128,9 +132,19 @@
*/
private XSLTProperty(String name, String defaultState)
{
+ this(name, defaultState, false);
+ }
+
+ /**
+ * @param name The name of this property
+ * @param defaultState The initial state of the property.
+ */
+ private XSLTProperty(String name, String defaultState, boolean asURL)
+ {
this.name = name;
this.defaultState = defaultState;
this.state = defaultState;
+ this.asURL = asURL;
}
/**
@@ -146,11 +160,21 @@
return Boolean.valueOf(defaultState).booleanValue();
}
+ public String getDefaultStringState()
+ {
+ return defaultState;
+ }
+
public boolean getState()
{
return Boolean.valueOf(state).booleanValue();
}
+ public String getStringState()
+ {
+ return state;
+ }
+
public void setState(boolean newState)
{
state = Boolean.toString(newState);
@@ -165,7 +189,19 @@
{
if (state != null && state.length() > 0)
{
- provider.setParameter(name, state);
+ String theState = state;
+ if (asURL)
+ {
+ try
+ {
+ theState = NetUtil.getURI(new File(state)).toURL().toString();
+ }
+ catch (MalformedURLException ex)
+ {
+ Reporter.informUser(this, ex);
+ }
+ }
+ provider.setParameter(name, theState);
}
}
@@ -225,6 +261,11 @@
*/
private String state;
+ /**
+ * Whether the string state should be converted to an URL when setting the property.
+ */
+ private boolean asURL;
+
// Support for serialization
private static int nextObj;
private final int obj = nextObj++;
Modified: trunk/bibledesktop/src/main/resources/config.properties
===================================================================
--- trunk/bibledesktop/src/main/resources/config.properties 2007-06-07 14:41:28 UTC (rev 1392)
+++ trunk/bibledesktop/src/main/resources/config.properties 2007-06-07 18:37:44 UTC (rev 1393)
@@ -3,7 +3,7 @@
# Since the keys may have spaces these need to be escaped here.
Bibles.RetainCurrent.path=Bibles.Use Current Bible
-Bibles.RetainCurrent.help=New Bible Views use the current Bible.
+Bibles.RetainCurrent.help=New Bible Views use the last chosen Bible. Otherwise, use the default Bible.
Bibles.DefaultBible.path=Bibles.Default Bible
Bibles.DefaultBible.help=Which of the available Bibles is the default.
Bibles.DefaultDictionary.path=Bibles.Default Dictionary
@@ -23,15 +23,11 @@
BibleDisplay.Reuse.path=Bible Display.Open links in same Bible View
BibleDisplay.Reuse.help=Reuse Bible View for links.
BibleDisplay.MaxPickers.path=Bible Display.Parallel Bible Limit
-BibleDisplay.MaxPickers.help=Limit the number of Bibles to show at once
+BibleDisplay.MaxPickers.help=Limit the number of Bibles to show at once.
BibleDisplay.Commentaries.path=Bible Display.List Commentaries with Bibles
BibleDisplay.Commentaries.help=List Commentaries with Bibles
BibleDisplay.Sidebar.path=Bible Display.Show the Passage Sidebar
BibleDisplay.Sidebar.help=Show the Passage Sidebar
-BibleDisplay.Converter.path=Bible Display.Converter
-BibleDisplay.Converter.help=The engine used to genterate the book display
-BibleDisplay.ConfigurableStylesheet.path=Bible Display.Configurable Stylesheet
-BibleDisplay.ConfigurableStylesheet.help=The style applied to displayed Books when using the configurable styler.
BibleDisplay.VersesPerTab.path=Bible Display.Verses Per Tab
BibleDisplay.VersesPerTab.help=How many verses do you want to display on a page before spilling to tabbed mode.
BibleDisplay.RankedVerses.path=Bible Display.Default Number of Matched Verses
@@ -44,28 +40,24 @@
SwordBook.BookSearchPath.help=Additional places to look for SWORD books.
SwordBook.DownloadDirectory.path=Sword Books.Download Directory
SwordBook.DownloadDirectory.help=Where should we store newly downloaded books.
-Remote.RemoteHost.path=Remote.Remote Host
-Remote.RemoteHost.help=The URL of a remote HTTP host.
Passages.PersistentNaming.path=Passages.Persistent Naming
-Passages.PersistentNaming.help=Yes if the passage editor re-writes the references to conform to its notation.
+Passages.PersistentNaming.help=Should your input of names .
Passages.FullBookName.path=Passages.Use Full Book Names
-Passages.FullBookName.help=Yes if full Bible Book names should be used.
+Passages.FullBookName.help=Should full Bible book names or abbreviations be used.
Passages.BlurringRules.path=Passages.Passage Expansion Rules
-Passages.BlurringRules.help=What is the default expansion - Expand across chapter boundaries or not.
+Passages.BlurringRules.help=What is the default expansion - Stay within chapter boundaries or not.
Passages.BlurringRules.alternative.0=None
Passages.BlurringRules.alternative.1=Chapter
#Passages.BlurringRules.alternative.2=Book
Passages.BookCase.path=Passages.Book Case
-Passages.BookCase.help=What case should we use to display the references.
+Passages.BookCase.help=What case should we use to display the Bible book names.
Passages.BookCase.alternative.0=lower
Passages.BookCase.alternative.1=Sentence
Passages.BookCase.alternative.2=UPPER
Application.Language.path=Application.Language
Application.Language.help=The language of the application. (Requires restart)
-Application.LookAndFeel.path=Application.Look and Feel
-Application.LookAndFeel.help=The look and feel of the application.
Application.InitialLayout.path=Application.Initial Layout
-Application.InitialLayout.help=Do you want to start in Tabbed or Multiple Document view mode
+Application.InitialLayout.help=Do you want to start in Tabbed or Multiple Document view mode (Requires restart)
Application.InitialLayout.alternative.0=Tabbed Document Interface
Application.InitialLayout.alternative.1=Multiple Document Interface
Application.MaxHeight.path=Application.Maximum Window Height
@@ -74,31 +66,23 @@
Application.MaxWidth.help=The maximum width you want the window to be
Application.UIFont.path=Application.General Font
Application.UIFont.help=The font for the application (Requires restart)
-Advanced.Raw.CacheData.path=Advanced.Raw.Cache Data
-Advanced.Raw.CacheData.help=Do new RawBibles cache the entire Bible in memory, or just the indexes.
-Advanced.Reports.ShowErrorsInDialogBox.path=Advanced.Reports.Show errors in a dialog box
-Advanced.Reports.ShowErrorsInDialogBox.help=Do we display Exceptions in a GUI window.
-Advanced.Reports.LogErrorsInLogWindow.path=Advanced.Reports.Log errors in the log window
-Advanced.Reports.LogErrorsInLogWindow.help=Do we display Exceptions in a the GUI shelf.
+
+# The following are not for general use and are hidden from view
+BibleDisplay.CSSOverride.path=Bible Display.CSS Override
+BibleDisplay.CSSOverride.help=Use an alternate CSS Stylesheet.
+BibleDisplay.Converter.path=Bible Display.Converter
+BibleDisplay.Converter.help=The engine used to genterate the book display
+BibleDisplay.ConfigurableStylesheet.path=Bible Display.Configurable Stylesheet
+BibleDisplay.ConfigurableStylesheet.help=The style applied to displayed Books when using the configurable styler.
+Application.LookAndFeel.path=Application.Look and Feel
+Application.LookAndFeel.help=The look and feel of the application.
Advanced.SourcePath.path=Advanced.Source Path
Advanced.SourcePath.help=The directories to search for source code in when investigating an exception.
-Advanced.XSLT.Cache.path=Advanced.XSLT.Cache
-Advanced.XSLT.Cache.help=Do we cache the XSLT pages (faster but a pain for development).
-Advanced.Passage.DefaultType.path=Advanced.Passage.Default Type
-Advanced.Passage.DefaultType.help=What type of passage does the PassageFactory create by default.
-Advanced.Passage.DefaultType.alternative.0=Speed (Rocket)
-Advanced.Passage.DefaultType.alternative.1=Write Speed (Bitwise)
-Advanced.Passage.DefaultType.alternative.2=Size (Distinct)
-Advanced.Passage.DefaultType.alternative.3=Mix (Ranged)
+Advanced.DefaultPassageType.path=Advanced.Default Passage Type
+Advanced.DefaultPassageType.help=What type of passage does the PassageFactory create by default.
+Advanced.DefaultPassageType.alternative.0=Speed (Rocket)
+Advanced.DefaultPassageType.alternative.1=Write Speed (Bitwise)
+Advanced.DefaultPassageType.alternative.2=Size (Distinct)
+Advanced.DefaultPassageType.alternative.3=Mix (Ranged)
Advanced.IncludeAdvancedTabs.path=Advanced.Include Advanced Tabs
Advanced.IncludeAdvancedTabs.help=Are the advanced tabs visible in the "About ..." Dialog. (Requires restart)
-WebJournal.Url.path=Web Journal.Server URL
-WebJournal.Url.help=The URL for web journal's the web services interface.
-WebJournal.UserName.path=Web Journal.Account name
-WebJournal.UserName.help=The account name on the weblog server.
-WebJournal.Password.path=Web Journal.Account password
-WebJournal.Password.help=The account password.
-WebJournal.Type.path=Web Journal.The API type
-WebJournal.Type.help=The type of interface the weblog server supports.
-WebJournal.Type.alternative.0=Atom
-WebJournal.Type.alternative.1=MetaWeblog
Modified: trunk/bibledesktop/src/main/resources/config.xml
===================================================================
--- trunk/bibledesktop/src/main/resources/config.xml 2007-06-07 14:41:28 UTC (rev 1392)
+++ trunk/bibledesktop/src/main/resources/config.xml 2007-06-07 18:37:44 UTC (rev 1393)
@@ -36,6 +36,7 @@
<!ATTLIST option
key CDATA #REQUIRED
static (true|false) 'true'
+ hidden (true|false) 'false'
priority NMTOKEN '5'
type (string|boolean|int-options|string-options|string-array|file|path|directory|number|font|class|custom|password) #REQUIRED
class CDATA #IMPLIED
@@ -78,19 +79,17 @@
<map name="daily-devotional-names"/>
</option>
-<!-- Does not mean anything right now
- <option key="Bibles.DefaultDictionary" type="string-options">
+<!-- Does not mean anything right now -->
+ <option key="Bibles.DefaultDictionary" type="string-options" hidden="true">
<introspect class="org.crosswire.jsword.book.Defaults" property="DictionaryByName"/>
<map name="dictionary-names"/>
</option>
--->
-<!-- Does not mean anything right now
- <option key="Bibles.DefaultCommentary" type="string-options">
+<!-- Does not mean anything right now -->
+ <option key="Bibles.DefaultCommentary" type="string-options" hidden="true">
<introspect class="org.crosswire.jsword.book.Defaults" property="CommentaryByName"/>
<map name="commentary-names"/>
</option>
--->
<option key="Bibles.DefaultGreekDefinitions" type="string-options">
<introspect class="org.crosswire.jsword.book.Defaults" property="GreekDefinitionsByName"/>
@@ -107,27 +106,29 @@
<map name="greekparse-names"/>
</option>
-<!-- There are no Hebrew parsing guides at this time.
- <option key="Bibles.DefaultHebrewParse" type="string-options">
+<!-- There are no Hebrew parsing guides at this time. -->
+ <option key="Bibles.DefaultHebrewParse" type="string-options" hidden="true">
<introspect class="org.crosswire.jsword.book.Defaults" property="HebrewParseByName"/>
<map name="hebrewparse-names"/>
</option>
--->
-<!-- At this time we only have one converter
- <option key="BibleDisplay.Converter" type="string-options">
+<!-- At this time we only have one converter -->
+ <option key="BibleDisplay.Converter" type="string-options" hidden="true">
<introspect class="org.crosswire.jsword.util.ConverterFactory" property="CurrentConverterName"/>
<map name="converters"/>
</option>
--->
-<!-- We only provide one style sheet at this time
- <option key="BibleDisplay.ConfigurableStylesheet" type="string-options">
+<!-- We only provide one style sheet at this time -->
+ <option key="BibleDisplay.ConfigurableStylesheet" type="string-options" hidden="true">
<introspect class="org.crosswire.bibledesktop.util.ConfigurableSwingConverter" property="ResourceName"/>
<map name="cswing-styles"/>
</option>
--->
+<!-- This really only useful for developers -->
+ <option key="BibleDisplay.CSSOverride" type="string" hidden="false">
+ <introspect class="org.crosswire.bibledesktop.desktop.Desktop" property="CSSOverride"/>
+ </option>
+
<option key="BibleDisplay.Reuse" type="boolean">
<introspect class="org.crosswire.bibledesktop.desktop.Desktop" property="BibleViewReused"/>
</option>
@@ -168,7 +169,7 @@
<introspect class="org.crosswire.jsword.book.sword.SwordBookPath" property="DownloadDir"/>
</option>
-<!-- Currently not used
+<!-- Limbo: Currently not used
<option key="Remote.RemoteHost" type="string-array" separator=" ">
<introspect class="org.crosswire.jsword.book.remote.HttpRemoteBookDriver" property="URLs"/>
</option>
@@ -196,11 +197,10 @@
<alternative number="2"/>
</option>
-<!-- Useful only to developers. Developers may uncomment this.
- <option key="Application.LookAndFeel" type="class">
+<!-- This really only useful for developers -->
+ <option key="Application.LookAndFeel" type="class" hidden="true">
<introspect class="org.crosswire.common.swing.LookAndFeelUtil" property="LookAndFeel"/>
</option>
--->
<option key="Application.Language" type="string-options">
<introspect class="org.crosswire.bibledesktop.desktop.Translations" property="CurrentTranslation"/>
@@ -225,47 +225,44 @@
<introspect class="org.crosswire.common.swing.LookAndFeelUtil" property="Font"/>
</option>
-<!-- Currently not used
+<!-- This really only useful for developers -->
+ <option key="Advanced.SourcePath" type="path" priority="9" hidden="false">
+ <introspect class="org.crosswire.common.swing.ExceptionPane" property="SourcePath"/>
+ </option>
+
+<!-- This really only useful for developers -->
+ <option key="Advanced.DefaultPassageType" type="int-options" hidden="false">
+ <introspect class="org.crosswire.jsword.passage.PassageKeyFactory" property="DefaultPassage"/>
+ <alternative number="0"/>
+ <alternative number="1"/>
+ <alternative number="2"/>
+ <alternative number="3"/>
+ </option>
+
+<!-- Limbo: Currently not used
<option key="Advanced.Raw.CacheData" type="boolean">
<introspect class="org.crosswire.jsword.book.raw.RawBook" property="DefaultCacheData"/>
</option>
-->
-<!-- This really only useful for developers, they can uncomment it.
+<!-- Limbo: This really only useful for developers
<option key="Advanced.Reports.ShowErrorsInDialogBox" type="boolean" priority="8">
<introspect class="org.crosswire.common.swing.ExceptionPane" property="HelpDeskListener"/>
</option>
-->
-<!-- This really only useful for developers, they can uncomment it.
+<!-- Limbo: This really only useful for developers
<option key="Advanced.Reports.LogErrorsInLogWindow" type="boolean" priority="8">
<introspect class="org.crosswire.common.swing.ExceptionShelf" property="HelpDeskListener"/>
</option>
-->
-<!-- This really only useful for developers, they can uncomment it.
- <option key="Advanced.SourcePath" type="path" priority="9">
- <introspect class="org.crosswire.common.swing.ExceptionPane" property="SourcePath"/>
- </option>
--->
-
-<!-- This really only useful for developers, they can uncomment it.
- <option key="Advanced.Passage.DefaultType" type="int-options">
- <introspect class="org.crosswire.jsword.passage.PassageKeyFactory" property="DefaultPassage"/>
- <alternative number="0"/>
- <alternative number="1"/>
- <alternative number="2"/>
- <alternative number="3"/>
- </option>
--->
-
-<!-- This really only useful for developers, they can uncomment it.
- <option key="Advanced.IncludeAdvancedTabs" type="boolean">
+<!-- This really only useful for developers -->
+ <option key="Advanced.IncludeAdvancedTabs" type="boolean" hidden="true">
<introspect class="org.crosswire.bibledesktop.desktop.AboutPane" property="Advanced"/>
</option>
--->
-<!-- Temporarily remove Blog code
+<!-- Limbo: Temporarily remove Blog code
<option key="WebJournal.Url" type="string" priority="1">
<introspect class="org.crosswire.bibledesktop.journal.BlogClientFrame" property="Url"/>
</option>
Modified: trunk/bibledesktop/src/main/resources/config_de.properties
===================================================================
--- trunk/bibledesktop/src/main/resources/config_de.properties 2007-06-07 14:41:28 UTC (rev 1392)
+++ trunk/bibledesktop/src/main/resources/config_de.properties 2007-06-07 18:37:44 UTC (rev 1393)
@@ -6,7 +6,7 @@
Bibles.RetainCurrent.help=New Bibelansicht soll gerade gelesene Bibel verwenden.
Bibles.DefaultBible.path=Bibeln.Standardbibel
Bibles.DefaultBible.help=Welche der installierten Bibeln wird als Standardeinstellung verwendet.
-Bibles.DefaultDictionary.path=Bibeln. Standardwoerterbuch
+Bibles.DefaultDictionary.path=Bibeln.Standardwoerterbuch
Bibles.DefaultDictionary.help=Welches der installierten Woerterbuecher wird als Standardeinstellung verwendet.
Bibles.DefaultCommentary.path=Bibeln.Standardkommentar
Bibles.DefaultCommentary.help=Which of the available Commentaries is the default.
@@ -22,14 +22,12 @@
Bibles.DefaultHebrewParse.help=Which of the available Hebrew Morphology/Parsing Guides is the default.
BibleDisplay.Reuse.path=Bible Display.Open links in same Bible View
BibleDisplay.Reuse.help=Reuse Bible View for links.
+BibleDisplay.MaxPickers.path=Bible Display.Parallel Bible Limit
+BibleDisplay.MaxPickers.help=Limit the number of Bibles to show at once
BibleDisplay.Commentaries.path=Bible Display.List Commentaries with Bibles
BibleDisplay.Commentaries.help=List Commentaries with Bibles
BibleDisplay.Sidebar.path=Bible Display.Show the Passage Sidebar
BibleDisplay.Sidebar.help=Show the Passage Sidebar
-BibleDisplay.Converter.path=Bible Display.Converter
-BibleDisplay.Converter.help=The engine used to genterate the book display
-BibleDisplay.ConfigurableStylesheet.path=Bible Display.Configurable Stylesheet
-BibleDisplay.ConfigurableStylesheet.help=The style applied to displayed Books when using the configurable styler.
BibleDisplay.VersesPerTab.path=Bible Display.Verses Per Tab
BibleDisplay.VersesPerTab.help=How many verses do you want to display on a page before spilling to tabbed mode.
BibleDisplay.RankedVerses.path=Bible Display.Default Number of Matched Verses
@@ -42,57 +40,49 @@
SwordBook.BookSearchPath.help=Additional places to look for SWORD books.
SwordBook.DownloadDirectory.path=Sword Books.Download Directory
SwordBook.DownloadDirectory.help=Where should we store newly downloaded books.
-Remote.RemoteHost.path=Remote.Remote Host
-Remote.RemoteHost.help=The URL of a remote HTTP host.
Passages.PersistentNaming.path=Passages.Persistent Naming
-Passages.PersistentNaming.help=Yes if the passage editor re-writes the references to conform to its notation.
+Passages.PersistentNaming.help=Should your input of names .
Passages.FullBookName.path=Passages.Use Full Book Names
-Passages.FullBookName.help=Yes if full Bible Book names should be used.
+Passages.FullBookName.help=Should full Bible book names or abbreviations be used.
Passages.BlurringRules.path=Passages.Passage Expansion Rules
-Passages.BlurringRules.help=What is the default expansion - Expand across chapter boundaries or not.
+Passages.BlurringRules.help=What is the default expansion - Stay within chapter boundaries or not.
Passages.BlurringRules.alternative.0=None
Passages.BlurringRules.alternative.1=Chapter
#Passages.BlurringRules.alternative.2=Book
Passages.BookCase.path=Passages.Book Case
-Passages.BookCase.help=What case should we use to display the references.
+Passages.BookCase.help=What case should we use to display the Bible book names.
Passages.BookCase.alternative.0=lower
Passages.BookCase.alternative.1=Sentence
Passages.BookCase.alternative.2=UPPER
-Application.LookAndFeel.path=Application.Look and Feel
-Application.LookAndFeel.help=The look and feel of the application.
+Application.Language.path=Application.Language
+Application.Language.help=The language of the application. (Requires restart)
Application.InitialLayout.path=Application.Initial Layout
-Application.InitialLayout.help=Do you want to start in Tabbed or Multiple Document view mode
+Application.InitialLayout.help=Do you want to start in Tabbed or Multiple Document view mode (Requires restart)
Application.InitialLayout.alternative.0=Tabbed Document Interface
Application.InitialLayout.alternative.1=Multiple Document Interface
Application.MaxHeight.path=Application.Maximum Window Height
Application.MaxHeight.help=The maximum height you want the window to be
Application.MaxWidth.path=Application.Maximum Window Width
Application.MaxWidth.help=The maximum width you want the window to be
-Advanced.Raw.CacheData.path=Advanced.Raw.Cache Data
-Advanced.Raw.CacheData.help=Do new RawBibles cache the entire Bible in memory, or just the indexes.
-Advanced.Reports.ShowErrorsInDialogBox.path=Advanced.Reports.Show errors in a dialog box
-Advanced.Reports.ShowErrorsInDialogBox.help=Do we display Exceptions in a GUI window.
-Advanced.Reports.LogErrorsInLogWindow.path=Advanced.Reports.Log errors in the log window
-Advanced.Reports.LogErrorsInLogWindow.help=Do we display Exceptions in a the GUI shelf.
+Application.UIFont.path=Application.General Font
+Application.UIFont.help=The font for the application (Requires restart)
+
+# The following are not for general use and are hidden from view
+BibleDisplay.CSSOverride.path=Bible Display.CSS Override
+BibleDisplay.CSSOverride.help=Use an alternate CSS Stylesheet.
+BibleDisplay.Converter.path=Bible Display.Converter
+BibleDisplay.Converter.help=The engine used to genterate the book display
+BibleDisplay.ConfigurableStylesheet.path=Bible Display.Configurable Stylesheet
+BibleDisplay.ConfigurableStylesheet.help=The style applied to displayed Books when using the configurable styler.
+Application.LookAndFeel.path=Application.Look and Feel
+Application.LookAndFeel.help=The look and feel of the application.
Advanced.SourcePath.path=Advanced.Source Path
Advanced.SourcePath.help=The directories to search for source code in when investigating an exception.
-Advanced.XSLT.Cache.path=Advanced.XSLT.Cache
-Advanced.XSLT.Cache.help=Do we cache the XSLT pages (faster but a pain for development).
-Advanced.Passage.DefaultType.path=Advanced.Passage.Default Type
-Advanced.Passage.DefaultType.help=What type of passage does the PassageFactory create by default.
-Advanced.Passage.DefaultType.alternative.0=Speed (Rocket)
-Advanced.Passage.DefaultType.alternative.1=Write Speed (Bitwise)
-Advanced.Passage.DefaultType.alternative.2=Size (Distinct)
-Advanced.Passage.DefaultType.alternative.3=Mix (Ranged)
-Advanced.AboutDialog.IncludeAdvancedTabs.path=Advanced.About Dialog.Include Advanced Tabs
-Advanced.AboutDialog.IncludeAdvancedTabs.help=Are the advanced tabs visible in the "About ..." Dialog. (Requires restart)
-WebJournal.Url.path=Web Journal.Server URL
-WebJournal.Url.help=The URL for web journal's the web services interface.
-WebJournal.UserName.path=Web Journal.Account name
-WebJournal.UserName.help=The account name on the weblog server.
-WebJournal.Password.path=Web Journal.Account password
-WebJournal.Password.help=The account password.
-WebJournal.Type.path=Web Journal.The API type
-WebJournal.Type.help=The type of interface the weblog server supports.
-WebJournal.Type.alternative.0=Atom
-WebJournal.Type.alternative.1=MetaWeblog
+Advanced.DefaultPassageType.path=Advanced.Default Passage Type
+Advanced.DefaultPassageType.help=What type of passage does the PassageFactory create by default.
+Advanced.DefaultPassageType.alternative.0=Speed (Rocket)
+Advanced.DefaultPassageType.alternative.1=Write Speed (Bitwise)
+Advanced.DefaultPassageType.alternative.2=Size (Distinct)
+Advanced.DefaultPassageType.alternative.3=Mix (Ranged)
+Advanced.IncludeAdvancedTabs.path=Advanced.Include Advanced Tabs
+Advanced.IncludeAdvancedTabs.help=Are the advanced tabs visible in the "About ..." Dialog. (Requires restart)
Modified: trunk/bibledesktop/src/main/resources/desktop.properties
===================================================================
--- trunk/bibledesktop/src/main/resources/desktop.properties 2007-06-07 14:41:28 UTC (rev 1392)
+++ trunk/bibledesktop/src/main/resources/desktop.properties 2007-06-07 18:37:44 UTC (rev 1393)
@@ -1,11 +1 @@
-#Tool Shed Options
-#Mon Dec 09 18:55:35 GMT 2002
-#Bibles.Display.Blurring\ Rules=Chapter
-#Looks.Look\ and\ Feel=com.sun.java.swing.plaf.windows.WindowsLookAndFeel
-#Reports.Exceptions\ to\ Dialog\ Box=True
-#Bibles.Display.Book\ Case=Sentence
-#Bibles.Raw.Cache\ Data=True
-#Bibles.Display.Persistent\ Naming=False
-#Reports.Exceptions\ to\ Log\ Window=True
-#Bibles.Sword.Base\ Directory=
-#Advanced.Source\ Path=
+# This file is deliberately empty
\ No newline at end of file
Added: trunk/bibledesktop/src/main/resources/limboConfig.properties
===================================================================
--- trunk/bibledesktop/src/main/resources/limboConfig.properties (rev 0)
+++ trunk/bibledesktop/src/main/resources/limboConfig.properties 2007-06-07 18:37:44 UTC (rev 1393)
@@ -0,0 +1,22 @@
+# The naming convention for the keys in the file is to match that of the
+# keys of the options in the config.xml file.
+# Since the keys may have spaces these need to be escaped here.
+
+Remote.RemoteHost.path=Remote.Remote Host
+Remote.RemoteHost.help=The URL of a remote HTTP host.
+Advanced.Raw.CacheData.path=Advanced.Raw.Cache Data
+Advanced.Raw.CacheData.help=Do new RawBibles cache the entire Bible in memory, or just the indexes.
+Advanced.Reports.ShowErrorsInDialogBox.path=Advanced.Reports.Show errors in a dialog box
+Advanced.Reports.ShowErrorsInDialogBox.help=Do we display Exceptions in a GUI window.
+Advanced.Reports.LogErrorsInLogWindow.path=Advanced.Reports.Log errors in the log window
+Advanced.Reports.LogErrorsInLogWindow.help=Do we display Exceptions in a the GUI shelf.
+WebJournal.Url.path=Web Journal.Server URL
+WebJournal.Url.help=The URL for web journal's the web services interface.
+WebJournal.UserName.path=Web Journal.Account name
+WebJournal.UserName.help=The account name on the weblog server.
+WebJournal.Password.path=Web Journal.Account password
+WebJournal.Password.help=The account password.
+WebJournal.Type.path=Web Journal.The API type
+WebJournal.Type.help=The type of interface the weblog server supports.
+WebJournal.Type.alternative.0=Atom
+WebJournal.Type.alternative.1=MetaWeblog
Property changes on: trunk/bibledesktop/src/main/resources/limboConfig.properties
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Modified: trunk/bibledesktop/src/main/resources/xsl/cswing/simple.xsl
===================================================================
--- trunk/bibledesktop/src/main/resources/xsl/cswing/simple.xsl 2007-06-07 14:41:28 UTC (rev 1392)
+++ trunk/bibledesktop/src/main/resources/xsl/cswing/simple.xsl 2007-06-07 18:37:44 UTC (rev 1393)
@@ -127,9 +127,6 @@
<html dir="{$direction}">
<head>
<base href="{$baseURL}"/>
- <xsl:if test="$css != ''">
- <link rel="stylesheet" type="text/css" href="{$css}" title="styling" />
- </xsl:if>
<style type="text/css">
BODY { <xsl:value-of select="$fontspec" /> }
A { text-decoration: none; }
@@ -159,6 +156,8 @@
TD.notes { width:20%; background:#f4f4e8; }
TD.text { width:80%; }
</style>
+ <!-- Always include the user's stylesheet even if "" -->
+ <link rel="stylesheet" type="text/css" href="{$css}" title="styling" />
</head>
<body>
<!-- If there are notes, output a table with notes in the 2nd column. -->
Modified: trunk/common/src/main/java/org/crosswire/common/config/AbstractReflectedChoice.java
===================================================================
--- trunk/common/src/main/java/org/crosswire/common/config/AbstractReflectedChoice.java 2007-06-07 14:41:28 UTC (rev 1392)
+++ trunk/common/src/main/java/org/crosswire/common/config/AbstractReflectedChoice.java 2007-06-07 18:37:44 UTC (rev 1393)
@@ -42,9 +42,12 @@
*/
public void init(Element option, ResourceBundle configResources) throws StartupException
{
+ assert configResources != null;
+
key = option.getAttributeValue("key"); //$NON-NLS-1$
- assert configResources != null;
+ String hiddenState = option.getAttributeValue("hidden"); //$NON-NLS-1$
+ hidden = Boolean.valueOf(hiddenState).booleanValue();
String helpText = configResources.getString(key + ".help"); //$NON-NLS-1$
assert helpText != null;
@@ -195,12 +198,17 @@
return true;
}
- /**
- * Sometimes we need to ensure that we configure items in a certain
- * order, the config package moves the changes to the application
- * starting with the highest priority, moving to the lowest
- * @return A priority level
+ /* (non-Javadoc)
+ * @see org.crosswire.common.config.Choice#isHidden()
*/
+ public boolean isHidden()
+ {
+ return hidden;
+ }
+
+ /* (non-Javadoc)
+ * @see org.crosswire.common.config.Choice#getPriority()
+ */
public int getPriority()
{
return priority;
@@ -323,6 +331,11 @@
private String fullPath;
/**
+ * Whether this choice should be visible or hidden
+ */
+ private boolean hidden;
+
+ /**
* The priority of this config level
*/
private int priority = PRIORITY_NORMAL;
Modified: trunk/common/src/main/java/org/crosswire/common/config/Choice.java
===================================================================
--- trunk/common/src/main/java/org/crosswire/common/config/Choice.java 2007-06-07 14:41:28 UTC (rev 1392)
+++ trunk/common/src/main/java/org/crosswire/common/config/Choice.java 2007-06-07 18:37:44 UTC (rev 1393)
@@ -122,6 +122,12 @@
int getPriority();
/**
+ * Whether this should be visible in a Config Editor.
+ * @return hidden or visible
+ */
+ boolean isHidden();
+
+ /**
* Do we need to restart the program in order for this change to have
* effect?
* @return True if a restart is required
Modified: trunk/common/src/main/java/org/crosswire/common/config/Config.java
===================================================================
--- trunk/common/src/main/java/org/crosswire/common/config/Config.java 2007-06-07 14:41:28 UTC (rev 1392)
+++ trunk/common/src/main/java/org/crosswire/common/config/Config.java 2007-06-07 18:37:44 UTC (rev 1393)
@@ -106,8 +106,9 @@
* @param key The new name
* @param model The Field model to map to the key
*/
- public void add(String key, Choice model)
+ public void add(Choice model)
{
+ String key = model.getKey();
//log.debug("Adding key=" + key);
keys.add(key);
@@ -145,7 +146,7 @@
try
{
Choice choice = ChoiceFactory.getChoice(element, configResources);
- add(key, choice);
+ add(choice);
}
catch (StartupException e)
{
@@ -189,41 +190,18 @@
}
/**
- * The set of Choice Names that we are controlling
- * @return An enumeration over the keys
+ * The set of Choice that we are controlling
+ * @return An enumeration over the choices
*/
- public Iterator getPaths()
+ public Iterator iterator()
{
- List paths = new ArrayList();
-
- Iterator iter = models.iterator();
- while (iter.hasNext())
- {
- Choice choice = (Choice) iter.next();
- String path = getPath(choice.getFullPath());
-
- if (!paths.contains(path))
- {
- paths.add(path);
- }
- }
-
- return paths.iterator();
+ return models.iterator();
}
/**
- * The set of Choice Names that we are controlling
- * @return An enumeration over the keys
+ * Get the Choice for a given key
+ * @return the requested choice
*/
- public Iterator getNames()
- {
- return keys.iterator();
- }
-
- /**
- * Step through the keys
- * @return an enum of the keys
- */
public Choice getChoice(String key)
{
int index = keys.indexOf(key);
Modified: trunk/common-swing/src/main/java/org/crosswire/common/config/swing/AbstractConfigEditor.java
===================================================================
--- trunk/common-swing/src/main/java/org/crosswire/common/config/swing/AbstractConfigEditor.java 2007-06-07 14:41:28 UTC (rev 1392)
+++ trunk/common-swing/src/main/java/org/crosswire/common/config/swing/AbstractConfigEditor.java 2007-06-07 18:37:44 UTC (rev 1393)
@@ -65,24 +65,23 @@
{
public void choiceAdded(ConfigEvent ev)
{
- addChoice(ev.getKey(), ev.getChoice());
+ addChoice(ev.getChoice());
updateTree();
}
public void choiceRemoved(ConfigEvent ev)
{
- removeChoice(ev.getKey(), ev.getChoice());
+ removeChoice(ev.getChoice());
updateTree();
}
});
// For each of the Fields put it in a FieldPanel
- Iterator it = config.getNames();
+ Iterator it = config.iterator();
while (it.hasNext())
{
- String key = (String) it.next();
- Choice model = config.getChoice(key);
+ Choice model = (Choice) it.next();
- addChoice(key, model);
+ addChoice(model);
}
updateTree();
@@ -165,8 +164,14 @@
/**
* Add a Choice to our set of panels
*/
- protected void addChoice(String key, Choice model)
+ protected void addChoice(Choice model)
{
+ if (model.isHidden())
+ {
+ return;
+ }
+
+ String key = model.getKey();
String path = Config.getPath(model.getFullPath());
// Check if we want to display this option
@@ -197,8 +202,9 @@
/**
* Add a Choice to our set of panels
*/
- protected void removeChoice(String key, Choice model)
+ protected void removeChoice(Choice model)
{
+ String key = model.getKey();
String path = Config.getPath(model.getFullPath());
Field field = (Field) fields.get(key);
@@ -235,10 +241,16 @@
*/
protected void screenToLocal()
{
- Iterator it = config.getNames();
+ Iterator it = config.iterator();
while (it.hasNext())
{
- String key = (String) it.next();
+ Choice choice = (Choice) it.next();
+ if (choice.isHidden())
+ {
+ continue;
+ }
+
+ String key = choice.getKey();
Field field = (Field) fields.get(key);
String value = field.getValue();
@@ -256,11 +268,17 @@
*/
protected void localToScreen()
{
- Iterator it = config.getNames();
+ Iterator it = config.iterator();
while (it.hasNext())
{
- String key = (String) it.next();
+ Choice choice = (Choice) it.next();
+ if (choice.isHidden())
+ {
+ continue;
+ }
+ String key = choice.getKey();
+
Field field = (Field) fields.get(key);
String value = config.getLocal(key);
Modified: trunk/common-swing/src/main/java/org/crosswire/common/config/swing/AdvancedConfigEditor.java
===================================================================
--- trunk/common-swing/src/main/java/org/crosswire/common/config/swing/AdvancedConfigEditor.java 2007-06-07 14:41:28 UTC (rev 1392)
+++ trunk/common-swing/src/main/java/org/crosswire/common/config/swing/AdvancedConfigEditor.java 2007-06-07 18:37:44 UTC (rev 1393)
@@ -107,8 +107,9 @@
/**
* Add a Choice to our set of panels
*/
- protected void addChoice(String key, Choice model)
+ protected void addChoice(Choice model)
{
+ String key = model.getKey();
Field field = FieldMap.getField(model);
fields.put(key, field);
@@ -125,8 +126,9 @@
/**
* Add a Choice to our set of panels
*/
- protected void removeChoice(String key)
+ protected void removeChoice(Choice choice)
{
+ String key = choice.getKey();
Field field = (Field) fields.get(key);
if (field != null)
{
@@ -204,11 +206,17 @@
{
List retcode = new ArrayList();
- Iterator it = config.getNames();
+ Iterator it = config.iterator();
while (it.hasNext())
{
- String temp = (String) it.next();
+ Choice choice = (Choice) it.next();
+ if (choice.isHidden())
+ {
+ continue;
+ }
+ String temp = choice.getKey();
+
if (temp.startsWith(path) && !temp.equals(path))
{
// Chop off the similar start
Modified: trunk/common-swing/src/main/java/org/crosswire/common/config/swing/TabbedConfigEditor.java
===================================================================
--- trunk/common-swing/src/main/java/org/crosswire/common/config/swing/TabbedConfigEditor.java 2007-06-07 14:41:28 UTC (rev 1392)
+++ trunk/common-swing/src/main/java/org/crosswire/common/config/swing/TabbedConfigEditor.java 2007-06-07 18:37:44 UTC (rev 1393)
@@ -31,6 +31,7 @@
import javax.swing.JComponent;
import javax.swing.JTabbedPane;
+import org.crosswire.common.config.Choice;
import org.crosswire.common.swing.FormPane;
/**
@@ -69,10 +70,11 @@
}
tab = new JTabbedPane();
- Iterator it = config.getPaths();
+ Iterator it = config.iterator();
while (it.hasNext())
{
- String path = (String) it.next();
+ Choice choice = (Choice) it.next();
+ String path = choice.getFullPath();
// log.fine("TAB: path="+path);
JTabbedPane nest = tab;
Modified: trunk/common-swing/src/main/java/org/crosswire/common/config/swing/TreeConfigEditor.java
===================================================================
--- trunk/common-swing/src/main/java/org/crosswire/common/config/swing/TreeConfigEditor.java 2007-06-07 14:41:28 UTC (rev 1392)
+++ trunk/common-swing/src/main/java/org/crosswire/common/config/swing/TreeConfigEditor.java 2007-06-07 18:37:44 UTC (rev 1393)
@@ -150,10 +150,15 @@
/**
* Add a Choice to our set of panels
*/
- protected void addChoice(String key, Choice model)
+ protected void addChoice(Choice model)
{
- super.addChoice(key, model);
+ if (model.isHidden())
+ {
+ return;
+ }
+ super.addChoice(model);
+
// Sort the tree out
String path = Config.getPath(model.getFullPath());
FormPane card = (FormPane) decks.get(path);
@@ -168,9 +173,9 @@
/**
* Add a Choice to our set of panels
*/
- protected void removeChoice(String key, Choice model)
+ protected void removeChoice(Choice model)
{
- super.removeChoice(key, model);
+ super.removeChoice(model);
// Sort the tree out
String path = Config.getPath(model.getFullPath());
@@ -274,17 +279,23 @@
}
/**
- * Get a Vector of the children rooted at path
+ * Get a List of the children rooted at path
*/
protected List getChildren(String path)
{
List retcode = new ArrayList();
- Iterator it = config.getPaths();
+ Iterator it = config.iterator();
while (it.hasNext())
{
- String temp = (String) it.next();
+ Choice choice = (Choice) it.next();
+ if (choice.isHidden())
+ {
+ continue;
+ }
+ String temp = choice.getFullPath();
+
if (temp.startsWith(path) && !temp.equals(path))
{
// Chop off the similar start
@@ -296,10 +307,11 @@
// Chop off all after the first dot
int dot_pos = temp.indexOf('.');
- if (dot_pos != -1)
+ if (dot_pos == -1)
{
- temp = temp.substring(0, dot_pos);
+ continue;
}
+ temp = temp.substring(0, dot_pos);
// Add it to the list if needed
if (temp.length() > 0 && !retcode.contains(temp))
Modified: trunk/common-swing/src/main/java/org/crosswire/common/config/swing/WizardConfigEditor.java
===================================================================
--- trunk/common-swing/src/main/java/org/crosswire/common/config/swing/WizardConfigEditor.java 2007-06-07 14:41:28 UTC (rev 1392)
+++ trunk/common-swing/src/main/java/org/crosswire/common/config/swing/WizardConfigEditor.java 2007-06-07 18:37:44 UTC (rev 1393)
@@ -46,6 +46,7 @@
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
+import org.crosswire.common.config.Choice;
import org.crosswire.common.swing.ActionFactory;
import org.crosswire.common.swing.CWScrollPane;
import org.crosswire.common.swing.EdgeBorder;
@@ -120,11 +121,17 @@
{
// We need to Enumerate thru the Model names not the Path names in the
// deck because the deck is a Hashtable that re-orders them.
- Iterator it = config.getNames();
+ Iterator it = config.iterator();
while (it.hasNext())
{
- String key = (String) it.next();
+ Choice choice = (Choice) it.next();
+ if (choice.isHidden())
+ {
+ continue;
+ }
+ String key = choice.getKey();
+
int last_dot = key.lastIndexOf('.');
String path = key.substring(0, last_dot);
More information about the jsword-svn
mailing list