Browse Source

Merge pull request #1104 in BA/design from ~MOMEAK/design9.0:release/9.0 to release/9.0

* commit '4afd2d8ffa9c34d51f03e2507850cbf5d983cd54':
  PMD
  根据交互要求,增加缩放条输入框条件限制0-400的数字
  REPORT-3815 [9.0一轮回归]单元格属性样式缩进等输入数字每次只能输入一位 REPORT-4025 [9.0一轮回归]其他属性分页中默认勾选项无法取消勾线 REPORT-4022 [9.0一轮回归]选中一片单元格时对齐方式设置异常如附件图片 根据交互要求,增加缩放条输入框条件限制0-400的数字
master
superman 7 years ago
parent
commit
edd1b83116
  1. 7
      designer/src/com/fr/design/mainframe/CellElementPropertyPane.java
  2. 14
      designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java
  3. 17
      designer_base/src/com/fr/design/mainframe/JFormSliderPane.java
  4. 17
      designer_base/src/com/fr/design/mainframe/JSliderPane.java

7
designer/src/com/fr/design/mainframe/CellElementPropertyPane.java

@ -79,7 +79,7 @@ public class CellElementPropertyPane extends DockingView {
@Override
public void fireTitleChange(String addName) {
title.setText(Inter.getLocText("CellElement-Property_Table") + '-' + addName);
title.setText(Inter.getLocText("FR-Designer_CellElement_Property_Table") + '-' + addName);
}
};
@ -134,8 +134,7 @@ public class CellElementPropertyPane extends DockingView {
}
public void reInit(ElementCasePane ePane) {
if (titlePane.getParent() == null) { // 如果处于隐藏状态,则让其显示
// this.add(titlePane, BorderLayout.NORTH);
if (cellElementEditPane.getParent() == null) { // 如果处于隐藏状态,则让其显示
this.add(cellElementEditPane, BorderLayout.CENTER);
}
cellElementEditPane.populate(ePane);
@ -151,7 +150,7 @@ public class CellElementPropertyPane extends DockingView {
@Override
public String getViewTitle() {
return Inter.getLocText("CellElement-Property_Table");
return Inter.getLocText("FR-Designer_CellElement_Property_Table");
}
@Override

14
designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java

@ -10,7 +10,7 @@ import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UIPropertyTextField;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.JTemplate;
@ -48,9 +48,9 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
private UIComboBox showContent;
private UIPropertyTextField tooltipTextField;
private UITextField tooltipTextField;
private UIPropertyTextField fileNameTextField;
private UITextField fileNameTextField;
// 分页
private UICheckBox pageBeforeRowCheckBox;
@ -229,8 +229,8 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
final JPanel fileNamePane = new JPanel(fileNameLayout);
JPanel fileNameCCPane = new JPanel(new BorderLayout(4, 0));
fileNameCCPane.add(new UILabel(Inter.getLocText("FR-Designer_File_Name_For_Download")), BorderLayout.WEST);
fileNameTextField = new UIPropertyTextField();
tooltipTextField = new UIPropertyTextField();
fileNameTextField = new UITextField();
tooltipTextField = new UITextField();
tooltipTextField.getUI();
fileNamePane.add(new JPanel(), "none");
fileNamePane.add(fileNameCCPane, "content");
@ -452,10 +452,10 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_CellWrite_Page_After_Column"))) {
cellPageAttr.setPageAfterColumn(this.pageAfterColumnCheckBox.isSelected());
}
if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_CellWrite_Can_Break_On_Paginate"))) {
if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_CellPage_Can_Break_On_Paginate"))) {
cellPageAttr.setCanBreakOnPaginate(canBreakOnPaginateCheckBox.isSelected());
}
if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_CellWrite_Repeat_Content_When_Paging"))) {
if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_CellPage_Repeat_Content_When_Paging"))) {
cellPageAttr.setRepeat(this.repeatCheckBox.isSelected());
}

17
designer_base/src/com/fr/design/mainframe/JFormSliderPane.java

