From 602ce1cf4ad221b52f0543a1dcf49c0f39f52cfa Mon Sep 17 00:00:00 2001 From: MoMeak Date: Wed, 23 Aug 2017 14:05:35 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-3815=20[9.0=E4=B8=80=E8=BD=AE=E5=9B=9E?= =?UTF-8?q?=E5=BD=92]=E5=8D=95=E5=85=83=E6=A0=BC=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E7=BC=A9=E8=BF=9B=E7=AD=89=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E6=95=B0=E5=AD=97=E6=AF=8F=E6=AC=A1=E5=8F=AA=E8=83=BD=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E4=B8=80=E4=BD=8D=20REPORT-4025=20[9.0=E4=B8=80?= =?UTF-8?q?=E8=BD=AE=E5=9B=9E=E5=BD=92]=E5=85=B6=E4=BB=96=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E5=88=86=E9=A1=B5=E4=B8=AD=E9=BB=98=E8=AE=A4=E5=8B=BE?= =?UTF-8?q?=E9=80=89=E9=A1=B9=E6=97=A0=E6=B3=95=E5=8F=96=E6=B6=88=E5=8B=BE?= =?UTF-8?q?=E7=BA=BF=20REPORT-4022=20[9.0=E4=B8=80=E8=BD=AE=E5=9B=9E?= =?UTF-8?q?=E5=BD=92]=E9=80=89=E4=B8=AD=E4=B8=80=E7=89=87=E5=8D=95?= =?UTF-8?q?=E5=85=83=E6=A0=BC=E6=97=B6=E5=AF=B9=E9=BD=90=E6=96=B9=E5=BC=8F?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=BC=82=E5=B8=B8=E5=A6=82=E9=99=84=E4=BB=B6?= =?UTF-8?q?=E5=9B=BE=E7=89=87=20=E6=A0=B9=E6=8D=AE=E4=BA=A4=E4=BA=92?= =?UTF-8?q?=E8=A6=81=E6=B1=82=EF=BC=8C=E5=A2=9E=E5=8A=A0=E7=BC=A9=E6=94=BE?= =?UTF-8?q?=E6=9D=A1=E8=BE=93=E5=85=A5=E6=A1=86=E6=9D=A1=E4=BB=B6=E9=99=90?= =?UTF-8?q?=E5=88=B60-400=E7=9A=84=E6=95=B0=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/CellElementPropertyPane.java | 3 +-- .../cell/settingpane/CellOtherSetPane.java | 14 +++++++------- .../com/fr/design/mainframe/JSliderPane.java | 17 ++++++++++++++--- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/CellElementPropertyPane.java b/designer/src/com/fr/design/mainframe/CellElementPropertyPane.java index a607538d62..9e22680cfb 100644 --- a/designer/src/com/fr/design/mainframe/CellElementPropertyPane.java +++ b/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); diff --git a/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java b/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java index 53aa5e3dcf..6be46f1c54 100644 --- a/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java +++ b/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()); } diff --git a/designer_base/src/com/fr/design/mainframe/JSliderPane.java b/designer_base/src/com/fr/design/mainframe/JSliderPane.java index 7f3ad51f45..9d23ecf5e9 100644 --- a/designer_base/src/com/fr/design/mainframe/JSliderPane.java +++ b/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);