|
|
@ -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}; |
|
|
|
|
|
|
|
|
|
|
@ -145,7 +158,7 @@ public class SidebarMobileBookMarkStyleCustomDefinePane extends BasicBeanPane<Mo |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
normalBorderWidthComBox = new LineComboBox(CoreConstants.UNDERLINE_STYLE_ARRAY); |
|
|
|
normalBorderWidthComBox = new LineComboBox(CoreConstants.UNDERLINE_STYLE_ARRAY); |
|
|
|
normalBorderWidthComBox.setSelectedLineStyle(DEFAULT_STYLE.getBorderWidth()); |
|
|
|
normalBorderWidthComBox.setSelectedLineStyle(DEFAULT_STYLE.getBorderLineStyle()); |
|
|
|
normalBorderColorBox = new ColorSelectBox(COLUMN_WIDTH); |
|
|
|
normalBorderColorBox = new ColorSelectBox(COLUMN_WIDTH); |
|
|
|
normalBorderColorBox.setSelectObject(DEFAULT_STYLE.getBorderColor()); |
|
|
|
normalBorderColorBox.setSelectObject(DEFAULT_STYLE.getBorderColor()); |
|
|
|
normalFontNameComboBox = new UIComboBox(Utils.getAvailableFontFamilyNames4Report()); |
|
|
|
normalFontNameComboBox = new UIComboBox(Utils.getAvailableFontFamilyNames4Report()); |
|
|
@ -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[][]{ |
|
|
@ -232,7 +245,7 @@ public class SidebarMobileBookMarkStyleCustomDefinePane extends BasicBeanPane<Mo |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
selectedBorderWidthComBox = new LineComboBox(CoreConstants.UNDERLINE_STYLE_ARRAY); |
|
|
|
selectedBorderWidthComBox = new LineComboBox(CoreConstants.UNDERLINE_STYLE_ARRAY); |
|
|
|
selectedBorderWidthComBox.setSelectedLineStyle(DEFAULT_STYLE.getSelectedBorderWidth()); |
|
|
|
selectedBorderWidthComBox.setSelectedLineStyle(DEFAULT_STYLE.getSelectedBorderLineStyle()); |
|
|
|
selectedBorderColorBox = new ColorSelectBox(COLUMN_WIDTH); |
|
|
|
selectedBorderColorBox = new ColorSelectBox(COLUMN_WIDTH); |
|
|
|
selectedBorderColorBox.setSelectObject(DEFAULT_STYLE.getSelectedBorderColor()); |
|
|
|
selectedBorderColorBox.setSelectObject(DEFAULT_STYLE.getSelectedBorderColor()); |
|
|
|
selectedFontNameComboBox = new UIComboBox(Utils.getAvailableFontFamilyNames4Report()); |
|
|
|
selectedFontNameComboBox = new UIComboBox(Utils.getAvailableFontFamilyNames4Report()); |
|
|
@ -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[][]{ |
|
|
@ -316,7 +329,7 @@ public class SidebarMobileBookMarkStyleCustomDefinePane extends BasicBeanPane<Mo |
|
|
|
normalBackgroundColorBox.setSelectObject(style.getBackgroundColor()); |
|
|
|
normalBackgroundColorBox.setSelectObject(style.getBackgroundColor()); |
|
|
|
normalOpacityDragBar.setValue(style.getOpacity()); |
|
|
|
normalOpacityDragBar.setValue(style.getOpacity()); |
|
|
|
normalOpacitySpinner.setValue(style.getOpacity()); |
|
|
|
normalOpacitySpinner.setValue(style.getOpacity()); |
|
|
|
normalBorderWidthComBox.setSelectedLineStyle(style.getBorderWidth()); |
|
|
|
normalBorderWidthComBox.setSelectedLineStyle(style.getBorderLineStyle()); |
|
|
|
normalBorderColorBox.setSelectObject(style.getBorderColor()); |
|
|
|
normalBorderColorBox.setSelectObject(style.getBorderColor()); |
|
|
|
normalFontNameComboBox.setSelectedItem(style.getFontFamily()); |
|
|
|
normalFontNameComboBox.setSelectedItem(style.getFontFamily()); |
|
|
|
normalFontSizeComboBox.setSelectedItem(style.getFontSize()); |
|
|
|
normalFontSizeComboBox.setSelectedItem(style.getFontSize()); |
|
|
@ -327,7 +340,7 @@ public class SidebarMobileBookMarkStyleCustomDefinePane extends BasicBeanPane<Mo |
|
|
|
selectedBackgroundColorBox.setSelectObject(style.getSelectedBackgroundColor()); |
|
|
|
selectedBackgroundColorBox.setSelectObject(style.getSelectedBackgroundColor()); |
|
|
|
selectedOpacityDragBar.setValue(style.getSelectedOpacity()); |
|
|
|
selectedOpacityDragBar.setValue(style.getSelectedOpacity()); |
|
|
|
selectedOpacitySpinner.setValue(style.getSelectedOpacity()); |
|
|
|
selectedOpacitySpinner.setValue(style.getSelectedOpacity()); |
|
|
|
selectedBorderWidthComBox.setSelectedLineStyle(style.getSelectedBorderWidth()); |
|
|
|
selectedBorderWidthComBox.setSelectedLineStyle(style.getSelectedBorderLineStyle()); |
|
|
|
selectedBorderColorBox.setSelectObject(style.getSelectedBorderColor()); |
|
|
|
selectedBorderColorBox.setSelectObject(style.getSelectedBorderColor()); |
|
|
|
selectedFontNameComboBox.setSelectedItem(style.getSelectedFontFamily()); |
|
|
|
selectedFontNameComboBox.setSelectedItem(style.getSelectedFontFamily()); |
|
|
|
selectedFontSizeComboBox.setSelectedItem(style.getSelectedFontSize()); |
|
|
|
selectedFontSizeComboBox.setSelectedItem(style.getSelectedFontSize()); |
|
|
@ -349,7 +362,7 @@ public class SidebarMobileBookMarkStyleCustomDefinePane extends BasicBeanPane<Mo |
|
|
|
style.setBackgroundColor(normalBackgroundColorBox.getSelectObject()); |
|
|
|
style.setBackgroundColor(normalBackgroundColorBox.getSelectObject()); |
|
|
|
} |
|
|
|
} |
|
|
|
style.setOpacity((int) normalOpacitySpinner.getValue()); |
|
|
|
style.setOpacity((int) normalOpacitySpinner.getValue()); |
|
|
|
style.setBorderWidth(normalBorderWidthComBox.getSelectedLineStyle()); |
|
|
|
style.setBorderLineStyle(normalBorderWidthComBox.getSelectedLineStyle()); |
|
|
|
style.setBorderColor(normalBorderColorBox.getSelectObject()); |
|
|
|
style.setBorderColor(normalBorderColorBox.getSelectObject()); |
|
|
|
if (normalFontNameComboBox.getSelectedItem() != null) { |
|
|
|
if (normalFontNameComboBox.getSelectedItem() != null) { |
|
|
|
style.setFontFamily((String) normalFontNameComboBox.getSelectedItem()); |
|
|
|
style.setFontFamily((String) normalFontNameComboBox.getSelectedItem()); |
|
|
@ -365,7 +378,7 @@ public class SidebarMobileBookMarkStyleCustomDefinePane extends BasicBeanPane<Mo |
|
|
|
style.setSelectedBackgroundColor(selectedBackgroundColorBox.getSelectObject()); |
|
|
|
style.setSelectedBackgroundColor(selectedBackgroundColorBox.getSelectObject()); |
|
|
|
} |
|
|
|
} |
|
|
|
style.setSelectedOpacity((int) selectedOpacitySpinner.getValue()); |
|
|
|
style.setSelectedOpacity((int) selectedOpacitySpinner.getValue()); |
|
|
|
style.setSelectedBorderWidth(selectedBorderWidthComBox.getSelectedLineStyle()); |
|
|
|
style.setSelectedBorderLineStyle(selectedBorderWidthComBox.getSelectedLineStyle()); |
|
|
|
style.setSelectedBorderColor(selectedBorderColorBox.getSelectObject()); |
|
|
|
style.setSelectedBorderColor(selectedBorderColorBox.getSelectObject()); |
|
|
|
if (selectedFontNameComboBox.getSelectedItem() != null) { |
|
|
|
if (selectedFontNameComboBox.getSelectedItem() != null) { |
|
|
|
style.setSelectedFontFamily((String) selectedFontNameComboBox.getSelectedItem()); |
|
|
|
style.setSelectedFontFamily((String) selectedFontNameComboBox.getSelectedItem()); |
|
|
|