@ -16,6 +16,8 @@ import com.fr.general.Inter;
import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import javax.swing.text.DefaultFormatterFactory;
import javax.swing.text.NumberFormatter;
import java.awt.*;
import java.awt.event.*;
import java.math.BigDecimal;
@ -75,6 +77,15 @@ public class JFormSliderPane extends JPanel {
this.setLayout(new BorderLayout());
initSlider();
initShowValSpinner();
//MoMeak:控制只能输入10-400
JSpinner.NumberEditor editor = new JSpinner.NumberEditor(showValSpinner, "0");
showValSpinner.setEditor(editor);
JFormattedTextField textField = ((JSpinner.NumberEditor) showValSpinner.getEditor()).getTextField();
textField.setEditable(true);
DefaultFormatterFactory factory = (DefaultFormatterFactory) textField .getFormatterFactory();
NumberFormatter formatter = (NumberFormatter) factory.getDefaultFormatter();
formatter.setAllowsInvalid(false);
initDownUpButton();
initShowValButton();
initUIRadioButton();
@ -111,7 +122,7 @@ public class JFormSliderPane extends JPanel {
}
private void initShowValSpinner() {
showValSpinner = new UIBasicSpinner(new SpinnerNumberModel(HUNDRED, TEN, FOUR_HUNDRED, 1)){
showValSpinner = new UIBasicSpinner(new SpinnerNumberModel(HUNDRED, 0, FOUR_HUNDRED, 1)){
public Point getToolTipLocation(MouseEvent event){
return new Point(event.getX(), event.getY() - TOOLTIP_Y);
}
@ -325,7 +336,7 @@ public class JFormSliderPane extends JPanel {
public void actionPerformed(ActionEvent e) {
showValue = (int) showValSpinner.getValue();
isButtonOrIsTxt = true;
if (e.getActionCommand().equals("less")) {
if ("less".equals(e.getActionCommand())) {
int newDownVal = showValue - TEN;
if (newDownVal >= TEN) {
showValue = newDownVal;
@ -335,7 +346,7 @@ public class JFormSliderPane extends JPanel {
showValSpinner.setValue(TEN);
}
}
if (e.getActionCommand().equals("more")) {
if ("more".equals(e.getActionCommand())) {
int newUpVal = showValue + TEN;
if (newUpVal <= FOUR_HUNDRED) {
showValue = newUpVal;

17
designer_base/src/com/fr/design/mainframe/JSliderPane.java

@ -17,6 +17,8 @@ import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import javax.swing.plaf.basic.BasicSliderUI;
import javax.swing.text.DefaultFormatterFactory;
import javax.swing.text.NumberFormatter;
import java.awt.*;
import java.awt.event.*;
import java.math.BigDecimal;
@ -77,6 +79,15 @@ public class JSliderPane extends JPanel {
this.setLayout(new BorderLayout());
initSlider();
initShowValSpinner();
//MoMeak:控制只能输入10-400
JSpinner.NumberEditor editor = new JSpinner.NumberEditor(showValSpinner, "0");
showValSpinner.setEditor(editor);
JFormattedTextField textField = ((JSpinner.NumberEditor) showValSpinner.getEditor()).getTextField();
textField.setEditable(true);
DefaultFormatterFactory factory = (DefaultFormatterFactory) textField .getFormatterFactory();
NumberFormatter formatter = (NumberFormatter) factory.getDefaultFormatter();
formatter.setAllowsInvalid(false);
initDownUpButton();
initShowValButton();
initUIRadioButton();
@ -114,7 +125,7 @@ public class JSliderPane extends JPanel {
}
private void initShowValSpinner() {
showValSpinner = new UIBasicSpinner(new SpinnerNumberModel(HUNDRED, TEN, FOUR_HUNDRED, 1)) {
showValSpinner = new UIBasicSpinner(new SpinnerNumberModel(HUNDRED, 0, FOUR_HUNDRED, 1)) {
public Point getToolTipLocation(MouseEvent event) {
return new Point(event.getX(), event.getY() - TOOLTIP_Y);
}
@ -331,7 +342,7 @@ public class JSliderPane extends JPanel {
public void actionPerformed(ActionEvent e) {
showValue = (int) showValSpinner.getValue();
isButtonOrIsTxt = true;
if (e.getActionCommand().equals("less")) {
if ("less".equals(e.getActionCommand())) {
int newDownVal = showValue - TEN;
if (newDownVal >= TEN) {
showValue = newDownVal;
@ -341,7 +352,7 @@ public class JSliderPane extends JPanel {
showValSpinner.setValue(TEN);
}
}
if (e.getActionCommand().equals("more")) {
if ("more".equals(e.getActionCommand())) {
int newUpVal = showValue + TEN;
if (newUpVal <= FOUR_HUNDRED) {
showValue = newUpVal;

Loading…
Cancel
Save