Browse Source

MOBILE-29857【RN】设计器上圆点指示器选中填充色设置后没有生效

final/10.0
Hans 4 years ago
parent
commit
a80b9cbbb7
  1. 31
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTabCommonSettingPane.java

31
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTabCommonSettingPane.java

@ -35,6 +35,7 @@ public class MobileTabCommonSettingPane extends BasicPane {
private ModeButtonGroup<Integer> buttonGroup;
private NewColorSelectBox initDotColorBox;
private NewColorSelectBox selectDotColorBox;
private boolean isPopulate;
public MobileTabCommonSettingPane(boolean isTopComponent) {
initComponent(isTopComponent);
@ -89,23 +90,27 @@ public class MobileTabCommonSettingPane extends BasicPane {
initDotColorBox = new NewColorSelectBox(0){
@Override
protected void iniListener() {
}
@Override
public void mouseClicked(MouseEvent e) {
super.mouseClicked(e);
this.attributeChange();
this.addSelectChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
if (!isPopulate) {
attributeChange();
}
}
});
}
};
selectDotColorBox = new NewColorSelectBox(0){
@Override
protected void iniListener() {
}
@Override
public void mouseClicked(MouseEvent e) {
super.mouseClicked(e);
this.attributeChange();
this.addSelectChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
if (!isPopulate) {
attributeChange();
}
}
});
}
};
JPanel initDotColorPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{initColorLabel, initDotColorBox}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_MEDIUM);
@ -189,7 +194,9 @@ public class MobileTabCommonSettingPane extends BasicPane {
color = defaultColor;
}
if (color != colorBox.getSelectObject()) {
isPopulate = true;
colorBox.setSelectObject(color);
isPopulate = false;
}
}

Loading…
Cancel
Save