Browse Source

Merge pull request #1575 in DESIGN/design from ~STARRYI/design:release/10.0 to release/10.0

* commit '6894dce984c42ea61cb8f39addeb35dedcc23824':
  MOBILE-26191 组件快速定位配置面板存在不符合设计的问题
feature/big-screen
starryi 5 years ago
parent
commit
5db3441a46
  1. 37
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/SidebarMobileBookMarkStyleCustomDefinePane.java

37
designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/SidebarMobileBookMarkStyleCustomDefinePane.java

@ -3,6 +3,7 @@ package com.fr.design.mainframe.mobile.ui;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.AttrScrollPane;
import com.fr.design.gui.ibutton.UIColorButton; import com.fr.design.gui.ibutton.UIColorButton;
import com.fr.design.gui.ibutton.UIToggleButton; import com.fr.design.gui.ibutton.UIToggleButton;
import com.fr.design.gui.icombobox.LineComboBox; import com.fr.design.gui.icombobox.LineComboBox;
@ -34,6 +35,7 @@ import java.awt.*;
public class SidebarMobileBookMarkStyleCustomDefinePane extends BasicBeanPane<MobileBookMarkStyle> { public class SidebarMobileBookMarkStyleCustomDefinePane extends BasicBeanPane<MobileBookMarkStyle> {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private static final int COLUMN_HEIGHT = 20;
private static final int COLUMN_WIDTH = 160; private static final int COLUMN_WIDTH = 160;
private UnsignedIntUISpinner buttonWidthSpinner; private UnsignedIntUISpinner buttonWidthSpinner;
@ -73,9 +75,20 @@ public class SidebarMobileBookMarkStyleCustomDefinePane extends BasicBeanPane<Mo
this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
this.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); this.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0));
this.add(this.createNavButtonStylePanel()); final JPanel contentPanel = FRGUIPaneFactory.createYBoxEmptyBorderPane();
this.add(this.createNormalStateStylePanel());
this.add(this.createSelectedStateStylePanel()); contentPanel.add(this.createNavButtonStylePanel());
contentPanel.add(this.createNormalStateStylePanel());
contentPanel.add(this.createSelectedStateStylePanel());
JPanel scrollPanel = new AttrScrollPane() {
@Override
protected JPanel createContentPane() {
return contentPanel;
}
};
scrollPanel.setPreferredSize(new Dimension(-2, -2));
this.add(scrollPanel, BorderLayout.CENTER);
} }
private JPanel createNavButtonStylePanel() { private JPanel createNavButtonStylePanel() {
@ -87,11 +100,11 @@ public class SidebarMobileBookMarkStyleCustomDefinePane extends BasicBeanPane<Mo
UILabel sizeLabel = new UILabel(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Button_Size") + ":", UILabel sizeLabel = new UILabel(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Button_Size") + ":",
SwingConstants.RIGHT); SwingConstants.RIGHT);
JPanel sizePane = FRGUIPaneFactory.createNColumnGridInnerContainer_Pane(2, 5, 0); JPanel sizePane = FRGUIPaneFactory.createNColumnGridInnerContainer_Pane(2, 4, 0);
sizePane.add(buttonWidthSpinner); sizePane.add(buttonWidthSpinner);
sizePane.add(buttonHeightSpinner); sizePane.add(buttonHeightSpinner);
JPanel sizeTipsPane = FRGUIPaneFactory.createNColumnGridInnerContainer_Pane(2, 5, 0); JPanel sizeTipsPane = FRGUIPaneFactory.createNColumnGridInnerContainer_Pane(2, 4, 0);
sizeTipsPane.add(new UILabel(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Button_Width"), sizeTipsPane.add(new UILabel(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Button_Width"),
SwingConstants.CENTER)); SwingConstants.CENTER));
sizeTipsPane.add(new UILabel(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Button_Height"), sizeTipsPane.add(new UILabel(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Button_Height"),
@ -103,7 +116,7 @@ public class SidebarMobileBookMarkStyleCustomDefinePane extends BasicBeanPane<Mo
SwingConstants.RIGHT); SwingConstants.RIGHT);
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double[] rowSize = {p, p, p, p}; double[] rowSize = {COLUMN_HEIGHT, COLUMN_HEIGHT, COLUMN_HEIGHT, COLUMN_HEIGHT};
double[] columnSize = {p, COLUMN_WIDTH}; double[] columnSize = {p, COLUMN_WIDTH};
double[] verticalGaps = {0, 10, 10}; double[] verticalGaps = {0, 10, 10};
@ -167,12 +180,12 @@ public class SidebarMobileBookMarkStyleCustomDefinePane extends BasicBeanPane<Mo
JPanel fontExtraPane = TableLayoutHelper.createGapTableLayoutPane( JPanel fontExtraPane = TableLayoutHelper.createGapTableLayoutPane(
new JComponent[][]{{normalFontSizeComboBox, normalFontColorButton, normalFontItalicButton, normalFontBoldButton}}, new JComponent[][]{{normalFontSizeComboBox, normalFontColorButton, normalFontItalicButton, normalFontBoldButton}},
new double[]{p}, new double[]{COLUMN_HEIGHT},
new double[]{p, p, p, p}, new double[]{p, p, p, p},
0, 5 7, 0
); );
double[] rowSize = {p, p, p, p, p}; double[] rowSize = {COLUMN_HEIGHT, COLUMN_HEIGHT, COLUMN_HEIGHT, COLUMN_HEIGHT, COLUMN_HEIGHT};
double[] columnSize = {p, COLUMN_WIDTH, p}; double[] columnSize = {p, COLUMN_WIDTH, p};
JPanel normalStateStyleSettingsPanel = TableLayoutHelper.createGapTableLayoutPane(new JComponent[][]{ JPanel normalStateStyleSettingsPanel = TableLayoutHelper.createGapTableLayoutPane(new JComponent[][]{
@ -254,12 +267,12 @@ public class SidebarMobileBookMarkStyleCustomDefinePane extends BasicBeanPane<Mo
JPanel fontExtraPane = TableLayoutHelper.createGapTableLayoutPane( JPanel fontExtraPane = TableLayoutHelper.createGapTableLayoutPane(
new JComponent[][]{{selectedFontSizeComboBox, selectedFontColorButton, selectedFontItalicButton, selectedFontBoldButton}}, new JComponent[][]{{selectedFontSizeComboBox, selectedFontColorButton, selectedFontItalicButton, selectedFontBoldButton}},
new double[]{p}, new double[]{COLUMN_HEIGHT},
new double[]{p, p, p, p}, new double[]{p, p, p, p},
0, 5 7, 0
); );
double[] rowSize = {p, p, p, p, p}; double[] rowSize = {COLUMN_HEIGHT, COLUMN_HEIGHT, COLUMN_HEIGHT, COLUMN_HEIGHT, COLUMN_HEIGHT};
double[] columnSize = {p, COLUMN_WIDTH, p}; double[] columnSize = {p, COLUMN_WIDTH, p};
JPanel selectedStateStyleSettingsPanel = TableLayoutHelper.createGapTableLayoutPane(new JComponent[][]{ JPanel selectedStateStyleSettingsPanel = TableLayoutHelper.createGapTableLayoutPane(new JComponent[][]{

Loading…
Cancel
Save