Browse Source

Pull request #2378: MOBILE-29516【设计器】tab手势切换样式》圆点指示器设置项在不勾选滑动的时候也会显示修改

Merge in DESIGN/design from ~HANS/design:release/10.0 to release/10.0

* commit '4860a9c94c4f7c171f07cb7885e8c8a0db1348f2':
  MOBILE-29516【设计器】tab手势切换样式》圆点指示器设置项在不勾选滑动的时候也会显示修改 按照交互的设计调整显示规则
feature/big-screen
Hans 4 years ago
parent
commit
4899ed200a
  1. 40
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTabCommonSettingPane.java

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

@ -112,20 +112,10 @@ public class MobileTabCommonSettingPane extends BasicPane {
JPanel selectDotColorPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{selectColor, selectDotColorBox}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_MEDIUM);
double[] rowSize = {TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED};
double[] columnSize = {TableLayout.FILL};
int[][] rowCount = {{1}, {1}, {1}};
double[] verticalGaps = {10, 10, 10};
double[] verticalGaps = {IntervalConstants.INTERVAL_L1, IntervalConstants.INTERVAL_L1, IntervalConstants.INTERVAL_L1};
double[] dotSettingColumnSize = {TableLayout.PREFERRED, TableLayout.FILL};
Component[][] components = new Component[][]{
new Component[]{this.showTabTitleCheck},
new Component[]{this.tabSlideCheck},
new Component[]{this.showTabDotIndicatorCheck}
};
JPanel tabBaseConfigPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount,
IntervalConstants.INTERVAL_L1, IntervalConstants.INTERVAL_L1);
tabBaseConfigPane.setBorder(BorderFactory.createEmptyBorder(0, 0, IntervalConstants.INTERVAL_L1, 0));
final JPanel tabBaseConfigPanel = createTableConfigJPanel();
JPanel dotIndicatorSettingPanel = TableLayoutHelper.createDiffVGapTableLayoutPane(new JComponent[][]{
{label, dotIndicatorShowTypePane},
@ -135,11 +125,18 @@ public class MobileTabCommonSettingPane extends BasicPane {
BorderFactory.createEmptyBorder(0, IntervalConstants.INTERVAL_L2, IntervalConstants.INTERVAL_L1, 0)
);
final JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
jPanel.add(tabBaseConfigPane, BorderLayout.NORTH);
jPanel.add(dotIndicatorSettingPanel, BorderLayout.CENTER);
final JPanel tableConfigJPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
tableConfigJPanel.add(tabBaseConfigPanel, BorderLayout.NORTH);
tableConfigJPanel.add(dotIndicatorSettingPanel, BorderLayout.CENTER);
this.add(tableConfigJPanel, BorderLayout.CENTER);
this.add(jPanel, BorderLayout.CENTER);
tabSlideCheck.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
showTabDotIndicatorCheck.setVisible(tabSlideCheck.isSelected());
dotIndicatorSettingPanel.setVisible(tabSlideCheck.isSelected() && showTabDotIndicatorCheck.isSelected());
}
});
showTabDotIndicatorCheck.addChangeListener(new ChangeListener() {
@Override
@ -200,4 +197,15 @@ public class MobileTabCommonSettingPane extends BasicPane {
colorBox.setSelectObject(color);
}
}
private JPanel createTableConfigJPanel() {
final JPanel jPanel = new JPanel();
BorderLayout borderLayout = new BorderLayout(0, IntervalConstants.INTERVAL_L1);
jPanel.setLayout(borderLayout);
jPanel.add(this.showTabTitleCheck, BorderLayout.NORTH);
jPanel.add(this.tabSlideCheck, BorderLayout.CENTER);
jPanel.add(this.showTabDotIndicatorCheck, BorderLayout.SOUTH);
jPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, IntervalConstants.INTERVAL_L1, 0));
return jPanel;
}
}

Loading…
Cancel
Save