From e08c971d3ffe587c9ee7f74c3d33271706cec511 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Tue, 18 Jul 2017 23:30:54 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-2897=209.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E4=BF=AE=E6=94=B9=20=E7=BC=A9=E6=94=BE=E6=9D=A1?= =?UTF-8?q?=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/grid/GridColumnUI.java | 8 ++++---- .../src/com/fr/design/mainframe/JSliderPane.java | 12 +++++++++--- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/designer/src/com/fr/grid/GridColumnUI.java b/designer/src/com/fr/grid/GridColumnUI.java index eb625eabeb..292c38a0a3 100644 --- a/designer/src/com/fr/grid/GridColumnUI.java +++ b/designer/src/com/fr/grid/GridColumnUI.java @@ -163,11 +163,11 @@ public class GridColumnUI extends ComponentUI { } double stringWidth = gridColumn.getFont().getStringBounds(columnContent, fontRenderContext).getWidth(); - if (stringWidth > tmpIncreaseWidth) { - paintMoreContent(i, g2d, tmpWidth1, size, tmpIncreaseWidth, isSelectedBounds, gridColumn, elementCase, columnContent, stringWidth, fmAscent); - } else { +// if (stringWidth > tmpIncreaseWidth) { +// paintMoreContent(i, g2d, tmpWidth1, size, tmpIncreaseWidth, isSelectedBounds, gridColumn, elementCase, columnContent, stringWidth, fmAscent); +// } else { paintNormalContent(i, g2d, tmpWidth1, tmpIncreaseWidth, isSelectedBounds, gridColumn, elementCase, columnContent, stringWidth, fmAscent); - } +// } } diff --git a/designer_base/src/com/fr/design/mainframe/JSliderPane.java b/designer_base/src/com/fr/design/mainframe/JSliderPane.java index e45d6a0a8d..b4c8792894 100644 --- a/designer_base/src/com/fr/design/mainframe/JSliderPane.java +++ b/designer_base/src/com/fr/design/mainframe/JSliderPane.java @@ -107,6 +107,7 @@ public class JSliderPane extends JPanel { public void run() { sliderValue = slider.getValue(); getTimes(sliderValue); + showValue = times; showVal.setText(times + "%"); } }); @@ -120,6 +121,7 @@ public class JSliderPane extends JPanel { @Override public void insertUpdate(DocumentEvent e) { isButtonOrIsTxt = true; + resolutionTimes = divide(showValue,100,2); refreshSlider(); refreshBody(); } @@ -147,9 +149,9 @@ public class JSliderPane extends JPanel { } private void refreshBody(){ - this.resolutionTimes = divide(showValue,100,2); - int resolution = (int) (ScreenResolution.getScreenResolution()*resolutionTimes); - HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().setScale(resolution); + +// int resolution = (int) (ScreenResolution.getScreenResolution()*resolutionTimes); +// HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().setScale(resolution); } @@ -175,16 +177,20 @@ public class JSliderPane extends JPanel { if(e.getActionCommand().equals("less")){ int newDownVal = showValue - 10; if (newDownVal >= 10 ){ + showValue = newDownVal; showVal.setText(newDownVal + "%"); }else { + showValue = newDownVal; showVal.setText(10 + "%"); } } if(e.getActionCommand().equals("more")){ int newUpVal = showValue + 10; if (newUpVal <= 400 ){ + showValue = newUpVal; showVal.setText(newUpVal + "%"); }else { + showValue = newUpVal; showVal.setText(400 + "%"); } } From cb344ec64ae32d72b372f84c93a00927864e49d4 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Tue, 18 Jul 2017 23:31:53 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-2897=209.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E4=BF=AE=E6=94=B9=20=E7=BC=A9=E6=94=BE=E6=9D=A1?= =?UTF-8?q?=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_form/src/com/fr/design/mainframe/FormArea.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/designer_form/src/com/fr/design/mainframe/FormArea.java b/designer_form/src/com/fr/design/mainframe/FormArea.java index dae7e7c38a..51a18c6969 100644 --- a/designer_form/src/com/fr/design/mainframe/FormArea.java +++ b/designer_form/src/com/fr/design/mainframe/FormArea.java @@ -155,7 +155,9 @@ public class FormArea extends JComponent implements ScrollRulerComponent { @Override public void insertUpdate(DocumentEvent e) { // slidePane.getShowVal().getDocument() - double value = slidePane.getshowValue(); + double value = Integer.parseInt(slidePane.getShowVal().getText().substring(0, slidePane.getShowVal().getText().indexOf("%"))); + value = value>400 ? 400 : value; + value = value<10 ? 10 : value; reCalculateRoot(value, true); JTemplate form = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); if(form != null){