1 | private static class SQLJavaObjectOkJPanel extends OkJPanel {↵ | | 1 | private static class UnknownOkJPanel extends OkJPanel {↵
|
|
2 | private static final long serialVersionUID = 1353928067985854545L;↵ | | 2 | private static final long serialVersionUID = 1L;↵
|
3 | /*↵ | | 3 | /*↵
|
4 | * GUI components - need to be here because they need to be↵ | | 4 | * GUI components - need to be here because they need to be↵
|
5 | * accessible from the event handlers to alter each other's state.↵ | | 5 | * accessible from the event handlers to alter each other's state.↵
|
6 | */↵ | | 6 | */↵
|
7 | // check box for whether to read contents during table load or not↵ | | 7 | // check box for whether to read contents during table load or not↵
|
8 | private JCheckBox _showSQLJavaObjectChk = new JCheckBox(↵ | | 8 | private JCheckBox _showUnknownChk = new JCheckBox(↵
|
9 | // i18n[dataTypeJavaObject.readContentsWhenLoaded=Read contents when table is first loaded and display as string]↵ | | 9 | // i18n[dataTypeUnknown.readContentsOnLoad=Read contents when table is first loaded and display as string]↵
|
10 | s_stringMgr.getString("dataTypeJavaObject.readContentsWhenLoaded"));↵ | | 10 | s_stringMgr.getString("dataTypeUnknown.readContentsOnLoad"));↵
|
|
|
11 | public SQLJavaObjectOkJPanel() {↵ | | 11 | public UnknownOkJPanel() {↵
|
| | | 12 | ↵
|
12 | /* set up the controls */↵ | | 13 | /* set up the controls */↵
|
13 | // checkbox for read/not-read on table load↵ | | 14 | // checkbox for read/not-read on table load↵
|
14 | _showSQLJavaObjectChk.setSelected(_readSQLJavaObject);↵ | | 15 | _showUnknownChk.setSelected(_readUnknown);↵
|
|
15 | /*↵ | | 16 | /*↵
|
16 | * Create the panel and add the GUI items to it↵ | | 17 | * Create the panel and add the GUI items to it↵
|
17 | */↵ | | 18 | */↵
|
| | | 19 | ↵
|
18 | // i18n[dataTypeJavaObject.sqlJavaObjectType=SQL JavaObject (↵ | | 20 | setBorder(BorderFactory.createTitledBorder(↵
|
19 | SQL type 2000)]↵ | | 21 | // i18n[dataTypeUnknown.unknownTypes=Unknown DataTypes (non-standard SQL type codes)]↵
|
20 | setBorder(BorderFactory.createTitledBorder(s_stringMgr.getString("dataTypeJavaObject.sqlJavaObjectType")));↵ | | 22 | s_stringMgr.getString("dataTypeUnknown.unknownTypes")));↵
|
|
21 | add(_showSQLJavaObjectChk);↵ | | 23 | add(_showUnknownChk);↵
|
|
22 | } // end of constructor for inner class↵ | | 24 | } // end of constructor for inner class↵
|
|
| | | 25 | ↵
|
| | | 26 | ↵
|
23 | /**↵ | | 27 | /**↵
|
24 | * User has clicked OK in the surrounding JPanel,↵ | | 28 | * User has clicked OK in the surrounding JPanel,↵
|
25 | * so save the current state of all variables↵ | | 29 | * so save the current state of all variables↵
|
26 | */↵ | | 30 | */↵
|
27 | public void ok() {↵ | | 31 | public void ok() {↵
|
28 | // get the values from the controls and set them in the static properties↵ | | 32 | // get the values from the controls and set them in the static properties↵
|
29 | _readSQLJavaObject = _showSQLJavaObjectChk.isSelected();↵ | | 33 | _readUnknown = _showUnknownChk.isSelected();↵
|
30 | DTProperties.put(↵ | | 34 | DTProperties.put(↵
|
31 | thisClassName,↵ | | 35 | thisClassName,↵
|
32 | "readSQLJavaObject", Boolean.valueOf(_readSQLJavaObject).toString()) | | 36 | "readUnknown", Boolean.valueOf(_readUnknown).toString())
|