Browse Source

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

feature/big-screen
Hans 4 years ago
parent
commit
d8576dcefc
  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 ModeButtonGroup<Integer> buttonGroup;
private NewColorSelectBox initDotColorBox; private NewColorSelectBox initDotColorBox;
private NewColorSelectBox selectDotColorBox; private NewColorSelectBox selectDotColorBox;
private boolean isPopulate;
public MobileTabCommonSettingPane(boolean isTopComponent) { public MobileTabCommonSettingPane(boolean isTopComponent) {
initComponent(isTopComponent); initComponent(isTopComponent);
@ -89,23 +90,27 @@ public class MobileTabCommonSettingPane extends BasicPane {
initDotColorBox = new NewColorSelectBox(0){ initDotColorBox = new NewColorSelectBox(0){
@Override @Override
protected void iniListener() { protected void iniListener() {
} this.addSelectChangeListener(new ChangeListener() {
@Override
@Override public void stateChanged(ChangeEvent e) {
public void mouseClicked(MouseEvent e) { if (!isPopulate) {
super.mouseClicked(e); attributeChange();
this.attributeChange(); }
}
});
} }
}; };
selectDotColorBox = new NewColorSelectBox(0){ selectDotColorBox = new NewColorSelectBox(0){
@Override @Override
protected void iniListener() { protected void iniListener() {
} this.addSelectChangeListener(new ChangeListener() {
@Override
@Override public void stateChanged(ChangeEvent e) {
public void mouseClicked(MouseEvent e) { if (!isPopulate) {
super.mouseClicked(e); attributeChange();
this.attributeChange(); }
}
});
} }
}; };
JPanel initDotColorPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{initColorLabel, initDotColorBox}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_MEDIUM); 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; color = defaultColor;
} }
if (color != colorBox.getSelectObject()) { if (color != colorBox.getSelectObject()) {
isPopulate = true;
colorBox.setSelectObject(color); colorBox.setSelectObject(color);
isPopulate = false;
} }
} }

Loading…
Cancel
Save