|
|
@ -64,7 +64,7 @@ public class TreeTableDataDictPane extends BasicPane implements Previewable { |
|
|
|
tableFlowPane.add(tableDataNameComboBox); |
|
|
|
tableFlowPane.add(tableDataNameComboBox); |
|
|
|
tableDataNameComboBox.addItemListener(new ItemListener() { |
|
|
|
tableDataNameComboBox.addItemListener(new ItemListener() { |
|
|
|
public void itemStateChanged(ItemEvent e) { |
|
|
|
public void itemStateChanged(ItemEvent e) { |
|
|
|
tdChange(); |
|
|
|
tdChange(true); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
tableFlowPane.add(new PreviewLabel(this)); |
|
|
|
tableFlowPane.add(new PreviewLabel(this)); |
|
|
@ -73,19 +73,21 @@ public class TreeTableDataDictPane extends BasicPane implements Previewable { |
|
|
|
this.add(centerPane, BorderLayout.CENTER); |
|
|
|
this.add(centerPane, BorderLayout.CENTER); |
|
|
|
parentMarkRadio = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Build_Tree_Accord_Parent_Marked_Filed"), true); |
|
|
|
parentMarkRadio = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Build_Tree_Accord_Parent_Marked_Filed"), true); |
|
|
|
lengthMarkRadio = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Build_Tree_Accord_Marked_Filed_Length")); |
|
|
|
lengthMarkRadio = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Build_Tree_Accord_Marked_Filed_Length")); |
|
|
|
parentMarkRadio.addActionListener(new ActionListener() { |
|
|
|
parentMarkRadio.addItemListener(new ItemListener() { |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
@Override |
|
|
|
|
|
|
|
public void itemStateChanged(ItemEvent e) { |
|
|
|
if (isBuildByParentFiled()) { |
|
|
|
if (isBuildByParentFiled()) { |
|
|
|
makeParentEnable(); |
|
|
|
makeParentEnable(); |
|
|
|
tdChange(); |
|
|
|
tdChange(false); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
lengthMarkRadio.addActionListener(new ActionListener() { |
|
|
|
lengthMarkRadio.addItemListener(new ItemListener() { |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
@Override |
|
|
|
|
|
|
|
public void itemStateChanged(ItemEvent e) { |
|
|
|
if (!isBuildByParentFiled()) { |
|
|
|
if (!isBuildByParentFiled()) { |
|
|
|
makeLengthEnable(); |
|
|
|
makeLengthEnable(); |
|
|
|
tdChange(); |
|
|
|
tdChange(false); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
@ -169,7 +171,7 @@ public class TreeTableDataDictPane extends BasicPane implements Previewable { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void tdChange() { |
|
|
|
private void tdChange(boolean isRefreshComboBoxItems) { |
|
|
|
TableDataWrapper tableDataWrappe = this.tableDataNameComboBox.getSelectedItem(); |
|
|
|
TableDataWrapper tableDataWrappe = this.tableDataNameComboBox.getSelectedItem(); |
|
|
|
if (tableDataWrappe == null) { |
|
|
|
if (tableDataWrappe == null) { |
|
|
|
return; |
|
|
|
return; |
|
|
@ -186,8 +188,10 @@ public class TreeTableDataDictPane extends BasicPane implements Previewable { |
|
|
|
String[] columnNames = new String[len]; |
|
|
|
String[] columnNames = new String[len]; |
|
|
|
namelist.toArray(columnNames); |
|
|
|
namelist.toArray(columnNames); |
|
|
|
for (int i = 0; i < valueEditorPanes.length; i++) { |
|
|
|
for (int i = 0; i < valueEditorPanes.length; i++) { |
|
|
|
|
|
|
|
if (isRefreshComboBoxItems || isNoSelectedColumnName(valueEditorPanes[i])) { |
|
|
|
valueEditorPanes[i].setEditors(new Editor[]{new ColumnNameEditor(columnNames), new ColumnIndexEditor(len)}, columnNames[0]); |
|
|
|
valueEditorPanes[i].setEditors(new Editor[]{new ColumnNameEditor(columnNames), new ColumnIndexEditor(len)}, columnNames[0]); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
for (int i = 0; i < valueEditorPanes.length; i++) { |
|
|
|
for (int i = 0; i < valueEditorPanes.length; i++) { |
|
|
|
valueEditorPanes[i].setEditors(new Editor[]{new ColumnNameEditor(), new ColumnIndexEditor()}, 1); |
|
|
|
valueEditorPanes[i].setEditors(new Editor[]{new ColumnNameEditor(), new ColumnIndexEditor()}, 1); |
|
|
@ -197,6 +201,11 @@ public class TreeTableDataDictPane extends BasicPane implements Previewable { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private boolean isNoSelectedColumnName(ValueEditorPane valueEditorPane) { |
|
|
|
|
|
|
|
ColumnNameEditor columnNameEditor = (ColumnNameEditor) valueEditorPane.getCards()[0]; |
|
|
|
|
|
|
|
return StringUtils.isEmpty(columnNameEditor.getColumnName()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected String title4PopupWindow() { |
|
|
|
protected String title4PopupWindow() { |
|
|
|
return "TreeTableDataDictionay"; |
|
|
|
return "TreeTableDataDictionay"; |
|
|
|