|
|
@ -125,34 +125,7 @@ public class ImageCustomDefinePane extends MobileStyleCustomDefinePane { |
|
|
|
return FRGUIPaneFactory.createVerticalFlowLayout_Pane(true, FlowLayout.LEADING, 0, 10); |
|
|
|
return FRGUIPaneFactory.createVerticalFlowLayout_Pane(true, FlowLayout.LEADING, 0, 10); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void addPaddingPane() { |
|
|
|
private void initLayoutCombo() { |
|
|
|
centerPane.add(DesignerUtils.createTitleSplitLine(Toolkit.i18nText("Fine-Plugin-RadioGroup_Layout"))); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UILabel paddingHintLabel = DesignerUtils.createConfigLabel(Toolkit.i18nText("Fine-Plugin-RadioGroup_Button_Padding")); |
|
|
|
|
|
|
|
UILabel emptyHintLabel = DesignerUtils.createConfigLabel(Toolkit.i18nText("")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UILabel leftLabel = new UILabel(Toolkit.i18nText("Fine-Plugin-RadioGroup_Padding_Left")); |
|
|
|
|
|
|
|
leftSpinner = new UISpinner(0, Integer.MAX_VALUE, 1, DesignerUtils.kDefaultHorizontalPadding); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UILabel rightLabel = new UILabel(Toolkit.i18nText("Fine-Plugin-RadioGroup_Padding_Right")); |
|
|
|
|
|
|
|
rightSpinner = new UISpinner(0, Integer.MAX_VALUE, 1, DesignerUtils.kDefaultHorizontalPadding); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UILabel topLabel = new UILabel(Toolkit.i18nText("Fine-Plugin-RadioGroup_Padding_Top")); |
|
|
|
|
|
|
|
topSpinner = new UISpinner(0, Integer.MAX_VALUE, 1, DesignerUtils.kDefaultVerticalPadding); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UILabel bottomLabel = new UILabel(Toolkit.i18nText("Fine-Plugin-RadioGroup_Padding_Bottom")); |
|
|
|
|
|
|
|
bottomSpinner = new UISpinner(0, Integer.MAX_VALUE, 1, DesignerUtils.kDefaultVerticalPadding); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JPanel leftSpinnerPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{leftLabel, leftSpinner}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_SMALL); |
|
|
|
|
|
|
|
JPanel rightSpinnerPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{rightLabel, rightSpinner}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_SMALL); |
|
|
|
|
|
|
|
JPanel topSpinnerPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{topLabel, topSpinner}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_SMALL); |
|
|
|
|
|
|
|
JPanel bottomSpinnerPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{bottomLabel, bottomSpinner}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_SMALL); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JPanel vPaddingSpinnerPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{topSpinnerPanel, bottomSpinnerPanel}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_W1, LayoutConstants.VGAP_SMALL); |
|
|
|
|
|
|
|
JPanel hPaddingSpinnerPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{leftSpinnerPanel, rightSpinnerPanel}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_W1, LayoutConstants.VGAP_SMALL); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 布局方式下拉框
|
|
|
|
|
|
|
|
UILabel layoutTypeLabel = DesignerUtils.createConfigLabel(Toolkit.i18nText("Fine-Plugin-RadioGroup_Layout_Type")); |
|
|
|
|
|
|
|
layoutTypeCombo = new UIComboBox(new String[]{ |
|
|
|
layoutTypeCombo = new UIComboBox(new String[]{ |
|
|
|
Toolkit.i18nText("Fine-Plugin-RadioGroup_Layout_Single_Line"), |
|
|
|
Toolkit.i18nText("Fine-Plugin-RadioGroup_Layout_Single_Line"), |
|
|
|
Toolkit.i18nText("Fine-Plugin-RadioGroup_Layout_Auto"), |
|
|
|
Toolkit.i18nText("Fine-Plugin-RadioGroup_Layout_Auto"), |
|
|
@ -162,22 +135,26 @@ public class ImageCustomDefinePane extends MobileStyleCustomDefinePane { |
|
|
|
layoutTypeCombo.addItemListener(new ItemListener() { |
|
|
|
layoutTypeCombo.addItemListener(new ItemListener() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void itemStateChanged(ItemEvent e) { |
|
|
|
public void itemStateChanged(ItemEvent e) { |
|
|
|
if (layoutTypeCombo.getSelectedIndex() == 0) { |
|
|
|
if (layoutTypeCombo.getSelectedIndex() == DesignerUtils.K_LAYOUT_SINGLE) { |
|
|
|
buttonAlignPane.setVisible(true); |
|
|
|
buttonAlignPane.setVisible(true); |
|
|
|
columnSizePane.setVisible(false); |
|
|
|
columnSizePane.setVisible(false); |
|
|
|
} |
|
|
|
} |
|
|
|
if (layoutTypeCombo.getSelectedIndex() == 1) { |
|
|
|
if (layoutTypeCombo.getSelectedIndex() == DesignerUtils.K_LAYOUT_AUTO) { |
|
|
|
buttonAlignPane.setVisible(false); |
|
|
|
buttonAlignPane.setVisible(false); |
|
|
|
columnSizePane.setVisible(false); |
|
|
|
columnSizePane.setVisible(false); |
|
|
|
} |
|
|
|
} |
|
|
|
if (layoutTypeCombo.getSelectedIndex() == 2) { |
|
|
|
if (layoutTypeCombo.getSelectedIndex() == DesignerUtils.K_LAYOUT_FIXED) { |
|
|
|
buttonAlignPane.setVisible(false); |
|
|
|
buttonAlignPane.setVisible(false); |
|
|
|
columnSizePane.setVisible(true); |
|
|
|
columnSizePane.setVisible(true); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 按钮排布下拉框
|
|
|
|
/** |
|
|
|
|
|
|
|
* 初始化按钮排布面板 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private void initButtonAlignPane() { |
|
|
|
UILabel buttonAlignLabel = DesignerUtils.createConfigLabel(Toolkit.i18nText("Fine-Plugin-RadioGroup_Alignment")); |
|
|
|
UILabel buttonAlignLabel = DesignerUtils.createConfigLabel(Toolkit.i18nText("Fine-Plugin-RadioGroup_Alignment")); |
|
|
|
buttonAlignCombo = new UIComboBox(new String[]{ |
|
|
|
buttonAlignCombo = new UIComboBox(new String[]{ |
|
|
|
Toolkit.i18nText("Fine-Plugin-RadioGroup_Alignment_Nature"), |
|
|
|
Toolkit.i18nText("Fine-Plugin-RadioGroup_Alignment_Nature"), |
|
|
@ -185,19 +162,61 @@ public class ImageCustomDefinePane extends MobileStyleCustomDefinePane { |
|
|
|
}); |
|
|
|
}); |
|
|
|
buttonAlignCombo.setPreferredSize(new Dimension(DesignerUtils.LARGE_COMBO_WIDTH, 20)); |
|
|
|
buttonAlignCombo.setPreferredSize(new Dimension(DesignerUtils.LARGE_COMBO_WIDTH, 20)); |
|
|
|
buttonAlignPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{buttonAlignLabel, buttonAlignCombo}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_SMALL); |
|
|
|
buttonAlignPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{buttonAlignLabel, buttonAlignCombo}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_SMALL); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 固定列数——数字输入框
|
|
|
|
/** |
|
|
|
|
|
|
|
* 初始化固定列数面板 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private void initColumnSizePane() { |
|
|
|
UILabel columnSizeLabel = DesignerUtils.createConfigLabel(Toolkit.i18nText("Fine-Plugin-RadioGroup_Layout_Fixed_Number")); |
|
|
|
UILabel columnSizeLabel = DesignerUtils.createConfigLabel(Toolkit.i18nText("Fine-Plugin-RadioGroup_Layout_Fixed_Number")); |
|
|
|
columnSizeSpinner = new UISpinner(0, Integer.MAX_VALUE, 1, DesignerUtils.kDefaultVerticalPadding); |
|
|
|
columnSizeSpinner = new UISpinner(0, Integer.MAX_VALUE, 1, DesignerUtils.INITIAL_COLUMN_SIZE); |
|
|
|
columnSizeSpinner.setPreferredSize(new Dimension(DesignerUtils.LARGE_COMBO_WIDTH, 20)); |
|
|
|
columnSizeSpinner.setPreferredSize(new Dimension(DesignerUtils.LARGE_COMBO_WIDTH, 20)); |
|
|
|
columnSizePane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{columnSizeLabel, columnSizeSpinner}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_SMALL); |
|
|
|
columnSizePane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{columnSizeLabel, columnSizeSpinner}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_SMALL); |
|
|
|
columnSizePane.setVisible(false); |
|
|
|
columnSizePane.setVisible(false); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private JPanel initVPaddingConfig() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UILabel topLabel = new UILabel(Toolkit.i18nText("Fine-Plugin-RadioGroup_Padding_Top")); |
|
|
|
|
|
|
|
topSpinner = new UISpinner(0, Integer.MAX_VALUE, 1, DesignerUtils.kDefaultVerticalPadding); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UILabel bottomLabel = new UILabel(Toolkit.i18nText("Fine-Plugin-RadioGroup_Padding_Bottom")); |
|
|
|
|
|
|
|
bottomSpinner = new UISpinner(0, Integer.MAX_VALUE, 1, DesignerUtils.kDefaultVerticalPadding); |
|
|
|
|
|
|
|
JPanel topSpinnerPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{topLabel, topSpinner}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_SMALL); |
|
|
|
|
|
|
|
JPanel bottomSpinnerPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{bottomLabel, bottomSpinner}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_SMALL); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{topSpinnerPanel, bottomSpinnerPanel}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_W1, LayoutConstants.VGAP_SMALL); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
private JPanel initHPaddingConfig() { |
|
|
|
|
|
|
|
UILabel leftLabel = new UILabel(Toolkit.i18nText("Fine-Plugin-RadioGroup_Padding_Left")); |
|
|
|
|
|
|
|
leftSpinner = new UISpinner(0, Integer.MAX_VALUE, 1, DesignerUtils.kDefaultHorizontalPadding); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UILabel rightLabel = new UILabel(Toolkit.i18nText("Fine-Plugin-RadioGroup_Padding_Right")); |
|
|
|
|
|
|
|
rightSpinner = new UISpinner(0, Integer.MAX_VALUE, 1, DesignerUtils.kDefaultHorizontalPadding); |
|
|
|
|
|
|
|
JPanel leftSpinnerPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{leftLabel, leftSpinner}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_SMALL); |
|
|
|
|
|
|
|
JPanel rightSpinnerPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{rightLabel, rightSpinner}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_SMALL); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{leftSpinnerPanel, rightSpinnerPanel}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_W1, LayoutConstants.VGAP_SMALL); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void addPaddingPane() { |
|
|
|
|
|
|
|
centerPane.add(DesignerUtils.createTitleSplitLine(Toolkit.i18nText("Fine-Plugin-RadioGroup_Layout"))); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UILabel paddingHintLabel = DesignerUtils.createConfigLabel(Toolkit.i18nText("Fine-Plugin-RadioGroup_Button_Padding")); |
|
|
|
|
|
|
|
UILabel emptyHintLabel = DesignerUtils.createConfigLabel(Toolkit.i18nText("")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UILabel layoutTypeLabel = DesignerUtils.createConfigLabel(Toolkit.i18nText("Fine-Plugin-RadioGroup_Layout_Type")); |
|
|
|
|
|
|
|
initLayoutCombo(); |
|
|
|
|
|
|
|
initButtonAlignPane(); |
|
|
|
|
|
|
|
initColumnSizePane(); |
|
|
|
|
|
|
|
|
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
double[] rowSize = {p, p, p}; |
|
|
|
double[] rowSize = {p, p, p}; |
|
|
|
double[] columnSize = {p, p}; |
|
|
|
double[] columnSize = {p, p}; |
|
|
|
JPanel paddingPanel = TableLayoutHelper.createCommonTableLayoutPane(new Component[][]{ |
|
|
|
JPanel paddingPanel = TableLayoutHelper.createCommonTableLayoutPane(new Component[][]{ |
|
|
|
{paddingHintLabel, vPaddingSpinnerPanel}, |
|
|
|
{paddingHintLabel, initVPaddingConfig()}, |
|
|
|
{emptyHintLabel, hPaddingSpinnerPanel}, |
|
|
|
{emptyHintLabel, initHPaddingConfig()}, |
|
|
|
{layoutTypeLabel, layoutTypeCombo}, |
|
|
|
{layoutTypeLabel, layoutTypeCombo}, |
|
|
|
}, rowSize, columnSize, 10); |
|
|
|
}, rowSize, columnSize, 10); |
|
|
|
|
|
|
|
|
|
|
@ -206,13 +225,11 @@ public class ImageCustomDefinePane extends MobileStyleCustomDefinePane { |
|
|
|
centerPane.add(columnSizePane); |
|
|
|
centerPane.add(columnSizePane); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void addIconPane() { |
|
|
|
/** |
|
|
|
centerPane.add(DesignerUtils.createTitleSplitLine(Toolkit.i18nText("Fine-Plugin-RadioGroup_Icon"))); |
|
|
|
* 初始化默认字体配置面版 |
|
|
|
|
|
|
|
*/ |
|
|
|
UILabel initialLabel = DesignerUtils.createConfigLabel(Toolkit.i18nText("Fine-Plugin-RadioGroup_Icon_Init")); |
|
|
|
private void initInitialIconConfigPane() { |
|
|
|
UILabel selectedLabel = DesignerUtils.createConfigLabel(Toolkit.i18nText("Fine-Plugin-RadioGroup_Icon_Select")); |
|
|
|
|
|
|
|
initialIconConfigPane = new IconConfigPane(8, true); |
|
|
|
initialIconConfigPane = new IconConfigPane(8, true); |
|
|
|
selectedIconConfigPane = new IconConfigPane(8, true); |
|
|
|
|
|
|
|
initialIconConfigPane.addAddCountListener(new ChangeListener() { |
|
|
|
initialIconConfigPane.addAddCountListener(new ChangeListener() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
@ -227,6 +244,13 @@ public class ImageCustomDefinePane extends MobileStyleCustomDefinePane { |
|
|
|
selectedIconConfigPane.deleteCount(); |
|
|
|
selectedIconConfigPane.deleteCount(); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 初始化选择字体配置面板 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private void initSelectedIconConfigPane() { |
|
|
|
|
|
|
|
selectedIconConfigPane = new IconConfigPane(8, true); |
|
|
|
selectedIconConfigPane.addAddCountListener(new ChangeListener() { |
|
|
|
selectedIconConfigPane.addAddCountListener(new ChangeListener() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
@ -241,6 +265,14 @@ public class ImageCustomDefinePane extends MobileStyleCustomDefinePane { |
|
|
|
selectedIconConfigPane.deleteCount(); |
|
|
|
selectedIconConfigPane.deleteCount(); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
private void addIconPane() { |
|
|
|
|
|
|
|
centerPane.add(DesignerUtils.createTitleSplitLine(Toolkit.i18nText("Fine-Plugin-RadioGroup_Icon"))); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UILabel initialLabel = DesignerUtils.createConfigLabel(Toolkit.i18nText("Fine-Plugin-RadioGroup_Icon_Init")); |
|
|
|
|
|
|
|
UILabel selectedLabel = DesignerUtils.createConfigLabel(Toolkit.i18nText("Fine-Plugin-RadioGroup_Icon_Select")); |
|
|
|
|
|
|
|
initInitialIconConfigPane(); |
|
|
|
|
|
|
|
initSelectedIconConfigPane(); |
|
|
|
JPanel container = FRGUIPaneFactory.createVerticalFlowLayout_Pane(true, FlowLayout.LEADING, 0, 5); |
|
|
|
JPanel container = FRGUIPaneFactory.createVerticalFlowLayout_Pane(true, FlowLayout.LEADING, 0, 5); |
|
|
|
|
|
|
|
|
|
|
|
JPanel initialPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
|
JPanel initialPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
@ -261,7 +293,7 @@ public class ImageCustomDefinePane extends MobileStyleCustomDefinePane { |
|
|
|
|
|
|
|
|
|
|
|
UILabel initialFontLabel = DesignerUtils.createConfigLabel(Toolkit.i18nText("Fine-Plugin-RadioGroup_Font_init")); |
|
|
|
UILabel initialFontLabel = DesignerUtils.createConfigLabel(Toolkit.i18nText("Fine-Plugin-RadioGroup_Font_init")); |
|
|
|
initialFontConfPane = new FontConfigPane(); |
|
|
|
initialFontConfPane = new FontConfigPane(); |
|
|
|
initialFontConfPane.setFontColor(new Color(204, 204, 204)); |
|
|
|
initialFontConfPane.setFontColor(new Color(102, 102, 102)); |
|
|
|
JPanel fontPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{initialFontLabel, initialFontConfPane}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_MEDIUM); |
|
|
|
JPanel fontPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{initialFontLabel, initialFontConfPane}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_MEDIUM); |
|
|
|
centerPane.add(fontPanel); |
|
|
|
centerPane.add(fontPanel); |
|
|
|
UILabel selectedFontLabel = DesignerUtils.createConfigLabel(Toolkit.i18nText("Fine-Plugin-RadioGroup_Font_Select")); |
|
|
|
UILabel selectedFontLabel = DesignerUtils.createConfigLabel(Toolkit.i18nText("Fine-Plugin-RadioGroup_Font_Select")); |
|
|
|