Browse Source

REPORT-3815 [9.0一轮回归]单元格属性样式缩进等输入数字每次只能输入一位

REPORT-4025 [9.0一轮回归]其他属性分页中默认勾选项无法取消勾线
REPORT-4022 [9.0一轮回归]选中一片单元格时对齐方式设置异常如附件图片
根据交互要求,增加缩放条输入框条件限制0-400的数字
master
MoMeak 7 years ago
parent
commit
602ce1cf4a
  1. 3
      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/JSliderPane.java

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

@ -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);

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/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, 10, FOUR_HUNDRED, 1)) {
public Point getToolTipLocation(MouseEvent event) {
return new Point(event.getX(), event.getY() - TOOLTIP_Y);
}
@ -221,7 +232,7 @@ public class JSliderPane extends JPanel {
new Component[]{fiveTenButton, null},
new Component[]{twoFiveButton, null},
new Component[]{selfAdaptButton, null},
new Component[]{customButton, createSpinnerPanel()}
new Component[]{createSpinnerPanel(), customButton}
};
dialogContentPanel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, LayoutConstants.VGAP_MEDIUM, 0);
dialogContentPanel.setBackground(BACK_COLOR);
@ -464,7 +475,7 @@ class JSliderPaneUI extends BasicSliderUI {
class PopupPane extends JPopupMenu {
private static final int DIALOG_WIDTH = 157;
private static final int DIALOG_HEIGHT = 192;
private static final int DIALOG_HEIGHT = 292;
PopupPane(JButton b, JPanel dialogContentPanel) {
this.add(dialogContentPanel, BorderLayout.CENTER);

Loading…
Cancel
Save