Update of /cvsroot/squirrel-sql/sql12/app/src/net/sourceforge/squirrel_sql/client/session/properties
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18552
Modified Files:
FormatSessionPropertiesPanel.java
Log Message:
let data types handle their own options
Index: FormatSessionPropertiesPanel.java
===================================================================
RCS file: /cvsroot/squirrel-sql/sql12/app/src/net/sourceforge/squirrel_sql/client/session/properties/FormatSessionPropertiesPanel.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** FormatSessionPropertiesPanel.java 3 Feb 2004 02:06:41 -0000 1.5
--- FormatSessionPropertiesPanel.java 17 May 2004 15:32:09 -0000 1.6
***************
*** 37,40 ****
--- 37,42 ----
import net.sourceforge.squirrel_sql.fw.datasetviewer.LargeResultSetObjectInfo;
import net.sourceforge.squirrel_sql.fw.gui.IntegerField;
+ import net.sourceforge.squirrel_sql.fw.gui.OkJPanel;
+ import net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.CellComponentFactory;
import net.sourceforge.squirrel_sql.client.IApplication;
***************
*** 58,61 ****
--- 60,64 ----
private SessionProperties _props;
+
/**
* ctor specifying the Application API.
***************
*** 127,138 ****
String BLOB = "Blob";
String CLOB = "Clob";
! String HINT = "Specify formatting options";
String NBR_BYTES = "Number of bytes to read:";
String NBR_CHARS = "Number of chars to read:";
String SQL_OTHER = "Display SQL Other (Data Type 1111) as String";
! String TITLE = "Format";
String BLOB_WARNING = "Some DBMSs implement BLOB/CLOB fields as other Data Types\nsuch as BINARY and VARCHAR.\nThe following works only for Data Types 2004(BLOB) and 2005(CLOB).";
String OTHER_TYPE_WARNING = "The following Data Types are not the same in all DBMSs and\nmay cause exceptions if interpreted as Strings.";
}
private JCheckBox _showBlobChk = new JCheckBox(i18n.BLOB);
--- 130,144 ----
String BLOB = "Blob";
String CLOB = "Clob";
! String HINT = "Set options for specific Data Types";
String NBR_BYTES = "Number of bytes to read:";
String NBR_CHARS = "Number of chars to read:";
String SQL_OTHER = "Display SQL Other (Data Type 1111) as String";
! String TITLE = "Data Type Controls";
String BLOB_WARNING = "Some DBMSs implement BLOB/CLOB fields as other Data Types\nsuch as BINARY and VARCHAR.\nThe following works only for Data Types 2004(BLOB) and 2005(CLOB).";
String OTHER_TYPE_WARNING = "The following Data Types are not the same in all DBMSs and\nmay cause exceptions if interpreted as Strings.";
}
+
+ /** List of OkJPanels containing controls for specific DataType info */
+ OkJPanel[] dataTypePanels;
private JCheckBox _showBlobChk = new JCheckBox(i18n.BLOB);
***************
*** 199,202 ****
--- 205,211 ----
largeObjInfo.setReadSQLOther(_showSQLOtherChk.isSelected());
largeObjInfo.setReadAllOther(_showAllOtherChk.isSelected());
+
+ for (int i=0; i< dataTypePanels.length; i++)
+ dataTypePanels[i].ok();
}
***************
*** 231,234 ****
--- 240,244 ----
private JPanel createDataTypesPanel()
{
+ /*****
_showBlobSizeField.setColumns(5);
_showClobSizeField.setColumns(5);
***************
*** 238,244 ****
_blobTypeDrop.addActionListener(_controlMediator);
_clobTypeDrop.addActionListener(_controlMediator);
JPanel pnl = new JPanel(new GridBagLayout());
! pnl.setBorder(BorderFactory.createTitledBorder("Show Data as Strings for Columns of these Data Types"));
final GridBagConstraints gbc = new GridBagConstraints();
gbc.fill = GridBagConstraints.HORIZONTAL;
--- 248,255 ----
_blobTypeDrop.addActionListener(_controlMediator);
_clobTypeDrop.addActionListener(_controlMediator);
+ ******/
JPanel pnl = new JPanel(new GridBagLayout());
! //?? pnl.setBorder(BorderFactory.createTitledBorder("Show Data as Strings for Columns of these Data Types"));
final GridBagConstraints gbc = new GridBagConstraints();
gbc.fill = GridBagConstraints.HORIZONTAL;
***************
*** 249,252 ****
--- 260,264 ----
gbc.gridy = 0;
+ /*****
pnl.add(new JLabel(""), gbc);
***************
*** 309,313 ****
--- 321,334 ----
++gbc.gridy;
pnl.add(_showAllOtherChk, gbc);
+ /************************************************************************************/
+ dataTypePanels = CellComponentFactory.getControlPanels();
+ for (int i=0; i<dataTypePanels.length; i++) {
+ gbc.gridx=0;
+ gbc.gridwidth = GridBagConstraints.REMAINDER;
+ ++gbc.gridy;
+ pnl.add(dataTypePanels[i], gbc);
+ }
+
return pnl;
}
|