|
|
|
@ -33,6 +33,8 @@ public class UniteStyleDefinePane extends MobileTemplateStyleDefinePane {
|
|
|
|
|
|
|
|
|
|
private UnsignedIntUISpinner paddingLeftSpinner; |
|
|
|
|
private UnsignedIntUISpinner paddingRightSpinner; |
|
|
|
|
private UnsignedIntUISpinner paddingTopSpinner; |
|
|
|
|
private UnsignedIntUISpinner paddingBottomSpinner; |
|
|
|
|
|
|
|
|
|
private NewColorSelectBox initialBackgroundColorBox; |
|
|
|
|
private NewColorSelectBox selectedBackgroundColorBox; |
|
|
|
@ -77,6 +79,15 @@ public class UniteStyleDefinePane extends MobileTemplateStyleDefinePane {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private JPanel createPaddingConfPane() { |
|
|
|
|
this.paddingTopSpinner = new UnsignedIntUISpinner(0, 30, 1, UniteStyle.DEFAULT_PADDING_TOP); |
|
|
|
|
this.paddingTopSpinner.setPreferredSize(new Dimension(62, LINE_COMPONENT_HEIGHT)); |
|
|
|
|
this.paddingBottomSpinner = new UnsignedIntUISpinner(0, 30, 1, UniteStyle.DEFAULT_PADDING_BOTTOM); |
|
|
|
|
this.paddingBottomSpinner.setPreferredSize(new Dimension(62, LINE_COMPONENT_HEIGHT)); |
|
|
|
|
|
|
|
|
|
UILabel paddingTopLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Base_Top") + ":", SwingConstants.RIGHT); |
|
|
|
|
paddingTopLabel.setPreferredSize(new Dimension(LABEL_WIDTH, LINE_COMPONENT_HEIGHT)); |
|
|
|
|
UILabel paddingBottomLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Base_Bottom") + ":", SwingConstants.RIGHT); |
|
|
|
|
paddingBottomLabel.setPreferredSize(new Dimension(LABEL_WIDTH / 2, LINE_COMPONENT_HEIGHT)); |
|
|
|
|
|
|
|
|
|
this.paddingLeftSpinner = new UnsignedIntUISpinner(0, Integer.MAX_VALUE, 1, UniteStyle.DEFAULT_PADDING_LEFT); |
|
|
|
|
this.paddingLeftSpinner.setPreferredSize(new Dimension(62, LINE_COMPONENT_HEIGHT)); |
|
|
|
@ -86,11 +97,12 @@ public class UniteStyleDefinePane extends MobileTemplateStyleDefinePane {
|
|
|
|
|
UILabel paddingLeftLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Left") + ":", SwingConstants.RIGHT); |
|
|
|
|
paddingLeftLabel.setPreferredSize(new Dimension(LABEL_WIDTH, LINE_COMPONENT_HEIGHT)); |
|
|
|
|
UILabel paddingRightLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Right") + ":", SwingConstants.RIGHT); |
|
|
|
|
paddingLeftLabel.setPreferredSize(new Dimension(LABEL_WIDTH, LINE_COMPONENT_HEIGHT)); |
|
|
|
|
paddingLeftLabel.setPreferredSize(new Dimension(LABEL_WIDTH / 2, LINE_COMPONENT_HEIGHT)); |
|
|
|
|
|
|
|
|
|
JPanel paddingPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{ |
|
|
|
|
paddingLeftLabel, paddingLeftSpinner, paddingRightLabel,paddingRightSpinner |
|
|
|
|
}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_MEDIUM); |
|
|
|
|
JPanel paddingPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{ |
|
|
|
|
new Component[]{ paddingTopLabel, paddingTopSpinner, paddingBottomLabel, paddingBottomSpinner}, |
|
|
|
|
new Component[]{ paddingLeftLabel, paddingLeftSpinner, paddingRightLabel,paddingRightSpinner} |
|
|
|
|
}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_MEDIUM); |
|
|
|
|
paddingPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 5, 20)); |
|
|
|
|
|
|
|
|
|
return paddingPanel; |
|
|
|
@ -164,6 +176,8 @@ public class UniteStyleDefinePane extends MobileTemplateStyleDefinePane {
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
protected void initDefaultConfig() { |
|
|
|
|
this.paddingTopSpinner.setValue(UniteStyle.DEFAULT_PADDING_TOP); |
|
|
|
|
this.paddingBottomSpinner.setValue(UniteStyle.DEFAULT_PADDING_BOTTOM); |
|
|
|
|
this.paddingLeftSpinner.setValue(UniteStyle.DEFAULT_PADDING_LEFT); |
|
|
|
|
this.paddingRightSpinner.setValue(UniteStyle.DEFAULT_PADDING_RIGHT); |
|
|
|
|
|
|
|
|
@ -191,6 +205,8 @@ public class UniteStyleDefinePane extends MobileTemplateStyleDefinePane {
|
|
|
|
|
@Override |
|
|
|
|
public void populateSubStyle(MobileTemplateStyle ob) { |
|
|
|
|
UniteStyle style = (UniteStyle) ob; |
|
|
|
|
this.paddingTopSpinner.setValue(style.getPaddingTop()); |
|
|
|
|
this.paddingBottomSpinner.setValue(style.getPaddingBottom()); |
|
|
|
|
this.paddingLeftSpinner.setValue(style.getPaddingLeft()); |
|
|
|
|
this.paddingRightSpinner.setValue(style.getPaddingRight()); |
|
|
|
|
|
|
|
|
@ -208,6 +224,8 @@ public class UniteStyleDefinePane extends MobileTemplateStyleDefinePane {
|
|
|
|
|
@Override |
|
|
|
|
public MobileTemplateStyle updateSubStyle() { |
|
|
|
|
UniteStyle style = new UniteStyle(); |
|
|
|
|
style.setPaddingTop((int) this.paddingTopSpinner.getValue()); |
|
|
|
|
style.setPaddingBottom((int) this.paddingBottomSpinner.getValue()); |
|
|
|
|
style.setPaddingLeft((int) this.paddingLeftSpinner.getValue()); |
|
|
|
|
style.setPaddingRight((int) this.paddingRightSpinner.getValue()); |
|
|
|
|
|
|
|
|
|