01: /*
02: * XmlOptionsPanel.java
03: *
04: * This file is part of SQL Workbench/J, http://www.sql-workbench.net
05: *
06: * Copyright 2002-2008, Thomas Kellerer
07: * No part of this code maybe reused without the permission of the author
08: *
09: * To contact the author please send an email to: support@sql-workbench.net
10: *
11: */
12: package workbench.gui.dialogs.dataimport;
13:
14: import workbench.resource.ResourceMgr;
15: import workbench.resource.Settings;
16: import workbench.gui.dialogs.export.XmlOptions;
17:
18: /**
19: *
20: * @author support@sql-workbench.net
21: */
22: public class XmlOptionsPanel extends javax.swing.JPanel implements
23: XmlImportOptions {
24:
25: public XmlOptionsPanel() {
26: initComponents();
27: }
28:
29: public void saveSettings() {
30: Settings s = Settings.getInstance();
31: s.setProperty("workbench.export.xml.verbosexml", this
32: .getUseVerboseXml());
33: }
34:
35: public void restoreSettings() {
36: Settings s = Settings.getInstance();
37: this .setUseVerboseXml(s.getBoolProperty(
38: "workbench.export.xml.verbosexml", true));
39: }
40:
41: public boolean getUseVerboseXml() {
42: return this .verboseXmlCheckBox.isSelected();
43: }
44:
45: public void setUseVerboseXml(boolean flag) {
46: this .verboseXmlCheckBox.setSelected(flag);
47: }
48:
49: /** This method is called from within the constructor to
50: * initialize the form.
51: * WARNING: Do NOT modify this code. The content of this method is
52: * always regenerated by the Form Editor.
53: */
54: // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
55: private void initComponents() {
56: java.awt.GridBagConstraints gridBagConstraints;
57:
58: verboseXmlCheckBox = new javax.swing.JCheckBox();
59:
60: setLayout(new java.awt.GridBagLayout());
61:
62: verboseXmlCheckBox.setText(ResourceMgr
63: .getString("LblExportVerboseXml"));
64: verboseXmlCheckBox.setToolTipText(ResourceMgr
65: .getDescription("LblExportVerboseXml"));
66: gridBagConstraints = new java.awt.GridBagConstraints();
67: gridBagConstraints.gridx = 0;
68: gridBagConstraints.gridy = 1;
69: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
70: gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
71: gridBagConstraints.weightx = 1.0;
72: gridBagConstraints.weighty = 1.0;
73: add(verboseXmlCheckBox, gridBagConstraints);
74:
75: }
76:
77: // </editor-fold>//GEN-END:initComponents
78:
79: // Variables declaration - do not modify//GEN-BEGIN:variables
80: private javax.swing.JCheckBox verboseXmlCheckBox;
81: // End of variables declaration//GEN-END:variables
82:
83: }
|