|
|
|
@ -324,7 +324,7 @@ public class CreateTempDrawingDialog extends JFrame implements ActionListener{
|
|
|
|
|
// System.out.println("已有属性条目-组件数量="+this.propComponentMap.size());
|
|
|
|
|
for (Map.Entry<String, JComponent> entry : this.propComponentMap.entrySet()) {
|
|
|
|
|
String key = entry.getKey();//编辑的属性条目名称
|
|
|
|
|
String value = getComponentValue(entry.getValue());//根据组件获取选中、输入的值
|
|
|
|
|
String value = getComponentValue(key,entry.getValue());//根据组件获取选中、输入的值
|
|
|
|
|
int tag = 0;
|
|
|
|
|
//遍历首选项配置,获取属性真实值和位置、类型等信息
|
|
|
|
|
for (String prop : preferencePropList){
|
|
|
|
@ -744,17 +744,28 @@ public class CreateTempDrawingDialog extends JFrame implements ActionListener{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @根据不同类型的组件获取组件的值
|
|
|
|
|
* @param component
|
|
|
|
|
*
|
|
|
|
|
* 根据不同类型的组件获取组件的值
|
|
|
|
|
* @param propShowName 属性条目在看板上展示的名称
|
|
|
|
|
* @param component 看板上属性条目对应的组件
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public String getComponentValue(JComponent component) {
|
|
|
|
|
public String getComponentValue(String propShowName, JComponent component) {
|
|
|
|
|
System.out.println("开始根据不同类型的组件取值");
|
|
|
|
|
if (component instanceof JTextField) {
|
|
|
|
|
System.out.println("JTextField");
|
|
|
|
|
return ((JTextField) component).getText();
|
|
|
|
|
} else if (component instanceof JComboBox) {
|
|
|
|
|
// String returnValue = null;
|
|
|
|
|
//通过显示名称判断该属性是否是lov
|
|
|
|
|
String lovType = null;
|
|
|
|
|
for (LovProperty lovProperty : this.lovPropertyList) {
|
|
|
|
|
if (lovProperty.getPropName().equals(propShowName)) {
|
|
|
|
|
lovType = lovProperty.getlovType();
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
System.out.println("属性"+propShowName+"的lovtype="+(lovType == null ? "非lov属性" : lovType));
|
|
|
|
|
String chooseDisplay= null;
|
|
|
|
|
if (component instanceof JTreeComboBox){
|
|
|
|
|
System.out.println("JTreeComboBox");
|
|
|
|
@ -886,7 +897,7 @@ public class CreateTempDrawingDialog extends JFrame implements ActionListener{
|
|
|
|
|
for(String propInfo : this.preferencePropList){//propInfo格式为:*名称=Item.object_name=string
|
|
|
|
|
System.out.println("开始处理首选项配置的属性信息:"+propInfo);
|
|
|
|
|
String[] propConfigInfoArray= propInfo.split("=");
|
|
|
|
|
String validPropName = null;
|
|
|
|
|
String validPropName = null;//属性条目(除去符号*后)的有效值
|
|
|
|
|
if (propConfigInfoArray.length >= 3){
|
|
|
|
|
String name = propConfigInfoArray[0];//“图纸类型”
|
|
|
|
|
System.out.println("开始获取首选项配置属性["+name+"]的信息");
|
|
|
|
|