package CodeGen.TabPages;
import CodeGen.BaseUI.IDialog;
import CodeGen.Config.AppConfig;
import CodeGen.DAL.ConnectionDAL;
import CodeGen.Model.ConnectionModel;
import Easis.Common.StringUtil;
import Easis.DBUtility.MSSQLHelper;
import Easis.XClient.Component.TableEX.XTableListMode;
import Easis.util.KeyValuePair;
import XCodeGen.CodeGenHelper;
import XCodeGen.JavaDataType;
import XCodeGen.Utils.DBObject.ColumnInfo;
import XCodeGen.Utils.DBObject.TableInfo;
import XCodeGen.Utils.DataTypeHelper;
import XCodeGen.Utils.GenModel.ChildListType;
import XCodeGen.Utils.GenModel.DisplayType;
import XCodeGen.Utils.GenModel.ParameterInfo;
import XCodeGen.Utils.GenModel.ValidateRuleInfo;
import XCodeGen.Utils.GenModel.ValidateType;
import com.jgoodies.forms.layout.ColumnSpec;
import com.jgoodies.forms.layout.FormLayout;
import com.jgoodies.forms.layout.RowSpec;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.EventObject;
import java.util.List;
import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JRootPane;
import javax.swing.JScrollPane;
import javax.swing.JTabbedPane;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.ListCellRenderer;
import javax.swing.UIManager;
import javax.swing.border.EmptyBorder;
import javax.swing.border.TitledBorder;
import javax.swing.event.CellEditorListener;
import javax.swing.plaf.DimensionUIResource;
import javax.swing.table.TableCellEditor;
import javax.swing.table.TableCellRenderer;
public class dialog_ChildParaList
extends IDialog
{
public Component _parent;
/* 72 */ private List<String> _tableNames = new ArrayList();
/* 73 */ private List<ColumnInfo> _columnList = new ArrayList();
/* 74 */ private int _connID = 0;
/* 75 */ private ParameterInfo _paraInfo = new ParameterInfo();
private XTableListMode<ParameterInfo> _childTableMode;
public void Uneed_setTableNames(List<String> tableNames)
{
/* 80 */ this._tableNames = tableNames;
}
public void Uneed_setColumnList(List<ColumnInfo> colList) {
/* 84 */ this._columnList = colList;
}
public void Uneed_setParaInfo(ParameterInfo pInfo) {
/* 88 */ this._paraInfo = pInfo;
}
/* 92 */ private JDialog _this = this;
/* 93 */ private final JPanel contentPanel = new JPanel();
private JTextField txt_IsRequired_ErrorMessage;
private JTextField txt_IsNumberic_ErrorMessage;
private JTextField txt_IsInteger_ErrorMessage;
private JTextField txt_IsDateTime_ErrorMessage;
private JTextField txt_IsColor_ErrorMessage;
private JTextField txt_IsEmail_ErrorMessage;
private JTextField txt_IsPhone_ErrorMessage;
private JTextField txt_IsBoolean_ErrorMessage;
private JTextField txt_IsURL_ErrorMessage;
private JTextField txt_NumberRange_Min;
private JTextField txt_NumberRange_Max;
private JTextField txt_StringRange_Min;
private JTextField txt_StringRange_Max;
private JTextField txt_paraName;
private JTextField txt_paraNameZH;
JPanel panel_ValidateRules;
JPanel panel_DisplayUI;
JCheckBox check_hasChild;
JPanel panel_parentAndChild;
JCheckBox check_IsRequired;
JCheckBox check_IsNumberic;
JCheckBox check_IsInteger;
JCheckBox check_IsDateTime;
JCheckBox check_IsColor;
JCheckBox check_IsEmail;
JCheckBox check_IsPhone;
JCheckBox check_IsBoolean;
JCheckBox check_IsURL;
JCheckBox check_NumberRange;
JCheckBox check_StringRange;
JCheckBox check_CompareTo;
JComboBox cbox_childTable;
JComboBox cbox_listType;
JComboBox cbox_keyField;
JComboBox cbox_TitleField;
JComboBox cbox_ImageField;
JComboBox cbox_DisplayUI;
JComboBox cbox_CompareTo;
/* 133 */ private ConnectionModel _connectionInfo = new ConnectionModel();
public dialog_ChildParaList(int connID, List<String> tableNames, List<ColumnInfo> colList, ParameterInfo pInfo)
{
/* 137 */ Uneed_setTableNames(tableNames);
/* 138 */ Uneed_setColumnList(colList);
/* 139 */ Uneed_setParaInfo(pInfo);
/* 140 */ this._connID = connID;
/* 141 */ ConnectionDAL cDal = new ConnectionDAL();
/* 142 */ this._connectionInfo = cDal.getRecord(this._connID);
/* 145 */ UIManager.put("swing.boldMetal", Boolean.FALSE);
/* 146 */ setTitle("表单参数设置");
/* 147 */ setBounds(100, 100, 750, 750);
/* 148 */ getContentPane().setLayout(new BorderLayout());
/* 149 */ this.contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
/* 150 */ getContentPane().add(this.contentPanel, "Center");
/* 151 */ this.contentPanel.setLayout(new FormLayout(new ColumnSpec[] {
/* 152 */ ColumnSpec.decode("default:grow") },
/* 153 */ new RowSpec[] {
/* 154 */ RowSpec.decode("top:min"),
/* 155 */ RowSpec.decode("max(50dlu;default):grow") }));
/* 157 */ JPanel panel = new JPanel();
/* 158 */ panel.setBorder(new TitledBorder(null, "参数信息", 4, 2, null, null));
/* 159 */ this.contentPanel.add(panel, "1, 1, fill, fill");
/* 160 */ panel.setLayout(new FormLayout(new ColumnSpec[] {
/* 161 */ ColumnSpec.decode("max(50dlu;default)"),
/* 162 */ ColumnSpec.decode("max(75dlu;default):grow"),
/* 163 */ ColumnSpec.decode("max(50dlu;default)"),
/* 164 */ ColumnSpec.decode("max(75dlu;default):grow"),
/* 165 */ ColumnSpec.decode("max(50dlu;default)"),
/* 166 */ ColumnSpec.decode("max(75dlu;default)") },
/* 167 */ new RowSpec[] {
/* 168 */ RowSpec.decode("max(20dlu;default)") }));
JLabel label = new JLabel("参数名称:");
panel.add(label, "1, 1, right, default");
this.txt_paraName = new JTextField();
this.txt_paraName.setEditable(false);
panel.add(this.txt_paraName, "2, 1, fill, default");
this.txt_paraName.setColumns(10);
label = new JLabel("中文名称:");
panel.add(label, "3, 1, right, default");
/* 184 */ this.txt_paraNameZH = new JTextField();
/* 185 */ panel.add(this.txt_paraNameZH, "4, 1, fill, default");
/* 186 */ this.txt_paraNameZH.setColumns(10);
/* 189 */ this.check_hasChild = new JCheckBox("包含子表");
/* 190 */ panel.add(this.check_hasChild, "5, 1");
/* 191 */ this.check_hasChild.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
/* 195 */ if (dialog_ChildParaList.this.check_hasChild.isSelected()) {
/* 196 */ dialog_ChildParaList.this.tab_setting.setSelectedIndex(1);
/* 197 */ dialog_ChildParaList.this.tab_setting.setEnabled(false);
}
else
{
/* 202 */ dialog_ChildParaList.this.tab_setting.setEnabled(false);
/* 203 */ dialog_ChildParaList.this.tab_setting.setSelectedIndex(0);
}
}
/* 211 */ });
/* 212 */ this.panel_DisplayUI = new JPanel();
/* 213 */ this.panel_DisplayUI.setBorder(new TitledBorder(null, "显示方式", 4, 2, null, null));
/* 215 */ this.panel_DisplayUI.setLayout(new FormLayout(new ColumnSpec[] {
/* 216 */ ColumnSpec.decode("default:grow") },
/* 217 */ new RowSpec[] {
/* 218 */ RowSpec.decode("max(30dlu;default)"),