|
|
@ -457,6 +457,9 @@ public class CreateTempDrawingDialog extends JFrame implements ActionListener{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
MessageBox.post("对象【"+item_id+"】创建完成!" , "提示", MessageBox.INFORMATION);
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
MessageBox.post("对象【"+item_id+"】创建失败!" , "提示", MessageBox.ERROR);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -538,9 +541,11 @@ public class CreateTempDrawingDialog extends JFrame implements ActionListener{
|
|
|
|
finalPropValue = tValueString;
|
|
|
|
finalPropValue = tValueString;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (finalPropValue != null) {
|
|
|
|
|
|
|
|
System.out.println("设置表单属性["+tNameString+"]="+finalPropValue);
|
|
|
|
|
|
|
|
setTCPropertyValue(form,tNameString,finalPropValue);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
System.out.println("设置表单属性["+tNameString+"]="+finalPropValue);
|
|
|
|
|
|
|
|
setTCPropertyValue(form,tNameString,finalPropValue);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
System.out.println("表单属性赋值完成!");
|
|
|
|
System.out.println("表单属性赋值完成!");
|
|
|
@ -577,6 +582,9 @@ public class CreateTempDrawingDialog extends JFrame implements ActionListener{
|
|
|
|
* @throws
|
|
|
|
* @throws
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public static void setTCPropertyValue(TCComponent item, String propertyName, Object value) {
|
|
|
|
public static void setTCPropertyValue(TCComponent item, String propertyName, Object value) {
|
|
|
|
|
|
|
|
if (item == null || propertyName == null || value == null) {
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
String type2 = item.getType();
|
|
|
|
String type2 = item.getType();
|
|
|
|
TCProperty tcProperty = item.getTCProperty(propertyName);
|
|
|
|
TCProperty tcProperty = item.getTCProperty(propertyName);
|
|
|
@ -828,7 +836,18 @@ public class CreateTempDrawingDialog extends JFrame implements ActionListener{
|
|
|
|
this.setSize(400, 500);
|
|
|
|
this.setSize(400, 500);
|
|
|
|
this.setLayout(new BorderLayout());
|
|
|
|
this.setLayout(new BorderLayout());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 创建滚动面板
|
|
|
|
|
|
|
|
JScrollPane scrollPane = new JScrollPane();
|
|
|
|
|
|
|
|
scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); // 垂直滚动条始终显示
|
|
|
|
|
|
|
|
scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); // 禁用水平滚动条
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JPanel centerPanel1 = new JPanel(new GridBagLayout());
|
|
|
|
JPanel centerPanel1 = new JPanel(new GridBagLayout());
|
|
|
|
|
|
|
|
// 设置内容面板的最小高度(确保滚动条生效)
|
|
|
|
|
|
|
|
centerPanel1.setMinimumSize(new Dimension(380, 800)); // 根据实际内容调整高度
|
|
|
|
|
|
|
|
scrollPane.setViewportView(centerPanel1); // 将内容面板放入滚动面板
|
|
|
|
|
|
|
|
|
|
|
|
JPanel buttomPanel1 = new JPanel(new FlowLayout());
|
|
|
|
JPanel buttomPanel1 = new JPanel(new FlowLayout());
|
|
|
|
|
|
|
|
|
|
|
|
//1.属性条目区域
|
|
|
|
//1.属性条目区域
|
|
|
@ -1071,7 +1090,8 @@ public class CreateTempDrawingDialog extends JFrame implements ActionListener{
|
|
|
|
this.closeButton.addActionListener(this);
|
|
|
|
this.closeButton.addActionListener(this);
|
|
|
|
this.buildButton.addActionListener(this);
|
|
|
|
this.buildButton.addActionListener(this);
|
|
|
|
|
|
|
|
|
|
|
|
frame.add(centerPanel1, BorderLayout.CENTER);
|
|
|
|
// 将滚动面板添加到框架中央
|
|
|
|
|
|
|
|
frame.add(scrollPane, BorderLayout.CENTER);
|
|
|
|
frame.add(buttomPanel1, BorderLayout.SOUTH);
|
|
|
|
frame.add(buttomPanel1, BorderLayout.SOUTH);
|
|
|
|
|
|
|
|
|
|
|
|
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
|
|
|
|
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
|
|
|
|