|
|
|
@ -64,7 +64,7 @@ public class TreeTableDataDictPane extends BasicPane implements Previewable {
|
|
|
|
|
tableFlowPane.add(tableDataNameComboBox); |
|
|
|
|
tableDataNameComboBox.addItemListener(new ItemListener() { |
|
|
|
|
public void itemStateChanged(ItemEvent e) { |
|
|
|
|
tdChange(); |
|
|
|
|
tdChange(true); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
tableFlowPane.add(new PreviewLabel(this)); |
|
|
|
@ -73,19 +73,21 @@ public class TreeTableDataDictPane extends BasicPane implements Previewable {
|
|
|
|
|
this.add(centerPane, BorderLayout.CENTER); |
|
|
|
|
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")); |
|
|
|
|
parentMarkRadio.addActionListener(new ActionListener() { |
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
parentMarkRadio.addItemListener(new ItemListener() { |
|
|
|
|
@Override |
|
|
|
|
public void itemStateChanged(ItemEvent e) { |
|
|
|
|
if (isBuildByParentFiled()) { |
|
|
|
|
makeParentEnable(); |
|
|
|
|
tdChange(); |
|
|
|
|
tdChange(false); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
lengthMarkRadio.addActionListener(new ActionListener() { |
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
lengthMarkRadio.addItemListener(new ItemListener() { |
|
|
|
|
@Override |
|
|
|
|
public void itemStateChanged(ItemEvent e) { |
|
|
|
|
if (!isBuildByParentFiled()) { |
|
|
|
|
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(); |
|
|
|
|
if (tableDataWrappe == null) { |
|
|
|
|
return; |
|
|
|
@ -186,8 +188,10 @@ public class TreeTableDataDictPane extends BasicPane implements Previewable {
|
|
|
|
|
String[] columnNames = new String[len]; |
|
|
|
|
namelist.toArray(columnNames); |
|
|
|
|
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]); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
for (int i = 0; i < valueEditorPanes.length; i++) { |
|
|
|
|
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 |
|
|
|
|
protected String title4PopupWindow() { |
|
|
|
|
return "TreeTableDataDictionay"; |
|
|
|
|