[Jsxe-cvs] SF.net SVN: jsxe: [1247] branches/jsxe2/src/net/sourceforge/jsxe
Status: Inactive
Brought to you by:
ian_lewis
From: <ian...@us...> - 2006-09-07 00:11:21
|
Revision: 1247 http://svn.sourceforge.net/jsxe/?rev=1247&view=rev Author: ian_lewis Date: 2006-09-06 17:11:17 -0700 (Wed, 06 Sep 2006) Log Message: ----------- Updated XMLDocument property methods Modified Paths: -------------- branches/jsxe2/src/net/sourceforge/jsxe/DocumentBuffer.java branches/jsxe2/src/net/sourceforge/jsxe/dom/XMLDocument.java Modified: branches/jsxe2/src/net/sourceforge/jsxe/DocumentBuffer.java =================================================================== --- branches/jsxe2/src/net/sourceforge/jsxe/DocumentBuffer.java 2006-09-07 00:10:46 UTC (rev 1246) +++ branches/jsxe2/src/net/sourceforge/jsxe/DocumentBuffer.java 2006-09-07 00:11:17 UTC (rev 1247) @@ -643,21 +643,21 @@ //}}} //{{{ format output - boolean formatOutput = Boolean.valueOf(getProperty(XMLDocument.FORMAT_XML, "false")).booleanValue(); + boolean formatOutput = getBooleanProperty(XMLDocument.FORMAT_XML); formatCheckBox = new JCheckBox(Messages.getMessage("Document.Options.Format.XML"), formatOutput); addComponent(formatCheckBox, Messages.getMessage("Document.Options.Format.XML.ToolTip")); //}}} //{{{ validate - boolean validating = Boolean.valueOf(getProperty(XMLDocument.IS_VALIDATING, "false")).booleanValue(); + boolean validating = getBooleanProperty(XMLDocument.IS_VALIDATING); m_m_validatingCheckBox = new JCheckBox(Messages.getMessage("Document.Options.Validate"), validating); addComponent(m_m_validatingCheckBox, Messages.getMessage("Document.Options.Validate.ToolTip")); //}}} //{{{ soft tabs - boolean softTabs = Boolean.valueOf(getProperty(XMLDocument.IS_USING_SOFT_TABS, "false")).booleanValue(); + boolean softTabs = getBooleanProperty(XMLDocument.IS_USING_SOFT_TABS); m_m_softTabsCheckBox = new JCheckBox(Messages.getMessage("Document.Options.Soft.Tabs"), softTabs); addComponent(m_m_softTabsCheckBox, Messages.getMessage("Document.Options.Soft.Tabs.ToolTip")); Modified: branches/jsxe2/src/net/sourceforge/jsxe/dom/XMLDocument.java =================================================================== --- branches/jsxe2/src/net/sourceforge/jsxe/dom/XMLDocument.java 2006-09-07 00:10:46 UTC (rev 1246) +++ branches/jsxe2/src/net/sourceforge/jsxe/dom/XMLDocument.java 2006-09-07 00:11:17 UTC (rev 1247) @@ -318,21 +318,11 @@ * @return the value of the property for the given key. */ public String getProperty(String key) { - return props.getProperty(key); + synchronized(propertyLock) { + return props.getProperty(key, jsXe.getProperty("xml.document." + key)); + } }//}}} - //{{{ getProperty() - /** - * Gets a property for the key given or returns the default value - * if there is no property for the given key. - * @param key the key to the properties list - * @param defaultValue the default value for the property requested - * @return the value of the property for the given key. - */ - public String getProperty(String key, String defaultValue) { - return props.getProperty(key, defaultValue); - }//}}} - //{{{ setProperty() /** * Sets a property of the XMLDocument This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |