Browse Source

Merge pull request #357 in BA/design from ~KERRY/design:dev to dev

* commit 'ee4e1c77c1446b6b38be5674ec42b2b4cd1e3fb6':
  REPORT-379 关联数据集里选中的数据集名称长度有限制, 超过10个中文后, 无法刷新参数.
master
superman 8 years ago
parent
commit
a45437a3c9
  1. 14
      designer_base/src/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java

14
designer_base/src/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java

@ -99,12 +99,6 @@ public class MultiTDTableDataPane extends AbstractTableDataPane<MultiTDTableData
while (entryIt.hasNext()) {
TableDataWrapper tableDataWrappe = entryIt.next().getValue();
String tmp = tableDataWrappe.getTableDataName();
UILabel uiLabel = new UILabel(tmp);
while (uiLabel.getPreferredSize().width > MAX_LENTH_OF_DATASET) {
tmp = tmp.substring(0, tmp.length() - SUB_LENGTH);
tmp = tmp + "...";
uiLabel = new UILabel(tmp);
}
if (!ComparatorUtils.equals(tableDataWrappe.getTableDataName(), multiName)) {
centerPanel.add(new BarPanel(tmp, tableDataWrappe.getIcon()));
}
@ -285,12 +279,18 @@ public class MultiTDTableDataPane extends AbstractTableDataPane<MultiTDTableData
}
private void initUI() {
String tmp = name;
this.setLayout(new FlowLayout(FlowLayout.LEFT));
JPanel leftPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
leftPanel.setPreferredSize(new Dimension(190, BAR_HEIGHT));
chekbox = new UICheckBox();
UILabel tabledataName = new UILabel(name);
UILabel tabledataName = new UILabel(tmp);
while (tabledataName.getPreferredSize().width > MAX_LENTH_OF_DATASET) {
tmp = tmp.substring(0, tmp.length() - SUB_LENGTH);
tmp = tmp + "...";
tabledataName = new UILabel(tmp);
}
UILabel iconLabel = new UILabel(icon);
chekbox.addActionListener(tableDataCheckboxListener);
iconLabel.addMouseListener(chooseTableDataListener);

Loading…
Cancel
Save