|
|
@ -7,8 +7,10 @@ package com.fr.design.gui.style; |
|
|
|
import com.fr.base.BaseUtils; |
|
|
|
import com.fr.base.BaseUtils; |
|
|
|
import com.fr.base.Style; |
|
|
|
import com.fr.base.Style; |
|
|
|
import com.fr.design.ExtraDesignClassManager; |
|
|
|
import com.fr.design.ExtraDesignClassManager; |
|
|
|
|
|
|
|
import com.fr.design.constants.LayoutConstants; |
|
|
|
import com.fr.design.event.GlobalNameListener; |
|
|
|
import com.fr.design.event.GlobalNameListener; |
|
|
|
import com.fr.design.event.GlobalNameObserver; |
|
|
|
import com.fr.design.event.GlobalNameObserver; |
|
|
|
|
|
|
|
import com.fr.design.foldablepane.UIExpandablePane; |
|
|
|
import com.fr.design.fun.IndentationUnitProcessor; |
|
|
|
import com.fr.design.fun.IndentationUnitProcessor; |
|
|
|
import com.fr.design.gui.frpane.UINumberDragPane; |
|
|
|
import com.fr.design.gui.frpane.UINumberDragPane; |
|
|
|
import com.fr.design.gui.ibutton.UIButtonGroup; |
|
|
|
import com.fr.design.gui.ibutton.UIButtonGroup; |
|
|
@ -37,9 +39,9 @@ import java.util.Arrays; |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameObserver { |
|
|
|
public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameObserver { |
|
|
|
private static final int ANGEL = 90; |
|
|
|
private static final int ANGEL = 90; |
|
|
|
|
|
|
|
private static final Dimension SPINNER_DIMENSION = new Dimension(60, 20); |
|
|
|
private static final String[] TEXT = {Inter.getLocText("StyleAlignment-Wrap_Text"), Inter.getLocText("StyleAlignment-Single_Line"), |
|
|
|
private static final String[] TEXT = {Inter.getLocText("FR-Designer_StyleAlignment_Wrap_Text"), Inter.getLocText("FR-Designer_StyleAlignment_Single_Line"), |
|
|
|
Inter.getLocText("StyleAlignment-Single_Line(Adjust_Font)"), Inter.getLocText("StyleAlignment-Multi_Line(Adjust_Font)")}; |
|
|
|
Inter.getLocText("FR-Designer_StyleAlignment_Single_Line(Adjust_Font)"), Inter.getLocText("FR-Designer_StyleAlignment_Multi_Line(Adjust_Font)")}; |
|
|
|
|
|
|
|
|
|
|
|
private static final String[] LAYOUT = {Inter.getLocText("FR-Designer-StyleAlignment_Layout_Default"), Inter.getLocText("FR-Designer-StyleAlignment_Layout_Image_Titled"), |
|
|
|
private static final String[] LAYOUT = {Inter.getLocText("FR-Designer-StyleAlignment_Layout_Default"), Inter.getLocText("FR-Designer-StyleAlignment_Layout_Image_Titled"), |
|
|
|
Inter.getLocText("FR-Designer-StyleAlignment_Layout_Image_Extend"), Inter.getLocText("FR-Designer-StyleAlignment_Layout_Image_Adjust")}; |
|
|
|
Inter.getLocText("FR-Designer-StyleAlignment_Layout_Image_Extend"), Inter.getLocText("FR-Designer-StyleAlignment_Layout_Image_Adjust")}; |
|
|
@ -47,6 +49,8 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO |
|
|
|
private JPanel hPaneContainer; |
|
|
|
private JPanel hPaneContainer; |
|
|
|
private JPanel vPaneContainer; |
|
|
|
private JPanel vPaneContainer; |
|
|
|
private JPanel rotationBarCC; |
|
|
|
private JPanel rotationBarCC; |
|
|
|
|
|
|
|
private JPanel basicPane; |
|
|
|
|
|
|
|
private JPanel seniorPane; |
|
|
|
|
|
|
|
|
|
|
|
private UIComboBox textComboBox; |
|
|
|
private UIComboBox textComboBox; |
|
|
|
private UIComboBox textRotationComboBox; |
|
|
|
private UIComboBox textRotationComboBox; |
|
|
@ -70,6 +74,7 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO |
|
|
|
this.initComponents(); |
|
|
|
this.initComponents(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected void initComponents() { |
|
|
|
protected void initComponents() { |
|
|
|
textComboBox = new UIComboBox(TEXT); |
|
|
|
textComboBox = new UIComboBox(TEXT); |
|
|
|
imageLayoutComboBox = new UIComboBox(LAYOUT); |
|
|
|
imageLayoutComboBox = new UIComboBox(LAYOUT); |
|
|
@ -83,7 +88,7 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO |
|
|
|
Integer[] hAlignment = new Integer[]{Constants.LEFT, Constants.CENTER, Constants.RIGHT, Integer.valueOf(Constants.DISTRIBUTED), Constants.NULL}; |
|
|
|
Integer[] hAlignment = new Integer[]{Constants.LEFT, Constants.CENTER, Constants.RIGHT, Integer.valueOf(Constants.DISTRIBUTED), Constants.NULL}; |
|
|
|
hAlignmentPane = new UIButtonGroup<Integer>(hAlignmentIconArray, hAlignment); |
|
|
|
hAlignmentPane = new UIButtonGroup<Integer>(hAlignmentIconArray, hAlignment); |
|
|
|
hAlignmentPane.setAllToolTips(new String[]{Inter.getLocText("FR-Designer-StyleAlignment_Tooltips_Left"), Inter.getLocText("FR-Designer-StyleAlignment_Tooltips_Center"), Inter.getLocText("FR-Designer-StyleAlignment_Tooltips_Right"), |
|
|
|
hAlignmentPane.setAllToolTips(new String[]{Inter.getLocText("FR-Designer-StyleAlignment_Tooltips_Left"), Inter.getLocText("FR-Designer-StyleAlignment_Tooltips_Center"), Inter.getLocText("FR-Designer-StyleAlignment_Tooltips_Right"), |
|
|
|
Inter.getLocText("FR-Designer-StyleAlignment_Tooltips_Distributed"),Inter.getLocText("FR-Designer-StyleAlignment_Tooltips_DEFAULT")}); |
|
|
|
Inter.getLocText("FR-Designer-StyleAlignment_Tooltips_Distributed"), Inter.getLocText("FR-Designer-StyleAlignment_Tooltips_DEFAULT")}); |
|
|
|
hPaneContainer = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0)); |
|
|
|
hPaneContainer = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0)); |
|
|
|
vPaneContainer = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0)); |
|
|
|
vPaneContainer = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0)); |
|
|
|
|
|
|
|
|
|
|
@ -97,7 +102,7 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO |
|
|
|
initAllNames(); |
|
|
|
initAllNames(); |
|
|
|
|
|
|
|
|
|
|
|
indentationUnitProcessor = ExtraDesignClassManager.getInstance().getSingle(IndentationUnitProcessor.MARK_STRING); |
|
|
|
indentationUnitProcessor = ExtraDesignClassManager.getInstance().getSingle(IndentationUnitProcessor.MARK_STRING); |
|
|
|
if (null == indentationUnitProcessor){ |
|
|
|
if (null == indentationUnitProcessor) { |
|
|
|
indentationUnitProcessor = new DefaultIndentationUnitProcessor(); |
|
|
|
indentationUnitProcessor = new DefaultIndentationUnitProcessor(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -132,7 +137,7 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void initTextRotationCombox(){ |
|
|
|
private void initTextRotationCombox() { |
|
|
|
ArrayList<String> selectOption = new ArrayList<String>(); |
|
|
|
ArrayList<String> selectOption = new ArrayList<String>(); |
|
|
|
selectOption.add(Inter.getLocText("FR-Designer_Custom-Angle")); |
|
|
|
selectOption.add(Inter.getLocText("FR-Designer_Custom-Angle")); |
|
|
|
VerticalTextProcessor processor = ExtraClassManager.getInstance().getSingle(VerticalTextProcessor.XML_TAG, DefaultVerticalTextProcessor.class); |
|
|
|
VerticalTextProcessor processor = ExtraClassManager.getInstance().getSingle(VerticalTextProcessor.XML_TAG, DefaultVerticalTextProcessor.class); |
|
|
@ -144,68 +149,89 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO |
|
|
|
private void initAllNames() { |
|
|
|
private void initAllNames() { |
|
|
|
hAlignmentPane.setGlobalName(Inter.getLocText("FR-Designer-StyleAlignment_Pane_Horizontal")); |
|
|
|
hAlignmentPane.setGlobalName(Inter.getLocText("FR-Designer-StyleAlignment_Pane_Horizontal")); |
|
|
|
vAlignmentPane.setGlobalName(Inter.getLocText("FR-Designer-StyleAlignment_Pane_Vertical")); |
|
|
|
vAlignmentPane.setGlobalName(Inter.getLocText("FR-Designer-StyleAlignment_Pane_Vertical")); |
|
|
|
imageLayoutComboBox.setGlobalName(Inter.getLocText("Image-Image_Layout")); |
|
|
|
imageLayoutComboBox.setGlobalName(Inter.getLocText("FR-Designer_Image_Layout")); |
|
|
|
textComboBox.setGlobalName(Inter.getLocText("StyleAlignment-Text_Style")); |
|
|
|
textComboBox.setGlobalName(Inter.getLocText("FR-Designer_StyleAlignment_Text_Style")); |
|
|
|
textRotationComboBox.setGlobalName(Inter.getLocText("StyleAlignment-Text_Rotation")); |
|
|
|
textRotationComboBox.setGlobalName(Inter.getLocText("FR-Designer_StyleAlignment_Text_Rotation")); |
|
|
|
rotationPane.setGlobalName(Inter.getLocText("StyleAlignment-Text_Rotation")); |
|
|
|
rotationPane.setGlobalName(Inter.getLocText("FR-Designer_StyleAlignment_Text_Rotation")); |
|
|
|
leftIndentSpinner.setGlobalName(Inter.getLocText("Style-Left_Indent")); |
|
|
|
leftIndentSpinner.setGlobalName(Inter.getLocText("FR-Designer_Style_Left_Indent")); |
|
|
|
rightIndentSpinner.setGlobalName(Inter.getLocText("Style-Right_Indent")); |
|
|
|
rightIndentSpinner.setGlobalName(Inter.getLocText("FR-Designer_Style_Right_Indent")); |
|
|
|
spaceBeforeSpinner.setGlobalName(Inter.getLocText("Style-Spacing_Before")); |
|
|
|
spaceBeforeSpinner.setGlobalName(Inter.getLocText("FR-Designer_Style_Spacing_Before")); |
|
|
|
spaceAfterSpinner.setGlobalName(Inter.getLocText("Style-Spacing_After")); |
|
|
|
spaceAfterSpinner.setGlobalName(Inter.getLocText("FR-Designer_Style_Spacing_After")); |
|
|
|
lineSpaceSpinner.setGlobalName(Inter.getLocText("Style-Line_Spacing")); |
|
|
|
lineSpaceSpinner.setGlobalName(Inter.getLocText("FR-Designer_Style_Line_Spacing")); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private JPanel createPane() { |
|
|
|
private JPanel createPane() { |
|
|
|
JPanel jp1 = new JPanel(new BorderLayout(0, 10)); |
|
|
|
JPanel jp1 = new JPanel(new BorderLayout()); |
|
|
|
JPanel jp2 = new JPanel(new BorderLayout(0, 10)); |
|
|
|
basicPane = new JPanel(); |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
seniorPane = new JPanel(); |
|
|
|
|
|
|
|
basicPane = new UIExpandablePane(Inter.getLocText("FR-Designer_Basic"), 290, 20, basicPane()); |
|
|
|
|
|
|
|
seniorPane = new UIExpandablePane(Inter.getLocText("FR-Designer_Advanced"), 290, 20, seniorPane()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
jp1.add(basicPane, BorderLayout.NORTH); |
|
|
|
|
|
|
|
jp1.add(seniorPane, BorderLayout.CENTER); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return jp1; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private JPanel basicPane() { |
|
|
|
double f = TableLayout.FILL; |
|
|
|
double f = TableLayout.FILL; |
|
|
|
double[] columnSize1 = {p, f}; |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
double[] rowSize1 = {p, p, p, p, p, p, p, p, p, p, p, p, p, p}; |
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
Component[][] components1 = new Component[][]{ |
|
|
|
new Component[]{null, null}, |
|
|
|
new Component[]{new UILabel(Inter.getLocText("FR-Designer-StyleAlignment_Pane_Style")), null}, |
|
|
|
new Component[]{new UILabel(Inter.getLocText("FR-Designer-StyleAlignment_Pane_Horizontal") + " ", SwingConstants.LEFT), hPaneContainer}, |
|
|
|
new Component[]{new UILabel(Inter.getLocText("FR-Designer-StyleAlignment_Pane_Horizontal") + ":", UILabel.RIGHT), hPaneContainer}, |
|
|
|
new Component[]{null, null}, |
|
|
|
new Component[]{new UILabel(Inter.getLocText("FR-Designer-StyleAlignment_Pane_Vertical") + ":", UILabel.RIGHT), vPaneContainer}, |
|
|
|
new Component[]{new UILabel(Inter.getLocText("FR-Designer-StyleAlignment_Pane_Vertical") + " ", SwingConstants.RIGHT), vPaneContainer}, |
|
|
|
new Component[]{new JSeparator(JSeparator.HORIZONTAL), null}, |
|
|
|
new Component[]{null, null} |
|
|
|
new Component[]{new UILabel(Inter.getLocText("Image-Image_Layout")), null}, |
|
|
|
|
|
|
|
new Component[]{imageLayoutComboBox, null}, |
|
|
|
|
|
|
|
new Component[]{new JSeparator(JSeparator.HORIZONTAL), null}, |
|
|
|
|
|
|
|
new Component[]{new UILabel(Inter.getLocText("StyleAlignment-Text_Style")), null}, |
|
|
|
|
|
|
|
new Component[]{textComboBox, null}, |
|
|
|
|
|
|
|
new Component[]{new JSeparator(JSeparator.HORIZONTAL), null}, |
|
|
|
|
|
|
|
new Component[]{new UILabel(Inter.getLocText("StyleAlignment-Text_Rotation")), null}, |
|
|
|
|
|
|
|
new Component[]{textRotationComboBox, null}, |
|
|
|
|
|
|
|
new Component[]{rotationBarCC, null}, |
|
|
|
|
|
|
|
new Component[]{new JSeparator(JSeparator.HORIZONTAL), null}, |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
double[] rowSize = {p, p, p, p, p, p}; |
|
|
|
|
|
|
|
double[] columnSize = {p, f}; |
|
|
|
|
|
|
|
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}}; |
|
|
|
|
|
|
|
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_MEDIUM); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
double[] columnSize2 = {p, f}; |
|
|
|
private JPanel seniorPane() { |
|
|
|
double[] rowSize2 = {p, p, p, p}; |
|
|
|
JPanel senPane = new JPanel(new BorderLayout()); |
|
|
|
Component[][] components2 = new Component[][]{ |
|
|
|
double f = TableLayout.FILL; |
|
|
|
new Component[]{new UILabel(Inter.getLocText("FR-Designer-StyleAlignment_Style_Indentation")), null}, |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
new Component[]{new UILabel(Inter.getLocText("Style-Left_Indent") + ":", SwingConstants.RIGHT), creatSpinnerPane(leftIndentSpinner)}, |
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
new Component[]{new UILabel(Inter.getLocText("Style-Right_Indent") + ":", SwingConstants.RIGHT), creatSpinnerPane(rightIndentSpinner)}, |
|
|
|
new Component[]{null, null}, |
|
|
|
new Component[]{new JSeparator(JSeparator.HORIZONTAL), null}, |
|
|
|
new Component[]{new UILabel((Inter.getLocText("FR-Designer_Image_Layout")) + " ", SwingConstants.LEFT), imageLayoutComboBox}, |
|
|
|
|
|
|
|
new Component[]{null, null}, |
|
|
|
|
|
|
|
new Component[]{new UILabel(Inter.getLocText("FR-Designer_StyleAlignment_Text_Style") + " ", SwingConstants.LEFT), textComboBox}, |
|
|
|
|
|
|
|
new Component[]{null, null}, |
|
|
|
|
|
|
|
new Component[]{new UILabel(Inter.getLocText("FR-Designer_StyleAlignment_Text_Rotation") + " ", SwingConstants.LEFT), textRotationComboBox}, |
|
|
|
|
|
|
|
new Component[]{null, rotationBarCC}, |
|
|
|
|
|
|
|
new Component[]{null, null}, |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
double[] rowSize = {p, p, p, p, p, p, p, p}; |
|
|
|
|
|
|
|
double[] columnSize = {p, f}; |
|
|
|
|
|
|
|
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}}; |
|
|
|
|
|
|
|
JPanel tempPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_MEDIUM); |
|
|
|
|
|
|
|
senPane.add(tempPane, BorderLayout.NORTH); |
|
|
|
|
|
|
|
senPane.add(seniorDownPane(), BorderLayout.CENTER); |
|
|
|
|
|
|
|
return senPane; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
double[] columnSize3 = {p, f}; |
|
|
|
private JPanel seniorDownPane() { |
|
|
|
double[] rowSize3 = {p, p, p, p}; |
|
|
|
double f = TableLayout.FILL; |
|
|
|
Component[][] components3 = new Component[][]{ |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
new Component[]{new UILabel(Inter.getLocText("FR-Designer-StyleAlignment_Style_Spacing")), null}, |
|
|
|
leftIndentSpinner.setPreferredSize(SPINNER_DIMENSION); |
|
|
|
new Component[]{new UILabel(Inter.getLocText("Style-Spacing_Before") + ":", SwingConstants.RIGHT), creatSpinnerPane(spaceBeforeSpinner)}, |
|
|
|
rightIndentSpinner.setPreferredSize(SPINNER_DIMENSION); |
|
|
|
new Component[]{new UILabel(Inter.getLocText("Style-Spacing_After") + ":", SwingConstants.RIGHT), creatSpinnerPane(spaceAfterSpinner)}, |
|
|
|
spaceBeforeSpinner.setPreferredSize(SPINNER_DIMENSION); |
|
|
|
new Component[]{new UILabel(Inter.getLocText("Style-Line_Spacing") + ":", SwingConstants.RIGHT), creatSpinnerPane(lineSpaceSpinner)}, |
|
|
|
spaceAfterSpinner.setPreferredSize(SPINNER_DIMENSION); |
|
|
|
|
|
|
|
lineSpaceSpinner.setPreferredSize(SPINNER_DIMENSION); |
|
|
|
|
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
|
|
|
|
new Component[]{null, null, null}, |
|
|
|
|
|
|
|
new Component[]{new UILabel((Inter.getLocText("FR-Designer-StyleAlignment_Style_Indentation")) + " ", SwingConstants.LEFT), creatSpinnerPane(leftIndentSpinner), creatSpinnerPane(rightIndentSpinner)}, |
|
|
|
|
|
|
|
new Component[]{null, new UILabel((Inter.getLocText("FR-Designer_Left")), SwingConstants.CENTER), new UILabel((Inter.getLocText("FR-Designer_Right")), SwingConstants.CENTER)}, |
|
|
|
|
|
|
|
new Component[]{new UILabel((Inter.getLocText("FR-Designer-StyleAlignment_Style_PartSpacing")) + " ", SwingConstants.LEFT), creatSpinnerPane(spaceBeforeSpinner), creatSpinnerPane(spaceAfterSpinner)}, |
|
|
|
|
|
|
|
new Component[]{null, new UILabel((Inter.getLocText("FR-Designer_Front")), SwingConstants.CENTER), new UILabel((Inter.getLocText("FR-Designer_Behind")), SwingConstants.CENTER)}, |
|
|
|
|
|
|
|
new Component[]{new UILabel((Inter.getLocText("FR-Designer_Style_Line_Spacing")) + " ", SwingConstants.LEFT), creatSpinnerPane(lineSpaceSpinner), null}, |
|
|
|
}; |
|
|
|
}; |
|
|
|
JPanel northPane = TableLayoutHelper.createTableLayoutPane(components1, rowSize1, columnSize1); |
|
|
|
double[] rowSize = {p, p, p, p, p, p}; |
|
|
|
JPanel centerPane = TableLayoutHelper.createTableLayoutPane(components2, rowSize2, columnSize2); |
|
|
|
double[] columnSize = {p, f, f}; |
|
|
|
JPanel southPane = TableLayoutHelper.createTableLayoutPane(components3, rowSize3, columnSize3); |
|
|
|
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); |
|
|
|
|
|
|
|
|
|
|
|
jp2.add(centerPane, BorderLayout.NORTH); |
|
|
|
|
|
|
|
jp2.add(southPane, BorderLayout.CENTER); |
|
|
|
|
|
|
|
jp1.add(northPane, BorderLayout.NORTH); |
|
|
|
|
|
|
|
jp1.add(jp2, BorderLayout.CENTER); |
|
|
|
|
|
|
|
return jp1; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private JPanel creatSpinnerPane(Component comp) { |
|
|
|
private JPanel creatSpinnerPane(Component comp) { |
|
|
@ -216,6 +242,7 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 标题 |
|
|
|
* 标题 |
|
|
|
|
|
|
|
* |
|
|
|
* @return 标题 |
|
|
|
* @return 标题 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public String title4PopupWindow() { |
|
|
|
public String title4PopupWindow() { |
|
|
@ -292,7 +319,7 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("StyleAlignment-Text_Style"))) { |
|
|
|
if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("FR-Designer_StyleAlignment_Text_Style"))) { |
|
|
|
if (ComparatorUtils.equals(this.textComboBox.getSelectedItem(), TEXT[0])) { |
|
|
|
if (ComparatorUtils.equals(this.textComboBox.getSelectedItem(), TEXT[0])) { |
|
|
|
style = style.deriveTextStyle(Style.TEXTSTYLE_WRAPTEXT); |
|
|
|
style = style.deriveTextStyle(Style.TEXTSTYLE_WRAPTEXT); |
|
|
|
} else if (ComparatorUtils.equals(this.textComboBox.getSelectedItem(), TEXT[1])) { |
|
|
|
} else if (ComparatorUtils.equals(this.textComboBox.getSelectedItem(), TEXT[1])) { |
|
|
@ -312,7 +339,7 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private Style updateImageLayout(Style style) { |
|
|
|
private Style updateImageLayout(Style style) { |
|
|
|
if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("Image-Image_Layout"))) { |
|
|
|
if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("FR-Designer_Image_Layout"))) { |
|
|
|
if (ComparatorUtils.equals(this.imageLayoutComboBox.getSelectedItem(), LAYOUT[1])) { |
|
|
|
if (ComparatorUtils.equals(this.imageLayoutComboBox.getSelectedItem(), LAYOUT[1])) { |
|
|
|
style = style.deriveImageLayout(Constants.IMAGE_TILED); |
|
|
|
style = style.deriveImageLayout(Constants.IMAGE_TILED); |
|
|
|
} else if (ComparatorUtils.equals(this.imageLayoutComboBox.getSelectedItem(), LAYOUT[2])) { |
|
|
|
} else if (ComparatorUtils.equals(this.imageLayoutComboBox.getSelectedItem(), LAYOUT[2])) { |
|
|
@ -328,7 +355,7 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private Style updateTextRotation(Style style) { |
|
|
|
private Style updateTextRotation(Style style) { |
|
|
|
if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("StyleAlignment-Text_Rotation"))) { |
|
|
|
if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("FR-Designer_StyleAlignment_Text_Rotation"))) { |
|
|
|
if (this.textRotationComboBox.getSelectedIndex() != 0) { |
|
|
|
if (this.textRotationComboBox.getSelectedIndex() != 0) { |
|
|
|
style = style.deriveVerticalText(Style.VERTICALTEXT); |
|
|
|
style = style.deriveVerticalText(Style.VERTICALTEXT); |
|
|
|
style = style.deriveRotation(0); |
|
|
|
style = style.deriveRotation(0); |
|
|
@ -342,21 +369,21 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private Style updateOther(Style style) { |
|
|
|
private Style updateOther(Style style) { |
|
|
|
if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("Style-Left_Indent"))) { |
|
|
|
if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("FR-Designer_Style_Left_Indent"))) { |
|
|
|
style = style.derivePaddingLeft(indentationUnitProcessor.paddingUnitGainFromSpinner((int)(this.leftIndentSpinner.getValue()))); |
|
|
|
style = style.derivePaddingLeft(indentationUnitProcessor.paddingUnitGainFromSpinner((int) (this.leftIndentSpinner.getValue()))); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("Style-Right_Indent"))) { |
|
|
|
if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("FR-Designer_Style_Right_Indent"))) { |
|
|
|
style = style.derivePaddingRight(indentationUnitProcessor.paddingUnitGainFromSpinner((int)(this.rightIndentSpinner.getValue()))); |
|
|
|
style = style.derivePaddingRight(indentationUnitProcessor.paddingUnitGainFromSpinner((int) (this.rightIndentSpinner.getValue()))); |
|
|
|
} |
|
|
|
} |
|
|
|
//间距
|
|
|
|
//间距
|
|
|
|
if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("Style-Spacing_Before"))) { |
|
|
|
if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("FR-Designer_Style_Spacing_Before"))) { |
|
|
|
style = style.deriveSpacingBefore((int) (this.spaceBeforeSpinner.getValue())); |
|
|
|
style = style.deriveSpacingBefore((int) (this.spaceBeforeSpinner.getValue())); |
|
|
|
} |
|
|
|
} |
|
|
|
if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("Style-Spacing_After"))) { |
|
|
|
if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("FR-Designer_Style_Spacing_After"))) { |
|
|
|
style = style.deriveSpacingAfter((int) (this.spaceAfterSpinner.getValue())); |
|
|
|
style = style.deriveSpacingAfter((int) (this.spaceAfterSpinner.getValue())); |
|
|
|
} |
|
|
|
} |
|
|
|
if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("Style-Line_Spacing"))) { |
|
|
|
if (ComparatorUtils.equals(globalNameListener.getGlobalName(), Inter.getLocText("FR-Designer_Style_Line_Spacing"))) { |
|
|
|
style = style.deriveLineSpacing((int) (this.lineSpaceSpinner.getValue())); |
|
|
|
style = style.deriveLineSpacing((int) (this.lineSpaceSpinner.getValue())); |
|
|
|
} |
|
|
|
} |
|
|
|
return style; |
|
|
|
return style; |
|
|
@ -381,7 +408,6 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* |
|
|
|
|
|
|
|
* @param name |
|
|
|
* @param name |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void setGlobalName(String name) { |
|
|
|
public void setGlobalName(String name) { |
|
|
|