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