|
|
|
@ -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 isChangeDS) { |
|
|
|
|
TableDataWrapper tableDataWrappe = this.tableDataNameComboBox.getSelectedItem(); |
|
|
|
|
if (tableDataWrappe == null) { |
|
|
|
|
return; |
|
|
|
@ -186,7 +188,9 @@ public class TreeTableDataDictPane extends BasicPane implements Previewable {
|
|
|
|
|
String[] columnNames = new String[len]; |
|
|
|
|
namelist.toArray(columnNames); |
|
|
|
|
for (int i = 0; i < valueEditorPanes.length; i++) { |
|
|
|
|
valueEditorPanes[i].setEditors(new Editor[]{new ColumnNameEditor(columnNames), new ColumnIndexEditor(len)}, columnNames[0]); |
|
|
|
|
if (isChangeDS || 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++) { |
|
|
|
@ -197,6 +201,10 @@ public class TreeTableDataDictPane extends BasicPane implements Previewable {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private boolean isNoSelectedColumnName(ValueEditorPane valueEditorPane) { |
|
|
|
|
return (Integer) valueEditorPane.update() == -1; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
protected String title4PopupWindow() { |
|
|
|
|
return "TreeTableDataDictionay"; |
|
|
|
|