package com.vci.client.portal.NewUI; import java.awt.BorderLayout; import java.awt.FlowLayout; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.LinkedHashMap; import java.util.Map.Entry; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.swing.ButtonGroup; import javax.swing.DefaultListModel; import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JComboBox; import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JRadioButton; import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.JTextField; import javax.swing.border.EmptyBorder; //import org.apache.commons.collections.map.ListOrderedMap; import com.vci.corba.omd.btm.BtmItem; import com.vci.corba.omd.ltm.LinkType; import com.vci.corba.omd.qtm.QTInfo; import com.vci.corba.portal.data.PLPageDefination; import com.vci.corba.portal.data.PLUILayout; import com.vci.corba.portal.data.PLTabPage; import com.vci.corba.portal.data.PortalVI; import com.vci.client.LogonApplication; import com.vci.client.common.providers.ServiceProvider; import com.vci.client.omd.provider.BtmProvider; import com.vci.client.omd.provider.LinkTypeProvider; import com.vci.client.oq.QTClient; import com.vci.client.oq.QTDClient; import com.vci.client.portal.utility.PLDefination; import com.vci.client.portal.utility.UITools; import com.vci.client.ui.swing.VCIOptionPane; import com.vci.common.portal.constants.TemplateTypeConstants; import com.vci.common.qt.object.QTConstants; import com.vci.common.utility.ObjectUtility; import com.vci.corba.common.VCIError; import java.awt.Dimension; import javax.swing.JTable; public class UIDesinDialog extends JDialog { private final JPanel contentPanel = new JPanel(); private JButton okButton; private JButton cancelButton; private JPanel panel; private JRadioButton tableRadio; private JRadioButton customRadio; private JRadioButton rdbtnTreeTable; private ButtonGroup bg = new ButtonGroup(); private ButtonGroup bg1 = new ButtonGroup(); private JPanel northPanel; private JRadioButton rootObjectRdb; private JRadioButton relateRdb; private JRadioButton PFKRdb; private JPanel custermPanel; private JPanel tableGernaralPanel; private JPanel tree_tableGernaralPanel; private JTextField controlpath; private JPanel dynamicPal; private JPanel gernalDynamicPal; private JPanel tableObjectPal; private JPanel relatetPal; private JComboBox rootCom; private JComboBox rootSelectTem; private JComboBox relatCom; private JComboBox relateLtCom; private JComboBox relateSelectTem; private PLUILayout plpagelayoutdefination; private PLTabPage pltabpage; private PLDefination pldefination; private String plPageDefinationID; private JLabel label_2; private JPanel panel_1; private JRadioButton navigatorfold; private JRadioButton navigatorrole; private JRadioButton navigatornodisply; private String btmName; private JPanel treeTablePanel; private JLabel label_4; private JPanel panel_3; private JRadioButton graduallyRad; private JRadioButton allRad; private JLabel label_5; private JTextField expandColsTxt; private Integer templateType = TemplateTypeConstants.TREETABLE; private JLabel label_9; private JTextField nameTxt; private JLabel label_10; private JScrollPane scrollPane; private JTextArea descTxt; private JRadioButton rdbtnForm; private JRadioButton rdbtnTree; private JLabel label_11; private JTextField seqTxt; private short disType; private PLPageDefination plPageDefination; private JPanel formPanel; private JLabel label_12; private JRadioButton genralRdb; private JLabel label_13; private JRadioButton form_rootRdb; private JLabel label_14; private JComboBox rootObjCom; private JLabel label_15; private JComboBox rootObjSelectCom; private JPanel treePanel; private JLabel label_16; private JComboBox tree_showTypeTxt; private JLabel label_17; private JPanel panel_4; private JRadioButton tree_graduallyRad; private JRadioButton tree_allRad; private JLabel label_18; private JPanel panel_5; private JRadioButton tree_zhengRad; private JRadioButton tree_fanRad; private JCheckBox tree_isShowImage; private JLabel label_19; private JTextField tree_showLinkAbsTxt; private JLabel label_20; private JComboBox tree_validityTxt; private JLabel label_21; private JTextField tree_showAbsTxt; private JLabel label_22; private JTextField tree_separatorTxt; private JLabel label_23; private JComboBox tree_linkTypeTxt; private JRadioButton tree_table_relateRdb; private JRadioButton tree_table_rootObjectRdb; private ButtonGroup tree_table_bg1; private JPanel tree_table_gernalDynamicPal; private JPanel form_relatetPal; private JComboBox form_relatCom; private JComboBox form_relateLtCom; private JComboBox form_relateSelectTem; private JPanel form_gernalDynamicPal; private ClickEventInfoPanel cp; private String plPageContextOId; private boolean editflag; private boolean closeFlag = false; public boolean isCloseFlag() { return closeFlag; } public void setCloseFlag(boolean closeFlag) { this.closeFlag = closeFlag; } public UIDesinDialog(PLUILayout plpagelayoutdefination, PLPageDefination plPageDefination, String btmName, short disType, PLTabPage pltabpage) { super(LogonApplication.frame, true); setTitle("页面设计窗口"); this.plpagelayoutdefination = plpagelayoutdefination; this.plPageDefination = plPageDefination; this.btmName = btmName; this.disType = disType; this.pltabpage = pltabpage; setBounds(100, 100, 640, 718); init(); //test // dynamicPal.remove(tableGernaralPanel); // dynamicPal.remove(gernalDynamicPal); // dynamicPal.remove(custermPanel); // dynamicPal.remove(treeTablePanel); // dynamicPal.remove(tree_tableGernaralPanel); // dynamicPal.remove(tree_table_gernalDynamicPal); // dynamicPal.remove(formPanel); // dynamicPal.remove(form_gernalDynamicPal); // dynamicPal.add(treePanel, BorderLayout.CENTER); } public UIDesinDialog(PLUILayout plpagelayoutdefination, PLPageDefination plPageDefination, String btmName, short disType, PLTabPage pltabpage,boolean editflag) { super(LogonApplication.frame, true); setTitle("页面设计窗口"); this.plpagelayoutdefination = plpagelayoutdefination; this.plPageDefination = plPageDefination; this.btmName = btmName; this.disType = disType; this.pltabpage = pltabpage; this.editflag = editflag; } public JPanel init() { getContentPane().setLayout(new BorderLayout()); { JPanel buttonPane = new JPanel(); getContentPane().add(buttonPane, BorderLayout.SOUTH); buttonPane.setLayout(new BorderLayout(0, 0)); panel_7 = new JPanel(); FlowLayout flowLayout = (FlowLayout) panel_7.getLayout(); flowLayout.setAlignment(FlowLayout.RIGHT); buttonPane.add(panel_7, BorderLayout.SOUTH); { okButton = new JButton("保存"); panel_7.add(okButton); } { cancelButton = new JButton("关闭"); panel_7.add(cancelButton); if(editflag){ cancelButton.setVisible(false); } } cp = new ClickEventInfoPanel(); cp.setPreferredSize(new Dimension(283, 130)); buttonPane.add(cp, BorderLayout.NORTH); } { northPanel = new JPanel(); getContentPane().add(northPanel, BorderLayout.NORTH); northPanel.setLayout(new BorderLayout(0, 0)); northPanel.add(contentPanel, BorderLayout.NORTH); contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); GridBagLayout gbl_contentPanel = new GridBagLayout(); gbl_contentPanel.columnWidths = new int[] { 0, 85, 0, 0, 0 }; gbl_contentPanel.rowHeights = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; gbl_contentPanel.columnWeights = new double[] { 0.0, 0.0, 1.0, 1.0, Double.MIN_VALUE }; gbl_contentPanel.rowWeights = new double[] { 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 1.0, Double.MIN_VALUE }; contentPanel.setLayout(gbl_contentPanel); label_9 = new JLabel("名称"); GridBagConstraints gbc_label_9 = new GridBagConstraints(); gbc_label_9.insets = new Insets(0, 0, 5, 5); gbc_label_9.gridx = 1; gbc_label_9.gridy = 0; contentPanel.add(label_9, gbc_label_9); nameTxt = new JTextField(); GridBagConstraints gbc_nameTxt = new GridBagConstraints(); gbc_nameTxt.insets = new Insets(0, 0, 5, 5); gbc_nameTxt.fill = GridBagConstraints.HORIZONTAL; gbc_nameTxt.gridx = 2; gbc_nameTxt.gridy = 0; contentPanel.add(nameTxt, gbc_nameTxt); nameTxt.setColumns(10); label_11 = new JLabel("编号"); GridBagConstraints gbc_label_11 = new GridBagConstraints(); gbc_label_11.insets = new Insets(0, 0, 5, 5); gbc_label_11.gridx = 1; gbc_label_11.gridy = 1; contentPanel.add(label_11, gbc_label_11); seqTxt = new JTextField(); GridBagConstraints gbc_seqTxt = new GridBagConstraints(); gbc_seqTxt.insets = new Insets(0, 0, 5, 5); gbc_seqTxt.fill = GridBagConstraints.HORIZONTAL; gbc_seqTxt.gridx = 2; gbc_seqTxt.gridy = 1; contentPanel.add(seqTxt, gbc_seqTxt); seqTxt.setColumns(10); label_10 = new JLabel("描述"); GridBagConstraints gbc_label_10 = new GridBagConstraints(); gbc_label_10.insets = new Insets(0, 0, 5, 5); gbc_label_10.gridx = 1; gbc_label_10.gridy = 2; contentPanel.add(label_10, gbc_label_10); scrollPane = new JScrollPane(); GridBagConstraints gbc_scrollPane = new GridBagConstraints(); gbc_scrollPane.gridheight = 3; gbc_scrollPane.insets = new Insets(0, 0, 5, 5); gbc_scrollPane.fill = GridBagConstraints.BOTH; gbc_scrollPane.gridx = 2; gbc_scrollPane.gridy = 2; contentPanel.add(scrollPane, gbc_scrollPane); descTxt = new JTextArea(); scrollPane.setViewportView(descTxt); { JLabel label = new JLabel("模板类型"); GridBagConstraints gbc_label = new GridBagConstraints(); gbc_label.insets = new Insets(0, 0, 5, 5); gbc_label.gridx = 1; gbc_label.gridy = 5; contentPanel.add(label, gbc_label); } { panel = new JPanel(); FlowLayout flowLayout = (FlowLayout) panel.getLayout(); flowLayout.setAlignment(FlowLayout.LEFT); GridBagConstraints gbc_panel = new GridBagConstraints(); gbc_panel.insets = new Insets(0, 0, 5, 0); gbc_panel.gridwidth = 2; gbc_panel.fill = GridBagConstraints.BOTH; gbc_panel.gridx = 2; gbc_panel.gridy = 5; contentPanel.add(panel, gbc_panel); { tableRadio = new JRadioButton("Table"); tableRadio.setSelected(true); panel.add(tableRadio); } { customRadio = new JRadioButton("自定义模板"); panel.add(customRadio); } { rdbtnTreeTable = new JRadioButton("TreeTable模板"); panel.add(rdbtnTreeTable); } rdbtnForm = new JRadioButton("Form"); panel.add(rdbtnForm); rdbtnTree = new JRadioButton("Tree"); panel.add(rdbtnTree); bg.add(tableRadio); bg.add(customRadio); bg.add(rdbtnTreeTable); bg.add(rdbtnForm); bg.add(rdbtnTree); } } label_2 = new JLabel("显示内容"); GridBagConstraints gbc_label_2 = new GridBagConstraints(); gbc_label_2.insets = new Insets(0, 0, 0, 5); gbc_label_2.gridx = 1; gbc_label_2.gridy = 6; contentPanel.add(label_2, gbc_label_2); panel_1 = new JPanel(); FlowLayout flowLayout = (FlowLayout) panel_1.getLayout(); flowLayout.setAlignment(FlowLayout.LEFT); GridBagConstraints gbc_panel_1 = new GridBagConstraints(); gbc_panel_1.gridwidth = 2; gbc_panel_1.fill = GridBagConstraints.BOTH; gbc_panel_1.gridx = 2; gbc_panel_1.gridy = 6; contentPanel.add(panel_1, gbc_panel_1); ButtonGroup navigatorbg = new ButtonGroup(); navigatornodisply = new JRadioButton("不显示"); navigatornodisply.setSelected(true); panel_1.add(navigatornodisply); navigatorbg.add(navigatornodisply); navigatorrole = new JRadioButton("显示角色"); panel_1.add(navigatorrole); navigatorbg.add(navigatorrole); navigatorfold = new JRadioButton("显示fold"); panel_1.add(navigatorfold); navigatorbg.add(navigatorfold); setgernaralPanel(); setTree_table_gernaralPanel(); setCustomPanel(); dynamicPal = new JPanel(); dynamicPal.setLayout(new BorderLayout(0, 0)); //test // dynamicPal.add(tableGernaralPanel, BorderLayout.NORTH); // dynamicPal.add(tree_tableGernaralPanel, BorderLayout.NORTH); treePanel = new JPanel(); formPanel = new JPanel(); treeTablePanel = new JPanel(); gernalDynamicPal = new JPanel(); tree_table_gernalDynamicPal = new JPanel(); form_gernalDynamicPal = new JPanel(); form_gernalDynamicPal.setLayout(new BorderLayout()); setTreeTablePanel(); setRelatePanel(); setFormRelatePanel(); setTree_table_RelatePal(); setrootObjectPanel(); setFormPanel(); setTreePanel(); gernalDynamicPal.add(tableObjectPal); dynamicPal.add(gernalDynamicPal); dynamicPal.add(tree_table_gernalDynamicPal); form_rootPal = new JPanel(); setFormRootPanel(); getContentPane().add(dynamicPal, BorderLayout.CENTER); initRootCom(); initRootObjCom(); initRelateCom(); initShowType(); initLinkType(); intiValidity(); actionListener(); initData(); initActionControlPanel(); // gernalDynamicPal.add(treeTablePanel, BorderLayout.CENTER); return (JPanel) getContentPane(); } private void setFormRootPanel() { GridBagLayout gbl_form_rootPal = new GridBagLayout(); gbl_form_rootPal.columnWidths = new int[]{0, 54, 0, 0}; gbl_form_rootPal.rowHeights = new int[]{15, 0, 0}; gbl_form_rootPal.columnWeights = new double[]{0.0, 0.0, 1.0, Double.MIN_VALUE}; gbl_form_rootPal.rowWeights = new double[]{0.0, 0.0, Double.MIN_VALUE}; form_rootPal.setLayout(gbl_form_rootPal); label_14 = new JLabel("目标对象"); GridBagConstraints gbc_label_14 = new GridBagConstraints(); gbc_label_14.insets = new Insets(0, 0, 5, 5); gbc_label_14.gridx = 1; gbc_label_14.gridy = 0; form_rootPal.add(label_14, gbc_label_14); rootObjCom = new JComboBox(); GridBagConstraints gbc_rootObjCom = new GridBagConstraints(); gbc_rootObjCom.insets = new Insets(0, 0, 5, 0); gbc_rootObjCom.fill = GridBagConstraints.HORIZONTAL; gbc_rootObjCom.gridx = 2; gbc_rootObjCom.gridy = 0; form_rootPal.add(rootObjCom, gbc_rootObjCom); label_15 = new JLabel("选择模板"); GridBagConstraints gbc_label_15 = new GridBagConstraints(); gbc_label_15.insets = new Insets(0, 0, 0, 5); gbc_label_15.gridx = 1; gbc_label_15.gridy = 1; form_rootPal.add(label_15, gbc_label_15); rootObjSelectCom = new JComboBox(); GridBagConstraints gbc_rootObjSelectCom = new GridBagConstraints(); gbc_rootObjSelectCom.fill = GridBagConstraints.HORIZONTAL; gbc_rootObjSelectCom.gridx = 2; gbc_rootObjSelectCom.gridy = 1; form_rootPal.add(rootObjSelectCom, gbc_rootObjSelectCom); } private void setTree_table_RelatePal() { tree_table_RelatePal = new JPanel(); tree_table_gernalDynamicPal.setLayout(new BorderLayout()); GridBagLayout gbl_tree_table_RelatePal = new GridBagLayout(); gbl_tree_table_RelatePal.columnWidths = new int[]{0, 0, 0}; gbl_tree_table_RelatePal.rowHeights = new int[]{0, 0, 0, 0, 0, 0}; gbl_tree_table_RelatePal.columnWeights = new double[]{0.0, 1.0, Double.MIN_VALUE}; gbl_tree_table_RelatePal.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE}; tree_table_RelatePal.setLayout(gbl_tree_table_RelatePal); label_3 = new JLabel("顶级节点显示类型"); GridBagConstraints gbc_label_3 = new GridBagConstraints(); gbc_label_3.insets = new Insets(0, 0, 5, 5); gbc_label_3.anchor = GridBagConstraints.EAST; gbc_label_3.gridx = 0; gbc_label_3.gridy = 0; tree_table_RelatePal.add(label_3, gbc_label_3); tree_table_relatCom = new JComboBox(); GridBagConstraints gbc_tree_table_relatCom = new GridBagConstraints(); gbc_tree_table_relatCom.insets = new Insets(0, 0, 5, 0); gbc_tree_table_relatCom.fill = GridBagConstraints.HORIZONTAL; gbc_tree_table_relatCom.gridx = 1; gbc_tree_table_relatCom.gridy = 0; tree_table_RelatePal.add(tree_table_relatCom, gbc_tree_table_relatCom); lblNewLabel_3 = new JLabel("LinkType"); GridBagConstraints gbc_lblNewLabel_3 = new GridBagConstraints(); gbc_lblNewLabel_3.insets = new Insets(0, 0, 5, 5); gbc_lblNewLabel_3.gridx = 0; gbc_lblNewLabel_3.gridy = 1; tree_table_RelatePal.add(lblNewLabel_3, gbc_lblNewLabel_3); tree_table_relateLtCom = new JComboBox(); GridBagConstraints gbc_tree_table_relateLtCom = new GridBagConstraints(); gbc_tree_table_relateLtCom.insets = new Insets(0, 0, 5, 0); gbc_tree_table_relateLtCom.fill = GridBagConstraints.HORIZONTAL; gbc_tree_table_relateLtCom.gridx = 1; gbc_tree_table_relateLtCom.gridy = 1; tree_table_RelatePal.add(tree_table_relateLtCom, gbc_tree_table_relateLtCom); label_6 = new JLabel("选择模板"); GridBagConstraints gbc_label_6 = new GridBagConstraints(); gbc_label_6.insets = new Insets(0, 0, 5, 5); gbc_label_6.gridx = 0; gbc_label_6.gridy = 2; tree_table_RelatePal.add(label_6, gbc_label_6); tree_table_relateSelectTem = new JComboBox(); GridBagConstraints gbc_tree_table_relateSelectTem = new GridBagConstraints(); gbc_tree_table_relateSelectTem.insets = new Insets(0, 0, 5, 0); gbc_tree_table_relateSelectTem.fill = GridBagConstraints.HORIZONTAL; gbc_tree_table_relateSelectTem.gridx = 1; gbc_tree_table_relateSelectTem.gridy = 2; tree_table_RelatePal.add(tree_table_relateSelectTem, gbc_tree_table_relateSelectTem); label_7 = new JLabel("展开方式"); GridBagConstraints gbc_label_7 = new GridBagConstraints(); gbc_label_7.insets = new Insets(0, 0, 5, 5); gbc_label_7.gridx = 0; gbc_label_7.gridy = 3; tree_table_RelatePal.add(label_7, gbc_label_7); panel_2 = new JPanel(); GridBagConstraints gbc_panel_2 = new GridBagConstraints(); gbc_panel_2.insets = new Insets(0, 0, 5, 0); gbc_panel_2.fill = GridBagConstraints.BOTH; gbc_panel_2.gridx = 1; gbc_panel_2.gridy = 3; tree_table_RelatePal.add(panel_2, gbc_panel_2); ButtonGroup bg = new ButtonGroup(); tree_table_R_graduallyRad = new JRadioButton("逐级展开"); tree_table_R_graduallyRad.setSelected(true); panel_2.add(tree_table_R_graduallyRad); tree_table_R_allRad = new JRadioButton("全部展开"); panel_2.add(tree_table_R_allRad); bg.add(tree_table_R_graduallyRad); bg.add(tree_table_R_allRad); label_8 = new JLabel("树形结构展开列"); GridBagConstraints gbc_label_8 = new GridBagConstraints(); gbc_label_8.anchor = GridBagConstraints.EAST; gbc_label_8.insets = new Insets(0, 0, 0, 5); gbc_label_8.gridx = 0; gbc_label_8.gridy = 4; tree_table_RelatePal.add(label_8, gbc_label_8); tree_table_R_expandColsTxt = new JTextField(); tree_table_R_expandColsTxt.setColumns(10); GridBagConstraints gbc_textField = new GridBagConstraints(); gbc_textField.fill = GridBagConstraints.HORIZONTAL; gbc_textField.gridx = 1; gbc_textField.gridy = 4; tree_table_RelatePal.add(tree_table_R_expandColsTxt, gbc_textField); } private void setTreePanel() { GridBagLayout gbl_treePanel = new GridBagLayout(); gbl_treePanel.columnWidths = new int[] { 0, 0, 0, 0, 0 }; gbl_treePanel.rowHeights = new int[] { 0, 0, 0, 0, 0, 0 }; gbl_treePanel.columnWeights = new double[] { 0.0, 1.0, 0.0, 1.0, Double.MIN_VALUE }; gbl_treePanel.rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE }; treePanel.setLayout(gbl_treePanel); label_16 = new JLabel("显示类型"); GridBagConstraints gbc_label_16 = new GridBagConstraints(); gbc_label_16.insets = new Insets(0, 0, 5, 5); gbc_label_16.gridx = 0; gbc_label_16.gridy = 0; treePanel.add(label_16, gbc_label_16); tree_showTypeTxt = new JComboBox(); GridBagConstraints gbc_tree_showTypeTxt = new GridBagConstraints(); gbc_tree_showTypeTxt.fill = GridBagConstraints.HORIZONTAL; gbc_tree_showTypeTxt.insets = new Insets(0, 0, 5, 5); gbc_tree_showTypeTxt.gridx = 1; gbc_tree_showTypeTxt.gridy = 0; treePanel.add(tree_showTypeTxt, gbc_tree_showTypeTxt); label_17 = new JLabel("展开方式"); GridBagConstraints gbc_label_17 = new GridBagConstraints(); gbc_label_17.insets = new Insets(0, 0, 5, 5); gbc_label_17.gridx = 2; gbc_label_17.gridy = 0; treePanel.add(label_17, gbc_label_17); panel_4 = new JPanel(); FlowLayout flowLayout = (FlowLayout) panel_4.getLayout(); flowLayout.setAlignment(FlowLayout.LEFT); GridBagConstraints gbc_panel_4 = new GridBagConstraints(); gbc_panel_4.fill = GridBagConstraints.HORIZONTAL; gbc_panel_4.insets = new Insets(0, 0, 5, 0); gbc_panel_4.gridx = 3; gbc_panel_4.gridy = 0; treePanel.add(panel_4, gbc_panel_4); tree_graduallyRad = new JRadioButton("逐级展开"); tree_graduallyRad.setSelected(true); panel_4.add(tree_graduallyRad); tree_allRad = new JRadioButton("全部展开"); panel_4.add(tree_allRad); ButtonGroup bg = new ButtonGroup(); bg.add(tree_graduallyRad); bg.add(tree_allRad); label_18 = new JLabel("展开方向"); GridBagConstraints gbc_label_18 = new GridBagConstraints(); gbc_label_18.insets = new Insets(0, 0, 5, 5); gbc_label_18.gridx = 0; gbc_label_18.gridy = 1; treePanel.add(label_18, gbc_label_18); panel_5 = new JPanel(); FlowLayout flowLayout_1 = (FlowLayout) panel_5.getLayout(); flowLayout_1.setAlignment(FlowLayout.LEFT); GridBagConstraints gbc_panel_5 = new GridBagConstraints(); gbc_panel_5.fill = GridBagConstraints.BOTH; gbc_panel_5.insets = new Insets(0, 0, 5, 5); gbc_panel_5.gridx = 1; gbc_panel_5.gridy = 1; treePanel.add(panel_5, gbc_panel_5); tree_zhengRad = new JRadioButton("正向"); tree_zhengRad.setSelected(true); panel_5.add(tree_zhengRad); tree_fanRad = new JRadioButton("反向"); panel_5.add(tree_fanRad); ButtonGroup bg1 = new ButtonGroup(); bg1.add(tree_zhengRad); bg1.add(tree_fanRad); tree_isShowImage = new JCheckBox("显示图标"); panel_5.add(tree_isShowImage); label_19 = new JLabel("显示link属性"); GridBagConstraints gbc_label_19 = new GridBagConstraints(); gbc_label_19.insets = new Insets(0, 0, 5, 5); gbc_label_19.gridx = 2; gbc_label_19.gridy = 1; treePanel.add(label_19, gbc_label_19); tree_showLinkAbsTxt = new JTextField(); tree_showLinkAbsTxt.setColumns(10); GridBagConstraints gbc_tree_showLinkAbsTxt = new GridBagConstraints(); gbc_tree_showLinkAbsTxt.fill = GridBagConstraints.HORIZONTAL; gbc_tree_showLinkAbsTxt.insets = new Insets(0, 0, 5, 0); gbc_tree_showLinkAbsTxt.gridx = 3; gbc_tree_showLinkAbsTxt.gridy = 1; treePanel.add(tree_showLinkAbsTxt, gbc_tree_showLinkAbsTxt); label_20 = new JLabel("有效性"); GridBagConstraints gbc_label_20 = new GridBagConstraints(); gbc_label_20.insets = new Insets(0, 0, 5, 5); gbc_label_20.gridx = 0; gbc_label_20.gridy = 2; treePanel.add(label_20, gbc_label_20); tree_validityTxt = new JComboBox(); GridBagConstraints gbc_tree_validityTxt = new GridBagConstraints(); gbc_tree_validityTxt.fill = GridBagConstraints.HORIZONTAL; gbc_tree_validityTxt.insets = new Insets(0, 0, 5, 5); gbc_tree_validityTxt.gridx = 1; gbc_tree_validityTxt.gridy = 2; treePanel.add(tree_validityTxt, gbc_tree_validityTxt); label_21 = new JLabel("显示属性"); GridBagConstraints gbc_label_21 = new GridBagConstraints(); gbc_label_21.insets = new Insets(0, 0, 5, 5); gbc_label_21.gridx = 2; gbc_label_21.gridy = 2; treePanel.add(label_21, gbc_label_21); tree_showAbsTxt = new JTextField(); tree_showAbsTxt.setColumns(10); GridBagConstraints gbc_tree_showAbsTxt = new GridBagConstraints(); gbc_tree_showAbsTxt.fill = GridBagConstraints.HORIZONTAL; gbc_tree_showAbsTxt.insets = new Insets(0, 0, 5, 0); gbc_tree_showAbsTxt.gridx = 3; gbc_tree_showAbsTxt.gridy = 2; treePanel.add(tree_showAbsTxt, gbc_tree_showAbsTxt); label_22 = new JLabel("分隔符"); GridBagConstraints gbc_label_22 = new GridBagConstraints(); gbc_label_22.insets = new Insets(0, 0, 5, 5); gbc_label_22.gridx = 0; gbc_label_22.gridy = 3; treePanel.add(label_22, gbc_label_22); tree_separatorTxt = new JTextField(); tree_separatorTxt.setColumns(10); GridBagConstraints gbc_tree_separatorTxt = new GridBagConstraints(); gbc_tree_separatorTxt.fill = GridBagConstraints.HORIZONTAL; gbc_tree_separatorTxt.insets = new Insets(0, 0, 5, 5); gbc_tree_separatorTxt.gridx = 1; gbc_tree_separatorTxt.gridy = 3; treePanel.add(tree_separatorTxt, gbc_tree_separatorTxt); label_23 = new JLabel("链接类型"); GridBagConstraints gbc_label_23 = new GridBagConstraints(); gbc_label_23.insets = new Insets(0, 0, 5, 5); gbc_label_23.gridx = 2; gbc_label_23.gridy = 3; treePanel.add(label_23, gbc_label_23); tree_linkTypeTxt = new JComboBox(); GridBagConstraints gbc_tree_linkTypeTxt = new GridBagConstraints(); gbc_tree_linkTypeTxt.fill = GridBagConstraints.HORIZONTAL; gbc_tree_linkTypeTxt.insets = new Insets(0, 0, 5, 0); gbc_tree_linkTypeTxt.gridx = 3; gbc_tree_linkTypeTxt.gridy = 3; treePanel.add(tree_linkTypeTxt, gbc_tree_linkTypeTxt); getContentPane().add(treePanel, BorderLayout.CENTER); label_24 = new JLabel("查询模板"); GridBagConstraints gbc_label_24 = new GridBagConstraints(); gbc_label_24.insets = new Insets(0, 0, 0, 5); gbc_label_24.gridx = 0; gbc_label_24.gridy = 4; treePanel.add(label_24, gbc_label_24); tree_templateIdCom = new JComboBox(); GridBagConstraints gbc_tree_templateIdCom = new GridBagConstraints(); gbc_tree_templateIdCom.insets = new Insets(0, 0, 0, 5); gbc_tree_templateIdCom.fill = GridBagConstraints.HORIZONTAL; gbc_tree_templateIdCom.gridx = 1; gbc_tree_templateIdCom.gridy = 4; treePanel.add(tree_templateIdCom, gbc_tree_templateIdCom); } private void setFormPanel() { GridBagLayout gbl_panel_2 = new GridBagLayout(); gbl_panel_2.columnWidths = new int[] { 0, 0, 0, 0, 0 }; gbl_panel_2.rowHeights = new int[] { 0, 0, 0 }; gbl_panel_2.columnWeights = new double[] { 0.0, 0.0, 0.0, 1.0, Double.MIN_VALUE }; gbl_panel_2.rowWeights = new double[] { 0.0, 0.0, Double.MIN_VALUE }; formPanel.setLayout(gbl_panel_2); label_12 = new JLabel("模板类型"); GridBagConstraints gbc_label_12 = new GridBagConstraints(); gbc_label_12.insets = new Insets(0, 0, 5, 5); gbc_label_12.gridx = 1; gbc_label_12.gridy = 0; formPanel.add(label_12, gbc_label_12); genralRdb = new JRadioButton("普通模板"); genralRdb.setSelected(true); GridBagConstraints gbc_genralRdb = new GridBagConstraints(); gbc_genralRdb.insets = new Insets(0, 0, 5, 0); gbc_genralRdb.gridx = 3; gbc_genralRdb.gridy = 0; formPanel.add(genralRdb, gbc_genralRdb); label_13 = new JLabel("搜索类型"); GridBagConstraints gbc_label_13 = new GridBagConstraints(); gbc_label_13.insets = new Insets(0, 0, 0, 5); gbc_label_13.gridx = 1; gbc_label_13.gridy = 1; formPanel.add(label_13, gbc_label_13); panel_6 = new JPanel(); GridBagConstraints gbc_panel_6 = new GridBagConstraints(); gbc_panel_6.anchor = GridBagConstraints.NORTH; gbc_panel_6.fill = GridBagConstraints.BOTH; gbc_panel_6.gridx = 3; gbc_panel_6.gridy = 1; formPanel.add(panel_6, gbc_panel_6); ButtonGroup bg = new ButtonGroup(); form_rootRdb = new JRadioButton("本对象属性"); panel_6.add(form_rootRdb); form_rootRdb.setSelected(true); form_relateRdb = new JRadioButton("关联对象"); panel_6.add(form_relateRdb); bg.add(form_rootRdb); bg.add(form_relateRdb); } private void setTreeTablePanel() { GridBagLayout gbl_treeTablePanel = new GridBagLayout(); gbl_treeTablePanel.columnWidths = new int[] { 0, 0, 0 }; gbl_treeTablePanel.rowHeights = new int[] { 0, 0, 0, 0, 0 }; gbl_treeTablePanel.columnWeights = new double[] { 0.0, 1.0, Double.MIN_VALUE }; gbl_treeTablePanel.rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE }; treeTablePanel.setLayout(gbl_treeTablePanel); lblNewLabel_1 = new JLabel("顶级节点显示类型"); GridBagConstraints gbc_lblNewLabel_1 = new GridBagConstraints(); gbc_lblNewLabel_1.anchor = GridBagConstraints.EAST; gbc_lblNewLabel_1.insets = new Insets(0, 0, 5, 5); gbc_lblNewLabel_1.gridx = 0; gbc_lblNewLabel_1.gridy = 0; treeTablePanel.add(lblNewLabel_1, gbc_lblNewLabel_1); tree_table_rootCom = new JComboBox(); GridBagConstraints gbc_tree_table_rootObjCom = new GridBagConstraints(); gbc_tree_table_rootObjCom.insets = new Insets(0, 0, 5, 0); gbc_tree_table_rootObjCom.fill = GridBagConstraints.HORIZONTAL; gbc_tree_table_rootObjCom.gridx = 1; gbc_tree_table_rootObjCom.gridy = 0; treeTablePanel.add(tree_table_rootCom, gbc_tree_table_rootObjCom); lblNewLabel_2 = new JLabel("选择模板"); GridBagConstraints gbc_lblNewLabel_2 = new GridBagConstraints(); gbc_lblNewLabel_2.insets = new Insets(0, 0, 5, 5); gbc_lblNewLabel_2.gridx = 0; gbc_lblNewLabel_2.gridy = 1; treeTablePanel.add(lblNewLabel_2, gbc_lblNewLabel_2); tree_table_rootSelectTem = new JComboBox(); GridBagConstraints gbc_tree_table_rootObjSelectCom = new GridBagConstraints(); gbc_tree_table_rootObjSelectCom.insets = new Insets(0, 0, 5, 0); gbc_tree_table_rootObjSelectCom.fill = GridBagConstraints.HORIZONTAL; gbc_tree_table_rootObjSelectCom.gridx = 1; gbc_tree_table_rootObjSelectCom.gridy = 1; treeTablePanel.add(tree_table_rootSelectTem, gbc_tree_table_rootObjSelectCom); label_4 = new JLabel("展开方式"); GridBagConstraints gbc_label_4 = new GridBagConstraints(); gbc_label_4.insets = new Insets(0, 0, 5, 5); gbc_label_4.gridx = 0; gbc_label_4.gridy = 2; treeTablePanel.add(label_4, gbc_label_4); panel_3 = new JPanel(); GridBagConstraints gbc_panel_3 = new GridBagConstraints(); gbc_panel_3.fill = GridBagConstraints.BOTH; gbc_panel_3.insets = new Insets(0, 0, 5, 0); gbc_panel_3.gridx = 1; gbc_panel_3.gridy = 2; treeTablePanel.add(panel_3, gbc_panel_3); ButtonGroup bg = new ButtonGroup(); graduallyRad = new JRadioButton("逐级展开"); graduallyRad.setSelected(true); panel_3.add(graduallyRad); allRad = new JRadioButton("全部展开"); panel_3.add(allRad); bg.add(graduallyRad); bg.add(allRad); label_5 = new JLabel("树形结构展开列"); GridBagConstraints gbc_label_5 = new GridBagConstraints(); gbc_label_5.insets = new Insets(0, 0, 0, 5); gbc_label_5.gridx = 0; gbc_label_5.gridy = 3; treeTablePanel.add(label_5, gbc_label_5); expandColsTxt = new JTextField(); expandColsTxt.setColumns(10); GridBagConstraints gbc_expandColsTxt = new GridBagConstraints(); gbc_expandColsTxt.fill = GridBagConstraints.HORIZONTAL; gbc_expandColsTxt.gridx = 1; gbc_expandColsTxt.gridy = 3; treeTablePanel.add(expandColsTxt, gbc_expandColsTxt); } private void setRelatePanel() { gernalDynamicPal.setLayout(new BorderLayout(0, 0)); relatetPal = new JPanel(); GridBagLayout gridBagLayout = new GridBagLayout(); gridBagLayout.columnWidths = new int[] { 0, 72, 0, 0 }; gridBagLayout.rowHeights = new int[] { 0, 0, 0, 0 }; gridBagLayout.columnWeights = new double[] { 0.0, 0.0, 1.0, Double.MIN_VALUE }; gridBagLayout.rowWeights = new double[] { 0.0, 0.0, 0.0, Double.MIN_VALUE }; relatetPal.setLayout(gridBagLayout); JLabel label = new JLabel("目标对象"); GridBagConstraints gbc_label = new GridBagConstraints(); gbc_label.insets = new Insets(0, 0, 5, 5); gbc_label.gridx = 1; gbc_label.gridy = 0; relatetPal.add(label, gbc_label); relatCom = new JComboBox(); GridBagConstraints gbc_comboBox = new GridBagConstraints(); gbc_comboBox.insets = new Insets(0, 0, 5, 0); gbc_comboBox.fill = GridBagConstraints.HORIZONTAL; gbc_comboBox.gridx = 2; gbc_comboBox.gridy = 0; relatetPal.add(relatCom, gbc_comboBox); JLabel lblLinktype = new JLabel("LinkType"); GridBagConstraints gbc_lblLinktype = new GridBagConstraints(); gbc_lblLinktype.insets = new Insets(0, 0, 5, 5); gbc_lblLinktype.gridx = 1; gbc_lblLinktype.gridy = 1; relatetPal.add(lblLinktype, gbc_lblLinktype); relateLtCom = new JComboBox(); GridBagConstraints gbc_comboBox_2 = new GridBagConstraints(); gbc_comboBox_2.insets = new Insets(0, 0, 5, 0); gbc_comboBox_2.fill = GridBagConstraints.HORIZONTAL; gbc_comboBox_2.gridx = 2; gbc_comboBox_2.gridy = 1; relatetPal.add(relateLtCom, gbc_comboBox_2); JLabel label_1 = new JLabel("选择模板"); GridBagConstraints gbc_label_1 = new GridBagConstraints(); gbc_label_1.insets = new Insets(0, 0, 0, 5); gbc_label_1.gridx = 1; gbc_label_1.gridy = 2; relatetPal.add(label_1, gbc_label_1); relateSelectTem = new JComboBox(); GridBagConstraints gbc_comboBox_1 = new GridBagConstraints(); gbc_comboBox_1.fill = GridBagConstraints.HORIZONTAL; gbc_comboBox_1.gridx = 2; gbc_comboBox_1.gridy = 2; relatetPal.add(relateSelectTem, gbc_comboBox_1); } private void setFormRelatePanel() { form_relatetPal = new JPanel(); GridBagLayout gridBagLayout = new GridBagLayout(); gridBagLayout.columnWidths = new int[] { 0, 72, 0, 0 }; gridBagLayout.rowHeights = new int[] { 0, 0, 0, 0 }; gridBagLayout.columnWeights = new double[] { 0.0, 0.0, 1.0, Double.MIN_VALUE }; gridBagLayout.rowWeights = new double[] { 0.0, 0.0, 0.0, Double.MIN_VALUE }; form_relatetPal.setLayout(gridBagLayout); JLabel label = new JLabel("目标对象"); GridBagConstraints gbc_label = new GridBagConstraints(); gbc_label.insets = new Insets(0, 0, 5, 5); gbc_label.gridx = 1; gbc_label.gridy = 0; form_relatetPal.add(label, gbc_label); form_relatCom = new JComboBox(); GridBagConstraints gbc_comboBox = new GridBagConstraints(); gbc_comboBox.insets = new Insets(0, 0, 5, 0); gbc_comboBox.fill = GridBagConstraints.HORIZONTAL; gbc_comboBox.gridx = 2; gbc_comboBox.gridy = 0; form_relatetPal.add(form_relatCom, gbc_comboBox); JLabel lblLinktype = new JLabel("LinkType"); GridBagConstraints gbc_lblLinktype = new GridBagConstraints(); gbc_lblLinktype.insets = new Insets(0, 0, 5, 5); gbc_lblLinktype.gridx = 1; gbc_lblLinktype.gridy = 1; form_relatetPal.add(lblLinktype, gbc_lblLinktype); form_relateLtCom = new JComboBox(); GridBagConstraints gbc_comboBox_2 = new GridBagConstraints(); gbc_comboBox_2.insets = new Insets(0, 0, 5, 0); gbc_comboBox_2.fill = GridBagConstraints.HORIZONTAL; gbc_comboBox_2.gridx = 2; gbc_comboBox_2.gridy = 1; form_relatetPal.add(form_relateLtCom, gbc_comboBox_2); JLabel label_1 = new JLabel("选择模板"); GridBagConstraints gbc_label_1 = new GridBagConstraints(); gbc_label_1.insets = new Insets(0, 0, 0, 5); gbc_label_1.gridx = 1; gbc_label_1.gridy = 2; form_relatetPal.add(label_1, gbc_label_1); form_relateSelectTem = new JComboBox(); GridBagConstraints gbc_comboBox_1 = new GridBagConstraints(); gbc_comboBox_1.fill = GridBagConstraints.HORIZONTAL; gbc_comboBox_1.gridx = 2; gbc_comboBox_1.gridy = 2; form_relatetPal.add(form_relateSelectTem, gbc_comboBox_1); } private void setrootObjectPanel() { gernalDynamicPal.setLayout(new BorderLayout(0, 0)); tableObjectPal = new JPanel(); GridBagLayout gbl_tableObjectPal = new GridBagLayout(); gbl_tableObjectPal.columnWidths = new int[] { 0, 72, 0, 0 }; gbl_tableObjectPal.rowHeights = new int[] { 0, 0, 0 }; gbl_tableObjectPal.columnWeights = new double[] { 0.0, 0.0, 1.0, Double.MIN_VALUE }; gbl_tableObjectPal.rowWeights = new double[] { 0.0, 0.0, Double.MIN_VALUE }; tableObjectPal.setLayout(gbl_tableObjectPal); JLabel label = new JLabel("源对象"); GridBagConstraints gbc_label = new GridBagConstraints(); gbc_label.insets = new Insets(0, 0, 5, 5); gbc_label.gridx = 1; gbc_label.gridy = 0; tableObjectPal.add(label, gbc_label); rootCom = new JComboBox(); GridBagConstraints gbc_comboBox = new GridBagConstraints(); gbc_comboBox.insets = new Insets(0, 0, 5, 0); gbc_comboBox.fill = GridBagConstraints.HORIZONTAL; gbc_comboBox.gridx = 2; gbc_comboBox.gridy = 0; tableObjectPal.add(rootCom, gbc_comboBox); JLabel label_1 = new JLabel("选择模板"); GridBagConstraints gbc_label_1 = new GridBagConstraints(); gbc_label_1.insets = new Insets(0, 0, 0, 5); gbc_label_1.gridx = 1; gbc_label_1.gridy = 1; tableObjectPal.add(label_1, gbc_label_1); rootSelectTem = new JComboBox(); GridBagConstraints gbc_comboBox_1 = new GridBagConstraints(); gbc_comboBox_1.fill = GridBagConstraints.HORIZONTAL; gbc_comboBox_1.gridx = 2; gbc_comboBox_1.gridy = 1; tableObjectPal.add(rootSelectTem, gbc_comboBox_1); } private void setCustomPanel() { custermPanel = new JPanel(); GridBagLayout gbl_custermPanel = new GridBagLayout(); gbl_custermPanel.columnWidths = new int[] { 91, 66, 0 }; gbl_custermPanel.rowHeights = new int[] { 21, 0 }; gbl_custermPanel.columnWeights = new double[] { 0.0, 1.0, Double.MIN_VALUE }; gbl_custermPanel.rowWeights = new double[] { 0.0, Double.MIN_VALUE }; custermPanel.setLayout(gbl_custermPanel); JLabel lblNewLabel = new JLabel("控制路径"); GridBagConstraints gbc_lblNewLabel = new GridBagConstraints(); gbc_lblNewLabel.insets = new Insets(0, 0, 0, 5); gbc_lblNewLabel.gridx = 0; gbc_lblNewLabel.gridy = 0; custermPanel.add(lblNewLabel, gbc_lblNewLabel); controlpath = new JTextField(); GridBagConstraints gbc_controlpath = new GridBagConstraints(); gbc_controlpath.fill = GridBagConstraints.HORIZONTAL; gbc_controlpath.anchor = GridBagConstraints.NORTH; gbc_controlpath.gridx = 1; gbc_controlpath.gridy = 0; custermPanel.add(controlpath, gbc_controlpath); controlpath.setColumns(10); } private void setgernaralPanel() { tableGernaralPanel = new JPanel(); GridBagLayout gbl_tableGernaralPanel = new GridBagLayout(); gbl_tableGernaralPanel.columnWidths = new int[] { 15, 95, 66, 0, 0, 0 }; gbl_tableGernaralPanel.rowHeights = new int[] { 21, 0 }; gbl_tableGernaralPanel.columnWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE }; gbl_tableGernaralPanel.rowWeights = new double[] { 0.0, Double.MIN_VALUE }; tableGernaralPanel.setLayout(gbl_tableGernaralPanel); JLabel label = new JLabel("搜索类型"); GridBagConstraints gbc_label = new GridBagConstraints(); gbc_label.insets = new Insets(0, 0, 0, 5); gbc_label.gridx = 1; gbc_label.gridy = 0; tableGernaralPanel.add(label, gbc_label); rootObjectRdb = new JRadioButton("本对象属性"); rootObjectRdb.setSelected(true); GridBagConstraints gbc_rdbtnNewRadioButton = new GridBagConstraints(); gbc_rdbtnNewRadioButton.insets = new Insets(0, 0, 0, 5); gbc_rdbtnNewRadioButton.gridx = 2; gbc_rdbtnNewRadioButton.gridy = 0; tableGernaralPanel.add(rootObjectRdb, gbc_rdbtnNewRadioButton); bg1.add(rootObjectRdb); relateRdb = new JRadioButton("关联对象"); GridBagConstraints gbc_rdbtnNewRadioButton_1 = new GridBagConstraints(); gbc_rdbtnNewRadioButton_1.insets = new Insets(0, 0, 0, 5); gbc_rdbtnNewRadioButton_1.gridx = 3; gbc_rdbtnNewRadioButton_1.gridy = 0; tableGernaralPanel.add(relateRdb, gbc_rdbtnNewRadioButton_1); bg1.add(relateRdb); PFKRdb = new JRadioButton("主外键对象"); GridBagConstraints gbc_rdbtnNewRadioButton_2 = new GridBagConstraints(); gbc_rdbtnNewRadioButton_2.gridx = 4; gbc_rdbtnNewRadioButton_2.gridy = 0; // generalPanel.add(PFKRdb, gbc_rdbtnNewRadioButton_2); // bg1.add(PFKRdb); } private void setTree_table_gernaralPanel() { tree_tableGernaralPanel = new JPanel(); GridBagLayout gbl_tablePanel = new GridBagLayout(); gbl_tablePanel.columnWidths = new int[] { 15, 95, 66, 0, 0, 0 }; gbl_tablePanel.rowHeights = new int[] { 21, 0 }; gbl_tablePanel.columnWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE }; gbl_tablePanel.rowWeights = new double[] { 0.0, Double.MIN_VALUE }; tree_tableGernaralPanel.setLayout(gbl_tablePanel); JLabel label = new JLabel("搜索类型"); GridBagConstraints gbc_label = new GridBagConstraints(); gbc_label.insets = new Insets(0, 0, 0, 5); gbc_label.gridx = 1; gbc_label.gridy = 0; tree_tableGernaralPanel.add(label, gbc_label); tree_table_bg1 = new ButtonGroup(); tree_table_rootObjectRdb = new JRadioButton("本对象属性"); tree_table_rootObjectRdb.setSelected(true); GridBagConstraints gbc_rdbtnNewRadioButton = new GridBagConstraints(); gbc_rdbtnNewRadioButton.insets = new Insets(0, 0, 0, 5); gbc_rdbtnNewRadioButton.gridx = 2; gbc_rdbtnNewRadioButton.gridy = 0; tree_tableGernaralPanel.add(tree_table_rootObjectRdb, gbc_rdbtnNewRadioButton); tree_table_bg1.add(tree_table_rootObjectRdb); tree_table_relateRdb = new JRadioButton("关联对象"); GridBagConstraints gbc_rdbtnNewRadioButton_1 = new GridBagConstraints(); gbc_rdbtnNewRadioButton_1.insets = new Insets(0, 0, 0, 5); gbc_rdbtnNewRadioButton_1.gridx = 3; gbc_rdbtnNewRadioButton_1.gridy = 0; tree_tableGernaralPanel.add(tree_table_relateRdb, gbc_rdbtnNewRadioButton_1); tree_table_bg1.add(tree_table_relateRdb); PFKRdb = new JRadioButton("主外键对象"); GridBagConstraints gbc_rdbtnNewRadioButton_2 = new GridBagConstraints(); gbc_rdbtnNewRadioButton_2.gridx = 4; gbc_rdbtnNewRadioButton_2.gridy = 0; // generalPanel.add(PFKRdb, gbc_rdbtnNewRadioButton_2); // bg1.add(PFKRdb); } private void actionListener() { tree_showTypeTxt.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent arg0) { fillQtNameCom(); } }); tree_linkTypeTxt.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent arg0) { fillQtNameCom(); } }); rootObjCom.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent arg0) { rootObjSelectCom.removeAllItems(); String selectedItem = (String) rootObjCom.getSelectedItem(); PortalVI[] portalViInfos; try { portalViInfos = UITools.getService() .getPortalVIArrayByTypeName(selectedItem); for (int i = 0; i < portalViInfos.length; i++) { if (portalViInfos[i].viType == 1) { rootObjSelectCom.addItem(portalViInfos[i].viName); } } } catch (VCIError e) { e.printStackTrace(); } rootObjSelectCom.updateUI(); } }); tree_table_rootCom.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent arg0) { tree_table_rootSelectTem.removeAllItems(); String selectedItem = (String) tree_table_rootCom.getSelectedItem(); PortalVI[] portalViInfos; try { portalViInfos = UITools.getService() .getPortalVIArrayByTypeName(selectedItem); for (int i = 0; i < portalViInfos.length; i++) { if (portalViInfos[i].viType == 1) { tree_table_rootSelectTem.addItem(portalViInfos[i].viName); } } } catch (VCIError e) { e.printStackTrace(); } tree_table_rootSelectTem.updateUI(); } }); okButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { if(checkEdit()){ return; } if (pldefination != null) { edit(); } else { save(); } VCIOptionPane.showMessage(LogonApplication.frame, "保存成功!"); dispose(); } private void edit() { PLPageDefination plPageDefination = new PLPageDefination(); plPageDefination.plOId = plPageDefinationID; plPageDefination.plTabPageOId = pltabpage.plOId; plPageDefination.name = nameTxt.getText(); plPageDefination.seq = Short.valueOf(seqTxt.getText()); plPageDefination.desc = descTxt.getText(); plPageDefination.plType = disType; PLDefination obj = pldefinationObject(); try { plPageDefination.plDefination = UITools .getPLDefinationText(obj); boolean flag = UITools.getService().updatePLPageDefination( plPageDefination); } catch (Throwable e) { e.printStackTrace(); } } private void save() { PLPageDefination plPageDefination = new PLPageDefination(); plPageDefination.plOId = ObjectUtility.getNewObjectID36(); plPageDefination.plTabPageOId = pltabpage.plOId; plPageDefination.name = nameTxt.getText(); plPageDefination.seq = Short.valueOf(seqTxt.getText()); plPageDefination.desc = descTxt.getText(); plPageDefination.plType = disType; PLDefination obj = pldefinationObject(); try { plPageDefination.plDefination = UITools .getPLDefinationText(obj); boolean flag = UITools.getService().savePLPageDefination( plPageDefination); } catch (Throwable e) { e.printStackTrace(); } } private PLDefination pldefinationObject() { PLDefination obj = new PLDefination(); if (tableRadio.isSelected()) { obj.setTemplateType("1"); if (rootObjectRdb.isSelected()) { obj.setSearchTarger("1"); obj.setShowType(String.valueOf(rootCom .getSelectedItem())); obj.setTemplateId(String.valueOf(rootSelectTem .getSelectedItem())); } if (relateRdb.isSelected()) { obj.setSearchTarger("2"); obj.setShowType(String.valueOf(relatCom .getSelectedItem())); obj.setLinkType(String.valueOf(relateLtCom .getSelectedItem())); obj.setTemplateId(String.valueOf(relateSelectTem .getSelectedItem())); } } if (customRadio.isSelected()) { obj.setTemplateType("2"); obj.setControlPath(controlpath.getText()); } if (navigatorfold.isSelected()) { obj.setNavigatorType("3"); } if (navigatorrole.isSelected()) { obj.setNavigatorType("2"); } if (navigatornodisply.isSelected()) { obj.setNavigatorType("1"); } if (rdbtnTreeTable.isSelected()) { obj.setTemplateType("3"); if (tree_table_rootObjectRdb.isSelected()) { obj.setSearchTarger("1"); obj.setShowType(String.valueOf(tree_table_rootCom .getSelectedItem())); obj.setTemplateId(String.valueOf(tree_table_rootSelectTem .getSelectedItem())); // 逐级展开:1、全部展开:0 if (graduallyRad.isSelected()) { obj.setExpandMode("1"); } if (allRad.isSelected()) { obj.setExpandMode("0"); } obj.setExpandCols(expandColsTxt.getText()); } if (tree_table_relateRdb.isSelected()) { obj.setSearchTarger("2"); obj.setShowType(String.valueOf(tree_table_relatCom .getSelectedItem())); obj.setLinkType(String.valueOf(tree_table_relateLtCom .getSelectedItem())); obj.setTemplateId(String.valueOf(tree_table_relateSelectTem .getSelectedItem())); // 逐级展开:1、全部展开:0 if (tree_table_R_graduallyRad.isSelected()) { obj.setExpandMode("1"); } if (tree_table_R_allRad.isSelected()) { obj.setExpandMode("0"); } obj.setExpandCols(tree_table_R_expandColsTxt.getText()); } } if (rdbtnForm.isSelected()) { if (genralRdb.isSelected()) { obj.setTemplateType("4"); if (form_rootRdb.isSelected()) { obj.setSearchTarger("1"); obj.setShowType(String.valueOf(rootObjCom .getSelectedItem())); obj.setTemplateId(String.valueOf(rootObjSelectCom .getSelectedItem())); } if (form_relateRdb.isSelected()) { obj.setSearchTarger("2"); obj.setShowType(String.valueOf(form_relatCom .getSelectedItem())); obj.setLinkType(String.valueOf(form_relateLtCom .getSelectedItem())); obj.setTemplateId(String.valueOf(form_relateSelectTem .getSelectedItem())); } } } if (rdbtnTree.isSelected()) { obj.setTemplateType("5"); obj.setShowType(tree_showTypeTxt.getSelectedItem().toString()); if (tree_zhengRad.isSelected()) { obj.setOrientation(QTConstants.DIRECTION_POSITIVE); } if (tree_fanRad.isSelected()) { obj.setOrientation(QTConstants.DIRECTION_OPPOSITE); } obj.setShowAbs(tree_showAbsTxt.getText()); obj.setSeparator(tree_separatorTxt.getText()); // 逐级展开:1、全部展开:0 if (graduallyRad.isSelected()) { obj.setExpandMode("1"); } if (allRad.isSelected()) { obj.setExpandMode("0"); } obj.setLinkType(tree_linkTypeTxt.getSelectedItem().toString()); obj.setValidity(getValidityKey(String.valueOf(tree_validityTxt.getSelectedItem()))); obj.setShowLinkAbs(tree_showLinkAbsTxt.getText()); if (tree_isShowImage.isSelected()) { obj.setIsShowImage("1"); } else { obj.setIsShowImage("0"); } obj.setTemplateId(String.valueOf(tree_templateIdCom.getSelectedItem())); } DefaultListModel listModel = cp.getListModel(); int size = listModel.getSize(); List keyList = new ArrayList(); Map keyMap = new HashMap(); for(int i=0;i es : keyMap.entrySet()){ String key = es.getKey(); String value = es.getValue(); eventKey += key+","; eventValue += value+","; } if(eventKey!=null&&!"".equals(eventKey)){ obj.setEventKey(eventKey.substring(0,eventKey.length()-1)); obj.setEventValue(eventValue.substring(0,eventValue.length()-1)); }else{ obj.setEventKey(""); obj.setEventValue(""); } return obj; } private void fetchEventValue(DefaultListModel listModel, int size, List keyList,Map keyMap) { for(int j=0;j validityMap; private JLabel lblNewLabel_1; private JComboBox tree_table_rootCom; private JLabel lblNewLabel_2; private JComboBox tree_table_rootSelectTem; private JPanel tree_table_RelatePal; private JLabel label_3; private JComboBox tree_table_relatCom; private JLabel label_6; private JComboBox tree_table_relateSelectTem; private JLabel label_7; private JPanel panel_2; private JRadioButton tree_table_R_graduallyRad; private JRadioButton tree_table_R_allRad; private JLabel label_8; private JTextField tree_table_R_expandColsTxt; private JLabel lblNewLabel_3; private JComboBox tree_table_relateLtCom; private JPanel panel_6; private JRadioButton form_relateRdb; private JPanel form_rootPal; private JLabel label_24; private JComboBox tree_templateIdCom; private JPanel panel_7; private void intiValidity(){ tree_validityTxt.addItem(""); validityMap = (Map)new LinkedHashMap(); validityMap.put("1", "当前版本当前版次"); validityMap.put("2", "当前版本最新版次"); validityMap.put("3", "最新版本最新版次"); for(Map.Entry entry: validityMap.entrySet()){ tree_validityTxt.addItem(entry.getValue()); } } private String getValidityKey(String value){ for(Map.Entry entry: validityMap.entrySet()){ if(value!=null&&!"".equals(value)){ if(value.equals(entry.getValue())){ return entry.getKey(); } } } return ""; } private void fillQtNameCom(){ String showtypeStr = (String) tree_showTypeTxt.getSelectedItem(); String linkTypeStr = (String) tree_linkTypeTxt.getSelectedItem(); String showtypebtmName = ""; String linkTypebtmName = ""; boolean linktypeFlage = false; if(linkTypeStr!=null&&!"".equals(linkTypeStr)){ linktypeFlage = true; } try { BtmItem[] allBtItems = BtmProvider.getInstance().getAllBtmItems(); for(BtmItem btItem : allBtItems){ if(showtypeStr.equals(btItem.name)){ showtypebtmName = showtypeStr; } } LinkType[] linkTypes = LinkTypeProvider.getInstance().getLinkTypes(); for(LinkType linkType:linkTypes){ if(linkTypeStr.equals(linkType.name)){ linkTypebtmName = linkTypeStr; } } tree_templateIdCom.removeAllItems(); if(linktypeFlage){ QTInfo[] qts = ServiceProvider.getOMDService().getQTDService().getObjTypeQTs(linkTypebtmName); for(QTInfo qt : qts){ tree_templateIdCom.addItem(qt.qtName); } }else{ QTInfo[] qts = ServiceProvider.getOMDService().getQTDService().getObjTypeQTs(showtypebtmName); for(QTInfo qt : qts){ tree_templateIdCom.addItem(qt.qtName); } } } catch (Exception e1) { e1.printStackTrace(); } catch (Throwable e1) { e1.printStackTrace(); } } }