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); 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[] rowSize = {TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED};
double[] columnSize = {TableLayout.FILL}; double[] verticalGaps = {IntervalConstants.INTERVAL_L1, IntervalConstants.INTERVAL_L1, IntervalConstants.INTERVAL_L1};
int[][] rowCount = {{1}, {1}, {1}};
double[] verticalGaps = {10, 10, 10};
double[] dotSettingColumnSize = {TableLayout.PREFERRED, TableLayout.FILL}; double[] dotSettingColumnSize = {TableLayout.PREFERRED, TableLayout.FILL};
Component[][] components = new Component[][]{ final JPanel tabBaseConfigPanel = createTableConfigJPanel();
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));
JPanel dotIndicatorSettingPanel = TableLayoutHelper.createDiffVGapTableLayoutPane(new JComponent[][]{ JPanel dotIndicatorSettingPanel = TableLayoutHelper.createDiffVGapTableLayoutPane(new JComponent[][]{
{label, dotIndicatorShowTypePane}, {label, dotIndicatorShowTypePane},
@ -135,11 +125,18 @@ public class MobileTabCommonSettingPane extends BasicPane {
BorderFactory.createEmptyBorder(0, IntervalConstants.INTERVAL_L2, IntervalConstants.INTERVAL_L1, 0) BorderFactory.createEmptyBorder(0, IntervalConstants.INTERVAL_L2, IntervalConstants.INTERVAL_L1, 0)
); );
final JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); final JPanel tableConfigJPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
jPanel.add(tabBaseConfigPane, BorderLayout.NORTH); tableConfigJPanel.add(tabBaseConfigPanel, BorderLayout.NORTH);
jPanel.add(dotIndicatorSettingPanel, BorderLayout.CENTER); 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() { showTabDotIndicatorCheck.addChangeListener(new ChangeListener() {
@Override @Override
@ -200,4 +197,15 @@ public class MobileTabCommonSettingPane extends BasicPane {
colorBox.setSelectObject(color); 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