Browse Source

Merge pull request #226 in BA/design from ~NEIL/design:master to master

* commit 'ecfdfacebe598468cf68f6fe038c78954e984272':
  设计器无法保存文字竖排
master
superman 8 years ago
parent
commit
478cd0ff07
  1. 4
      designer_base/src/com/fr/design/gui/style/AlignmentPane.java
  2. 8
      designer_base/src/com/fr/design/style/AlignmentPane.java

4
designer_base/src/com/fr/design/gui/style/AlignmentPane.java

@ -136,9 +136,7 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO
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);
if (processor != null){
selectOption.addAll(Arrays.asList(processor.getComboxOption())); selectOption.addAll(Arrays.asList(processor.getComboxOption()));
}
textRotationComboBox = new UIComboBox(selectOption.toArray(new String[selectOption.size()])); textRotationComboBox = new UIComboBox(selectOption.toArray(new String[selectOption.size()]));
} }
@ -242,7 +240,7 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO
} else { } else {
this.textComboBox.setSelectedIndex(0); this.textComboBox.setSelectedIndex(0);
} }
if (style.getVerticalText() == Style.VERTICALTEXT && ExtraClassManager.getInstance().getSingle(VerticalTextProcessor.XML_TAG) != null) { if (style.getVerticalText() == Style.VERTICALTEXT) {
textRotationComboBox.setSelectedIndex(style.getTextDirection() == Style.LEFT_TO_RIGHT ? 1 : 2); textRotationComboBox.setSelectedIndex(style.getTextDirection() == Style.LEFT_TO_RIGHT ? 1 : 2);
} else { } else {
textRotationComboBox.setSelectedIndex(0); textRotationComboBox.setSelectedIndex(0);

8
designer_base/src/com/fr/design/style/AlignmentPane.java

@ -16,8 +16,6 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.ExtraClassManager;
import com.fr.report.fun.VerticalTextProcessor;
import com.fr.stable.CoreConstants; import com.fr.stable.CoreConstants;
import javax.swing.*; import javax.swing.*;
@ -126,9 +124,6 @@ public class AlignmentPane extends BasicPane {
directionBG.add(rightToLeftRB); directionBG.add(rightToLeftRB);
rightToLeftRB.setSelected(true); rightToLeftRB.setSelected(true);
if (ExtraClassManager.getInstance().getSingle(VerticalTextProcessor.XML_TAG) == null){
return;
}
isVerticalTextPanel.add(isVerticalTextCheckBox); isVerticalTextPanel.add(isVerticalTextCheckBox);
isVerticalTextPanel.add(leftToRightRB); isVerticalTextPanel.add(leftToRightRB);
isVerticalTextPanel.add(rightToLeftRB); isVerticalTextPanel.add(rightToLeftRB);
@ -302,9 +297,6 @@ public class AlignmentPane extends BasicPane {
} }
private void populateVertical(Style style){ private void populateVertical(Style style){
if (ExtraClassManager.getInstance().getSingle(VerticalTextProcessor.XML_TAG) == null){
return;
}
this.isVerticalTextCheckBox.setSelected(true); this.isVerticalTextCheckBox.setSelected(true);
this.rotationSpinner.setEnabled(false); this.rotationSpinner.setEnabled(false);
if (style.getTextDirection() == Style.LEFT_TO_RIGHT) { if (style.getTextDirection() == Style.LEFT_TO_RIGHT) {

Loading…
Cancel
Save