| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
|
| 20 |
|
|
| 21 |
|
|
| 22 |
|
|
| 23 |
|
package org.xmlhammer.gui.preferences; |
| 24 |
|
|
| 25 |
|
import java.awt.Frame; |
| 26 |
|
|
| 27 |
|
import javax.swing.JFrame; |
| 28 |
|
import javax.swing.event.TreeSelectionListener; |
| 29 |
|
|
| 30 |
|
import org.xmlhammer.PreferencesHandler; |
| 31 |
|
import org.xmlhammer.gui.util.preferences.HelpEnabledPreferencesDialog; |
| 32 |
|
import org.xmlhammer.model.preferences.Preferences; |
| 33 |
|
|
| 34 |
|
|
| 35 |
|
|
| 36 |
|
|
| 37 |
|
|
| 38 |
|
|
| 39 |
|
|
| 40 |
|
|
| 41 |
|
public class JAXPPropertiesDialog extends HelpEnabledPreferencesDialog implements TreeSelectionListener { |
| 42 |
|
private static final long serialVersionUID = -7403432397234000652L; |
| 43 |
|
|
| 44 |
88 |
private Preferences preferences = null; |
| 45 |
|
|
| 46 |
88 |
protected SAXParserFactoryPreferencesPanel saxParserFactoryPreferencesPanel = null; |
| 47 |
88 |
protected PropertiesPanel saxParserFactoryPropertiesPanel = null; |
| 48 |
88 |
protected FeaturesPanel saxParserFactoryFeaturesPanel = null; |
| 49 |
88 |
protected AttributesPanel documentBuilderFactoryAttributesPanel = null; |
| 50 |
88 |
protected FeaturesPanel documentBuilderFactoryFeaturesPanel = null; |
| 51 |
88 |
protected FeaturesPanel xpathFactoryFeaturesPanel = null; |
| 52 |
88 |
protected XPathFactoryPreferencesPanel xpathFactoryPreferencesPanel = null; |
| 53 |
88 |
protected PrefixNamespaceMappingsPanel prefixNamespaceMappingsPanel = null; |
| 54 |
88 |
protected TransformerFactoryPreferencesPanel transformerFactoryPreferencesPanel = null; |
| 55 |
88 |
protected AttributesPanel transformerFactoryAttributesPanel = null; |
| 56 |
88 |
protected FeaturesPanel transformerFactoryFeaturesPanel = null; |
| 57 |
88 |
protected DocumentBuilderFactoryPreferencesPanel documentBuilderFactoryPreferencesPanel = null; |
| 58 |
88 |
protected SchemaFactoryPreferencesPanel schemaFactoryPreferencesPanel = null; |
| 59 |
88 |
protected PropertiesPanel schemaFactoryPropertiesPanel = null; |
| 60 |
88 |
protected FeaturesPanel schemaFactoryFeaturesPanel = null; |
| 61 |
|
|
| 62 |
|
|
| 63 |
|
|
| 64 |
|
|
| 65 |
|
|
| 66 |
|
public JAXPPropertiesDialog(Frame parent, String title) { |
| 67 |
88 |
super(parent, title); |
| 68 |
|
|
| 69 |
88 |
this.preferences = PreferencesHandler.getInstance().getPreferences(); |
| 70 |
88 |
} |
| 71 |
|
|
| 72 |
|
public Preferences getPreferences() { |
| 73 |
550 |
return preferences; |
| 74 |
|
} |
| 75 |
|
|
| 76 |
|
protected SAXParserFactoryPreferencesPanel getSAXParserFactoryPreferencesPanel() { |
| 77 |
110 |
if ( saxParserFactoryPreferencesPanel == null) { |
| 78 |
22 |
saxParserFactoryPreferencesPanel = new SAXParserFactoryPreferencesPanel(); |
| 79 |
|
} |
| 80 |
|
|
| 81 |
110 |
return saxParserFactoryPreferencesPanel; |
| 82 |
|
} |
| 83 |
|
|
| 84 |
|
protected PropertiesPanel getSAXParserFactoryPropertiesPanel() { |
| 85 |
66 |
if ( saxParserFactoryPropertiesPanel == null) { |
| 86 |
22 |
saxParserFactoryPropertiesPanel = new PropertiesPanel((JFrame)getParent(), "Properties", "preferences.sax.properties"); |
| 87 |
|
} |
| 88 |
|
|
| 89 |
66 |
return saxParserFactoryPropertiesPanel; |
| 90 |
|
} |
| 91 |
|
|
| 92 |
|
protected FeaturesPanel getSAXParserFactoryFeaturesPanel() { |
| 93 |
66 |
if ( saxParserFactoryFeaturesPanel == null) { |
| 94 |
22 |
saxParserFactoryFeaturesPanel = new FeaturesPanel((JFrame)getParent(), "Features", "preferences.sax.features"); |
| 95 |
|
} |
| 96 |
|
|
| 97 |
66 |
return saxParserFactoryFeaturesPanel; |
| 98 |
|
} |
| 99 |
|
|
| 100 |
|
protected DocumentBuilderFactoryPreferencesPanel getDocumentBuilderFactoryPreferencesPanel() { |
| 101 |
110 |
if ( documentBuilderFactoryPreferencesPanel == null) { |
| 102 |
22 |
documentBuilderFactoryPreferencesPanel = new DocumentBuilderFactoryPreferencesPanel(); |
| 103 |
|
} |
| 104 |
|
|
| 105 |
110 |
return documentBuilderFactoryPreferencesPanel; |
| 106 |
|
} |
| 107 |
|
|
| 108 |
|
protected AttributesPanel getDocumentBuilderFactoryAttributesPanel() { |
| 109 |
66 |
if ( documentBuilderFactoryAttributesPanel == null) { |
| 110 |
22 |
documentBuilderFactoryAttributesPanel = new AttributesPanel((JFrame)getParent(), "Attributes", "preferences.dom.attributes"); |
| 111 |
|
} |
| 112 |
|
|
| 113 |
66 |
return documentBuilderFactoryAttributesPanel; |
| 114 |
|
} |
| 115 |
|
|
| 116 |
|
protected FeaturesPanel getDocumentBuilderFactoryFeaturesPanel() { |
| 117 |
66 |
if ( documentBuilderFactoryFeaturesPanel == null) { |
| 118 |
22 |
documentBuilderFactoryFeaturesPanel = new FeaturesPanel((JFrame)getParent(), "Features", "preferences.dom.features"); |
| 119 |
|
} |
| 120 |
|
|
| 121 |
66 |
return documentBuilderFactoryFeaturesPanel; |
| 122 |
|
} |
| 123 |
|
|
| 124 |
|
protected TransformerFactoryPreferencesPanel getTransformerFactoryPreferencesPanel() { |
| 125 |
110 |
if ( transformerFactoryPreferencesPanel == null) { |
| 126 |
22 |
transformerFactoryPreferencesPanel = new TransformerFactoryPreferencesPanel(); |
| 127 |
|
} |
| 128 |
|
|
| 129 |
110 |
return transformerFactoryPreferencesPanel; |
| 130 |
|
} |
| 131 |
|
|
| 132 |
|
protected AttributesPanel getTransformerFactoryAttributesPanel() { |
| 133 |
66 |
if ( transformerFactoryAttributesPanel == null) { |
| 134 |
22 |
transformerFactoryAttributesPanel = new AttributesPanel((JFrame)getParent(), "Attributes", "preferences.trax.attributes"); |
| 135 |
|
} |
| 136 |
|
|
| 137 |
66 |
return transformerFactoryAttributesPanel; |
| 138 |
|
} |
| 139 |
|
|
| 140 |
|
protected FeaturesPanel getTransformerFactoryFeaturesPanel() { |
| 141 |
66 |
if ( transformerFactoryFeaturesPanel == null) { |
| 142 |
22 |
transformerFactoryFeaturesPanel = new FeaturesPanel((JFrame)getParent(), "Features", "preferences.trax.features"); |
| 143 |
|
} |
| 144 |
|
|
| 145 |
66 |
return transformerFactoryFeaturesPanel; |
| 146 |
|
} |
| 147 |
|
|
| 148 |
|
protected XPathFactoryPreferencesPanel getXPathFactoryPreferencesPanel() { |
| 149 |
110 |
if ( xpathFactoryPreferencesPanel == null) { |
| 150 |
22 |
xpathFactoryPreferencesPanel = new XPathFactoryPreferencesPanel(); |
| 151 |
|
} |
| 152 |
|
|
| 153 |
110 |
return xpathFactoryPreferencesPanel; |
| 154 |
|
} |
| 155 |
|
|
| 156 |
|
protected FeaturesPanel getXPathFactoryFeaturesPanel() { |
| 157 |
66 |
if ( xpathFactoryFeaturesPanel == null) { |
| 158 |
22 |
xpathFactoryFeaturesPanel = new FeaturesPanel((JFrame)getParent(), "Features", "preferences.xpath.features"); |
| 159 |
|
} |
| 160 |
|
|
| 161 |
66 |
return xpathFactoryFeaturesPanel; |
| 162 |
|
} |
| 163 |
|
|
| 164 |
|
protected PrefixNamespaceMappingsPanel getPrefixNamespaceMappingsPanel() { |
| 165 |
66 |
if ( prefixNamespaceMappingsPanel == null) { |
| 166 |
22 |
prefixNamespaceMappingsPanel = new PrefixNamespaceMappingsPanel((JFrame)getParent(), "Mappings", "preferences.xpath.mappings"); |
| 167 |
|
} |
| 168 |
|
|
| 169 |
66 |
return prefixNamespaceMappingsPanel; |
| 170 |
|
} |
| 171 |
|
|
| 172 |
|
protected SchemaFactoryPreferencesPanel getSchemaFactoryPreferencesPanel() { |
| 173 |
154 |
if ( schemaFactoryPreferencesPanel == null) { |
| 174 |
22 |
schemaFactoryPreferencesPanel = new SchemaFactoryPreferencesPanel((JFrame)getParent()); |
| 175 |
|
} |
| 176 |
|
|
| 177 |
154 |
return schemaFactoryPreferencesPanel; |
| 178 |
|
} |
| 179 |
|
|
| 180 |
|
protected PropertiesPanel getSchemaFactoryPropertiesPanel() { |
| 181 |
66 |
if ( schemaFactoryPropertiesPanel == null) { |
| 182 |
22 |
schemaFactoryPropertiesPanel = new PropertiesPanel((JFrame)getParent(), "Properties", "preferences.schema.properties"); |
| 183 |
|
} |
| 184 |
|
|
| 185 |
66 |
return schemaFactoryPropertiesPanel; |
| 186 |
|
} |
| 187 |
|
|
| 188 |
|
protected FeaturesPanel getSchemaFactoryFeaturesPanel() { |
| 189 |
66 |
if ( schemaFactoryFeaturesPanel == null) { |
| 190 |
22 |
schemaFactoryFeaturesPanel = new FeaturesPanel((JFrame)getParent(), "Features", "preferences.schema.features"); |
| 191 |
|
} |
| 192 |
|
|
| 193 |
66 |
return schemaFactoryFeaturesPanel; |
| 194 |
|
} |
| 195 |
|
} |