Browse Source

REPORT-83305 修复修改后界面出现异常

newui
Leo.Qin 2 years ago
parent
commit
59c4ea7201
  1. 37
      designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellDSColumnEditor.java

37
designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellDSColumnEditor.java

@ -54,6 +54,8 @@ import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Set;
@ -157,6 +159,10 @@ public class CellDSColumnEditor extends CellQuickEditor {
tabsHeaderIconPane = new UIHeadGroup(iconArray) {
@Override
public void tabChanged(int index) {
// 由于多选的时候修改了 cellDSColumnBasicPane 中组件的visiable属性,切换时需要将其设置为false
cellDSColumnBasicPane.setVisible(false);
card.show(cardContainer, paneList.get(index).title4PopupWindow());
paneList.get(index).populate();
}
@ -280,6 +286,7 @@ public class CellDSColumnEditor extends CellQuickEditor {
private void initComponents(){
dataPane = new SelectedDataColumnPane(true, true);
groupPane = new ResultSetGroupDockingPane();
initListener();
double[] rowSize = {P}, columnSize = {60, F};
UILabel uiLabel = FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Report_Filter_Conditions"));
condition = new DSColumnConditionAction();
@ -297,14 +304,38 @@ public class CellDSColumnEditor extends CellQuickEditor {
this.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
}
private void initListener() {
dataPane.setListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
if (e.getStateChange() == ItemEvent.SELECTED) {
dataPane.update(cellElement);
fireTargetModified();
}
}
});
groupPane.setListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
CellSelection selection = (CellSelection) tc.getSelection();
Set<TemplateCellElement> allCellElements = selection.getCellElements();
groupPane.update(allCellElements);
if (e == null || e.getStateChange() == ItemEvent.DESELECTED) {
//分组-高级-自定义点确定的时候传进来null的e,但是这时候应该触发保存
groupPane.update(allCellElements);
fireTargetModified();
}
}
});
}
@Override
protected AttributeChangeListener getAttributeChangeListener() {
return new AttributeChangeListener() {
@Override
public void attributeChange() {
update();
fireTargetModified();
}
};
}
@ -319,6 +350,8 @@ public class CellDSColumnEditor extends CellQuickEditor {
CellSelection selection = (CellSelection) tc.getSelection();
boolean sameDSName = checkSameDSName(selection.getCellElements());
conditionPane.setVisible(sameDSName);
} else {
conditionPane.setVisible(true);
}
}

Loading…
Cancel
Save