private class DialectTypeListListener implements ItemListener {
public void itemStateChanged(ItemEvent e) {
String dbName = (String)dialectList.getSelectedItem();
HibernateDialect dialect = DialectFactory.getDialect(dbName);
if (!dialect.supportsColumnComment()) {
commentTextArea.setEditable(false);
//i18n[ColumnDetailsDialog.columnCommentLabel={0} does not
//support column comments]
String noColumnSupportMsg =
s_stringMgr.getString(
"ColumnDetailsDialog.columnCommentToolTip",
dbName);
commentTextArea.setToolTipText(noColumnSupportMsg);
} else {
commentTextArea.setEditable(true);
commentTextArea.setToolTipText(null);
}
if (_mode == MODIFY_MODE) {
if (!dialect.supportsAlterColumnNull()) {
nullableCheckBox.setEnabled(false);
//i18n[ColumnDetailsDialog.columnNullLabel={0} does not
//support altering column nullability]
String noColumnSupportMsg =
s_stringMgr.getString("ColumnDetailsDialog.columnNullToolTip",
dbName);
nullableCheckBox.setToolTipText(noColumnSupportMsg);
} else {
nullableCheckBox.setEnabled(true);
nullableCheckBox.setToolTipText(null);
}
if (!dialect.supportsRenameColumn()) {
//i18n[ColumnDetailsDialog.columnNameTootTip={0} does not
//support altering column name]
String noColNameChange =
s_stringMgr.getString("ColumnDetailsDialog.columnNameTootTip",
dbName);
columnNameTextField.setEditable(false);
columnNameTextField.setToolTipText(noColNameChange);
} else {
columnNameTextField.setEditable(true);
columnNameTextField.setToolTipText(null);
}
if (!dialect.supportsAlterColumnType()) {
//i18n[ColumnDetailsDialog.columnTypeTootTip={0} does not
//support altering column type]
String noColTypeChange =
s_stringMgr.getString("ColumnDetailsDialog.columnTypeTootTip",
dbName);