From b98ee62729127701d445e57e8668c5d0c8a8680c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Fri, 14 Aug 2020 11:27:05 +0800 Subject: [PATCH 1/6] =?UTF-8?q?CHART-15096=20=E6=9D=A1=E4=BB=B6=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E6=95=B0=E6=8D=AE=E8=A1=A8=E6=A0=B7=E5=BC=8F=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datasheet/VanchartDataSheetNoCheckPane.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/datasheet/VanchartDataSheetNoCheckPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/datasheet/VanchartDataSheetNoCheckPane.java index e5471e59f..a9e915ff5 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/datasheet/VanchartDataSheetNoCheckPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/datasheet/VanchartDataSheetNoCheckPane.java @@ -1,10 +1,12 @@ package com.fr.van.chart.designer.style.datasheet; import com.fr.chart.chartglyph.DataSheet; +import com.fr.design.gui.iscrollbar.UIScrollBar; import com.fr.plugin.chart.base.AttrDataSheet; import javax.swing.JPanel; import java.awt.Component; +import java.awt.Container; /** * Created by mengao on 2017/5/24. @@ -19,6 +21,18 @@ public class VanchartDataSheetNoCheckPane extends VanChartDataSheetPane { return components; } + protected void layoutContentPane() { + leftcontentPane = createContentPane(); + this.add(leftcontentPane); + } + + protected void setLeftContentPaneBounds(Container parent, UIScrollBar scrollBar, int beginY, int maxheight) { + int width = parent.getWidth(); + int height = parent.getHeight(); + scrollBar.setBounds(0, 0, 0, 0); + leftcontentPane.setBounds(0, 0, width, height); + } + public void populate(AttrDataSheet attrDataSheet) { populate(attrDataSheet.getDataSheet()); } From c87e9f6e70b080efbc679d5d16d74277d0ad2737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Fri, 14 Aug 2020 11:28:40 +0800 Subject: [PATCH 2/6] =?UTF-8?q?CHART-15096=20=E6=B3=A8=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/style/datasheet/VanchartDataSheetNoCheckPane.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/datasheet/VanchartDataSheetNoCheckPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/datasheet/VanchartDataSheetNoCheckPane.java index a9e915ff5..cc47a3fc1 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/datasheet/VanchartDataSheetNoCheckPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/datasheet/VanchartDataSheetNoCheckPane.java @@ -21,11 +21,13 @@ public class VanchartDataSheetNoCheckPane extends VanChartDataSheetPane { return components; } + @Override protected void layoutContentPane() { leftcontentPane = createContentPane(); this.add(leftcontentPane); } + @Override protected void setLeftContentPaneBounds(Container parent, UIScrollBar scrollBar, int beginY, int maxheight) { int width = parent.getWidth(); int height = parent.getHeight(); From f565b41d0bbf12bae3f8bf4758f08e98c9a788bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Fri, 14 Aug 2020 13:54:00 +0800 Subject: [PATCH 3/6] =?UTF-8?q?CHART-14800=20=E5=9B=BE=E8=A1=A8=E7=9A=84?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E5=8A=A0=E8=BD=BD=E6=85=A2=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E4=BA=86=E6=9C=8D=E5=8A=A1=E8=8F=9C=E5=8D=95=E7=AC=AC=E4=B8=80?= =?UTF-8?q?=E6=AC=A1=E7=82=B9=E5=87=BB=E7=BC=BA=E5=B0=91=E5=9B=BE=E8=A1=A8?= =?UTF-8?q?=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/chart/ChartDesignerActivator.java | 7 ----- .../main/java/com/fr/start/MainDesigner.java | 26 +++++++------------ 2 files changed, 10 insertions(+), 23 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/chart/ChartDesignerActivator.java b/designer-chart/src/main/java/com/fr/design/chart/ChartDesignerActivator.java index 098b965d0..0cd81f783 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/ChartDesignerActivator.java +++ b/designer-chart/src/main/java/com/fr/design/chart/ChartDesignerActivator.java @@ -6,9 +6,7 @@ import com.fr.design.actions.core.ActionFactory; import com.fr.design.chart.gui.ChartComponent; import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.mainframe.ChartPropertyPane; -import com.fr.design.module.ChartEmptyDataStyleAction; import com.fr.design.module.ChartHyperlinkGroup; -import com.fr.design.module.ChartPreStyleAction; import com.fr.design.module.DesignModuleFactory; import com.fr.form.ui.ChartEditor; import com.fr.locale.InterMutableKey; @@ -20,7 +18,6 @@ import com.fr.plugin.chart.vanchart.export.ImagePainter; import com.fr.stable.bridge.StableFactory; import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider; import com.fr.van.chart.DownloadOnlineSourcesHelper; -import com.fr.van.chart.map.server.ChartMapEditorAction; /** * Created by juhaoyu on 2018/6/27. @@ -43,10 +40,6 @@ public class ChartDesignerActivator extends Activator implements Prepare { DesignModuleFactory.registerChartPropertyPaneClass(ChartPropertyPane.class); - ActionFactory.registerChartPreStyleAction(new ChartPreStyleAction()); - ActionFactory.registerChartEmptyDataStyleAction(new ChartEmptyDataStyleAction()); - ActionFactory.registerChartMapEditorAction(new ChartMapEditorAction()); - ActionFactory.registerChartCollection(ChartCollection.class); DesignModuleFactory.registerExtraWidgetOptions(ChartTypeInterfaceManager.initWidgetOption()); diff --git a/designer-realize/src/main/java/com/fr/start/MainDesigner.java b/designer-realize/src/main/java/com/fr/start/MainDesigner.java index 0020514f2..ff3aadd36 100644 --- a/designer-realize/src/main/java/com/fr/start/MainDesigner.java +++ b/designer-realize/src/main/java/com/fr/start/MainDesigner.java @@ -3,7 +3,6 @@ package com.fr.start; import com.fr.base.BaseUtils; import com.fr.base.vcs.DesignerMode; import com.fr.design.DesignerEnvManager; -import com.fr.design.actions.core.ActionFactory; import com.fr.design.actions.file.WebPreviewUtils; import com.fr.design.actions.file.newReport.NewPolyReportAction; import com.fr.design.actions.file.newReport.NewWorkBookAction; @@ -34,6 +33,8 @@ import com.fr.design.menu.KeySetUtils; import com.fr.design.menu.MenuDef; import com.fr.design.menu.SeparatorDef; import com.fr.design.menu.ShortCut; +import com.fr.design.module.ChartEmptyDataStyleAction; +import com.fr.design.module.ChartPreStyleAction; import com.fr.design.module.DesignModuleFactory; import com.fr.design.utils.concurrent.ThreadFactoryBuilder; import com.fr.design.utils.gui.GUICoreUtils; @@ -54,23 +55,24 @@ import com.fr.stable.xml.XMLTools; import com.fr.start.module.StartupArgs; import com.fr.start.server.ServerTray; import com.fr.third.org.apache.commons.lang3.time.StopWatch; +import com.fr.van.chart.map.server.ChartMapEditorAction; import com.fr.workspace.WorkContext; import javax.swing.JComponent; import javax.swing.JPanel; import javax.swing.border.MatteBorder; -import java.awt.Component; -import java.awt.Dimension; -import java.awt.FlowLayout; -import java.awt.Insets; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; import java.io.File; import java.util.ArrayList; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.ThreadFactory; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.Insets; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; public class MainDesigner extends BaseDesigner { @@ -160,15 +162,7 @@ public class MainDesigner extends BaseDesigner { if (WorkContext.getCurrent().isRoot()) { menuDef.addShortCut(new ServerConfigManagerAction(), new StyleListAction(), new WidgetManagerAction()); - if (ActionFactory.getChartPreStyleAction() != null) { - menuDef.addShortCut(ActionFactory.getChartPreStyleAction()); - } - if (ActionFactory.getChartEmptyDataStyleAction() != null) { - menuDef.addShortCut(ActionFactory.getChartEmptyDataStyleAction()); - } - if (ActionFactory.getChartMapEditorAction() != null) { - menuDef.addShortCut(ActionFactory.getChartMapEditorAction()); - } + menuDef.addShortCut(new ChartPreStyleAction(), new ChartEmptyDataStyleAction(),new ChartMapEditorAction()); } insertMenu(menuDef, MenuHandler.SERVER); From 7150ffee7a5ee992ee1b095e16fabafb7ca6be4f Mon Sep 17 00:00:00 2001 From: Harrison Date: Fri, 14 Aug 2020 16:23:31 +0800 Subject: [PATCH 4/6] =?UTF-8?q?REPORT-37487=20&&=20REPORT-37484=201?= =?UTF-8?q?=E3=80=81=E5=9B=9E=E5=A4=8D=20result=20=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E4=B8=BA=20$$$=20=E3=80=82=202=E3=80=81=E5=92=8C=E4=BA=A7?= =?UTF-8?q?=E5=93=81=E6=B2=9F=E9=80=9A=EF=BC=8C=E5=B0=86=E4=B8=A4=E4=B8=AA?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E5=88=86=E5=88=AB=E9=BB=98=E8=AE=A4=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=20=3D=20=E5=92=8C=E4=B8=8D=E5=B1=95=E7=A4=BA=20=3D=20?= =?UTF-8?q?3=E3=80=81=E6=81=A2=E5=A4=8D=E6=95=B0=E6=8D=AE=E7=9A=84?= =?UTF-8?q?=E8=81=94=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/formula/FormulaTextField.java | 33 +++++++++++++++++-- .../fr/design/formula/SortFormulaPane.java | 2 +- .../design/formula/FormulaTextFieldTest.java | 28 ++++++++++++++++ .../design/dscolumn/DSColumnAdvancedPane.java | 11 +++---- .../cellquick/CellDSColumnEditor.java | 8 ++--- 5 files changed, 68 insertions(+), 14 deletions(-) create mode 100644 designer-base/src/test/java/com/fr/design/formula/FormulaTextFieldTest.java diff --git a/designer-base/src/main/java/com/fr/design/formula/FormulaTextField.java b/designer-base/src/main/java/com/fr/design/formula/FormulaTextField.java index 146085e3d..6294a7a3b 100644 --- a/designer-base/src/main/java/com/fr/design/formula/FormulaTextField.java +++ b/designer-base/src/main/java/com/fr/design/formula/FormulaTextField.java @@ -16,7 +16,9 @@ import javax.swing.text.Document; **/ public class FormulaTextField extends DictionaryTextField { - private static final BaseFormula EMPTY_FORMULA = BaseFormula.createFormulaBuilder().build("="); + private static final String EMPTY_STRING = "="; + + private static final BaseFormula EMPTY_FORMULA = BaseFormula.createFormulaBuilder().build(EMPTY_STRING); public FormulaTextField() { } @@ -43,7 +45,15 @@ public class FormulaTextField extends DictionaryTextField { if (this.value == null) { this.value = createDefault(); } - return this.value; + //保持联动 + linkValueByText(); + return value; + } + + private void linkValueByText() { + + String content = getText(); + this.value.setContent(content); } /** @@ -58,7 +68,24 @@ public class FormulaTextField extends DictionaryTextField { if (this.value == null) { this.value = createDefault(); } - setText(this.value.getPureContent()); + } + + /** + * 是需要设置不带 = 号,还是带 = 号。 + * + * @param value 值 + * @param isPure 带不带 = 号, 是 = 不带, 否 = 带。 + */ + public void setValueAndText(BaseFormula value, boolean isPure) { + + setValue(value); + String content = null; + if (isPure) { + content = this.value.getPureContent(); + } else { + content = this.value.getContent(); + } + setText(content); } private BaseFormula createDefault() { diff --git a/designer-base/src/main/java/com/fr/design/formula/SortFormulaPane.java b/designer-base/src/main/java/com/fr/design/formula/SortFormulaPane.java index 4d598a7e2..7b6e536fc 100644 --- a/designer-base/src/main/java/com/fr/design/formula/SortFormulaPane.java +++ b/designer-base/src/main/java/com/fr/design/formula/SortFormulaPane.java @@ -64,7 +64,7 @@ public abstract class SortFormulaPane extends JPanel { public void doOk() { BaseFormula fm = formulaPane.update(); if (fm != null) { - sortFormulaTextField.setValue(fm); + sortFormulaTextField.setValueAndText(fm, true); } } }).setVisible(true); diff --git a/designer-base/src/test/java/com/fr/design/formula/FormulaTextFieldTest.java b/designer-base/src/test/java/com/fr/design/formula/FormulaTextFieldTest.java new file mode 100644 index 000000000..8c58f6023 --- /dev/null +++ b/designer-base/src/test/java/com/fr/design/formula/FormulaTextFieldTest.java @@ -0,0 +1,28 @@ +package com.fr.design.formula; + +import com.fr.base.BaseFormula; +import org.junit.Assert; +import org.junit.Test; + +import static org.junit.Assert.*; + +public class FormulaTextFieldTest { + + @Test + public void testSet() { + + FormulaTextField field = new FormulaTextField(); + BaseFormula aaaa = BaseFormula.createFormulaBuilder().build("aaaa"); + field.setValueAndText(aaaa, true); + + Assert.assertEquals("aaaa", field.getText()); + + field.setValueAndText(aaaa, false); + Assert.assertEquals("=aaaa", field.getText()); + + field.setText("bbbb"); + BaseFormula formula = field.getValue(); + Assert.assertEquals("bbbb", formula.getPureContent()); + } + +} \ No newline at end of file diff --git a/designer-realize/src/main/java/com/fr/design/dscolumn/DSColumnAdvancedPane.java b/designer-realize/src/main/java/com/fr/design/dscolumn/DSColumnAdvancedPane.java index 07eefdd2b..58636917c 100644 --- a/designer-realize/src/main/java/com/fr/design/dscolumn/DSColumnAdvancedPane.java +++ b/designer-realize/src/main/java/com/fr/design/dscolumn/DSColumnAdvancedPane.java @@ -257,7 +257,7 @@ public class DSColumnAdvancedPane extends BasicPane { this.sortOrderComboBox.setSortOrder(new SortOrder(sort)); BaseFormula sortFormulaObject = dSColumn.getSortFormulaObject(); - sortFormulaTextField.setValue(sortFormulaObject); + sortFormulaTextField.setValueAndText(sortFormulaObject, true); } public void update(CellElement cellElement) { @@ -421,7 +421,7 @@ public class DSColumnAdvancedPane extends BasicPane { this.add(bottomLabel); formulaTextField = new FormulaTextField(24); this.add(formulaTextField); - formulaTextField.setValue(defaultFormula); + formulaTextField.setValueAndText(defaultFormula, true); UIButton bottomFrmulaButton = new UIButton("..."); this.add(bottomFrmulaButton); @@ -444,8 +444,7 @@ public class DSColumnAdvancedPane extends BasicPane { public void populateFormula(BaseFormula baseFormula) { - this.formulaTextField.setValue(baseFormula); - this.formulaTextField.setText(baseFormula.getPureContent()); + this.formulaTextField.setValueAndText(baseFormula, true); } public BaseFormula getFormula() { @@ -481,9 +480,9 @@ public class DSColumnAdvancedPane extends BasicPane { public void doOk() { BaseFormula valueFormula = formulaPane.update(); if (valueFormula.getContent().length() <= 1) { - formulaTextField.setValue(defaultFormula); + formulaTextField.setValueAndText(defaultFormula, true); } else { - formulaTextField.setValue(valueFormula); + formulaTextField.setValueAndText(valueFormula, true); } } }).setVisible(true); diff --git a/designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellDSColumnEditor.java b/designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellDSColumnEditor.java index 983fbb9da..d9b8f1e7a 100644 --- a/designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellDSColumnEditor.java +++ b/designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellDSColumnEditor.java @@ -1070,7 +1070,7 @@ public class CellDSColumnEditor extends CellQuickEditor { this.defaultFormula = BaseFormula.createFormulaBuilder().build(defaultValue); formulaTextField = new FormulaTextField(); - formulaTextField.setValue(defaultFormula); + formulaTextField.setValueAndText(defaultFormula, false); JPanel textFieldPane = new JPanel(new BorderLayout()); textFieldPane.add(formulaTextField, BorderLayout.CENTER); @@ -1101,7 +1101,7 @@ public class CellDSColumnEditor extends CellQuickEditor { public void populateFormula(BaseFormula baseFormula) { - this.formulaTextField.setValue(baseFormula); + this.formulaTextField.setValueAndText(baseFormula, false); } public BaseFormula getFormula() { @@ -1145,9 +1145,9 @@ public class CellDSColumnEditor extends CellQuickEditor { public void doOk() { BaseFormula valueFormula = formulaPane.update(); if (valueFormula.getContent().length() <= 1) { - formulaTextField.setValue(defaultFormula); + formulaTextField.setValueAndText(defaultFormula, false); } else { - formulaTextField.setValue(valueFormula); + formulaTextField.setValueAndText(valueFormula, false); } } }).setVisible(true); From 7cc9abc8586ea9cd6226447572aec980d0b3c2aa Mon Sep 17 00:00:00 2001 From: kerry Date: Fri, 14 Aug 2020 16:30:13 +0800 Subject: [PATCH 5/6] =?UTF-8?q?REPORT-37460=20&&=20REPORT-37526=20?= =?UTF-8?q?=E3=80=90frm=E8=AE=BE=E8=AE=A1=E7=95=8C=E9=9D=A2=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E7=BC=A9=E6=94=BE=E3=80=91=E6=A8=A1=E6=9D=BF=E6=94=BE?= =?UTF-8?q?=E5=A4=A7=E5=90=8E=EF=BC=8C=E7=82=B9=E5=87=BB=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E5=9D=97=E7=BC=96=E8=BE=91=EF=BC=8C=E5=8F=8C=E5=87=BB=E6=89=8D?= =?UTF-8?q?=E8=83=BD=E7=94=9F=E6=95=88=EF=BC=8C=E7=BC=A9=E5=B0=8F=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF100%=EF=BC=8C=E5=8D=95=E5=87=BB=E5=B0=B1=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/EditingMouseListener.java | 16 ++++++++-------- .../java/com/fr/design/mainframe/FormArea.java | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java b/designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java index 0f3af7537..3ef72242a 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java @@ -327,8 +327,8 @@ public class EditingMouseListener extends MouseInputAdapter { if (designer.getCursor().getType() == Cursor.HAND_CURSOR) { designer.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); } // component.getParent() 是报表块所在的XWTitleLayout - int minX = button.getX() + getParentPositionX(component, 0) - designer.getArea().getHorizontalValue(); - int minY = button.getY() + getParentPositionY(component, 0) - designer.getArea().getVerticalValue(); + int minX = button.getX() + getParentPositionX(component, 0) - designer.getHorizontalScaleValue(); + int minY = button.getY() + getParentPositionY(component, 0) - designer.getVerticalScaleValue(); if (e.getX() + GAP - xElementCase.getInsets().left > minX && e.getX() - GAP - xElementCase.getInsets().left < minX + button.getWidth()) { if (e.getY() + GAP - xElementCase.getInsets().top > minY && e.getY() - GAP - xElementCase.getInsets().top < minY + button.getHeight()) { designer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); @@ -342,8 +342,8 @@ public class EditingMouseListener extends MouseInputAdapter { if (component.getCoverPane() != null) { if (component.getCoverPane().getComponentCount() > 1) { JComponent button1 = (JComponent) component.getCoverPane().getComponent(1); - int minX1 = button1.getX() + getParentPositionX(component, 0) - designer.getArea().getHorizontalValue(); - int minY1 = button1.getY() + getParentPositionY(component, 0) - designer.getArea().getVerticalValue(); + int minX1 = button1.getX() + getParentPositionX(component, 0) - designer.getHorizontalScaleValue(); + int minY1 = button1.getY() + getParentPositionY(component, 0) - designer.getVerticalScaleValue(); if (e.getX() + GAP - component.getInsets().left > minX1 && e.getX() - GAP - component.getInsets().left < minX1 + button1.getWidth()) { if (e.getY() + GAP - component.getInsets().top > minY1 && e.getY() - GAP - component.getInsets().top < minY1 + button1.getHeight()) { designer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); @@ -358,8 +358,8 @@ public class EditingMouseListener extends MouseInputAdapter { if (StringUtils.isEmpty(component.toData().getDescription())) { return; } - int minX1 = getParentPositionX(component, component.getX()) + component.getWidth() - ShareConstants.SHARE_EL_CONTROL_BUTTON_HW - designer.getArea().getHorizontalValue(); - int minY1 = getParentPositionY(component, component.getY()) - designer.getArea().getVerticalValue(); + int minX1 = getParentPositionX(component, component.getX()) + component.getWidth() - ShareConstants.SHARE_EL_CONTROL_BUTTON_HW - designer.getHorizontalScaleValue(); + int minY1 = getParentPositionY(component, component.getY()) - designer.getVerticalScaleValue(); if (e.getX() + GAP - component.getInsets().left > minX1 && e.getX() - GAP - component.getInsets().left < minX1 + ShareConstants.SHARE_EL_CONTROL_BUTTON_HW) { if (e.getY() + GAP - component.getInsets().top > minY1 && e.getY() - GAP - component.getInsets().top < minY1 + ShareConstants.SHARE_EL_CONTROL_BUTTON_HW) { designer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); @@ -426,8 +426,8 @@ public class EditingMouseListener extends MouseInputAdapter { if (designer.getCursor().getType() == Cursor.HAND_CURSOR) { designer.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); } - int minX = button.getX() + getParentPositionX(component, 0) - designer.getArea().getHorizontalValue(); - int minY = button.getY() + getParentPositionY(component, 0) - designer.getArea().getVerticalValue(); + int minX = button.getX() + getParentPositionX(component, 0) - designer.getHorizontalScaleValue(); + int minY = button.getY() + getParentPositionY(component, 0) - designer.getVerticalScaleValue(); if (e.getX() + GAP > minX && e.getX() - GAP < minX + button.getWidth()) { if (e.getY() + GAP > minY && e.getY() - GAP < minY + button.getHeight()) { designer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormArea.java b/designer-form/src/main/java/com/fr/design/mainframe/FormArea.java index 967cabd06..f127f8ea0 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormArea.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormArea.java @@ -773,7 +773,7 @@ public class FormArea extends JComponent implements ScrollRulerComponent { heightPane.setValue(height); reCalculateHeight((int) height); } - if (designer.getRootComponent().acceptType(XWFitLayout.class) && AssistUtils.equals(slide, DEFAULT_SLIDER) ) { + if (designer.getRootComponent().acceptType(XWFitLayout.class) && AssistUtils.equals(screenValue, DEFAULT_SLIDER) ) { XWFitLayout layout = (XWFitLayout) designer.getRootComponent(); // 撤销时先refreshRoot了,此处去掉内边距再增加间隔 layout.moveContainerMargin(); From 3fb194e0e2e6fa763dcc028e81fd4ee0848b07fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Fri, 14 Aug 2020 18:07:42 +0800 Subject: [PATCH 6/6] =?UTF-8?q?CHART-15112=20=E6=97=B6=E9=97=B4=E8=BD=B4?= =?UTF-8?q?=E8=8B=B1=E6=96=87=E7=8E=AF=E5=A2=83=E5=B0=91=E5=8D=95=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../van/chart/designer/style/axis/VanChartTimeAxisPane.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartTimeAxisPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartTimeAxisPane.java index b57f0fc2f..212e8b1fa 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartTimeAxisPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartTimeAxisPane.java @@ -162,8 +162,8 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane { JPanel mainTickPane = new JPanel(); mainTickPane.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); - mainUnitField.setPreferredSize(new Dimension(100,20)); - secondUnitField.setPreferredSize(new Dimension(100,20)); + mainUnitField.setPreferredSize(new Dimension(80,20)); + secondUnitField.setPreferredSize(new Dimension(80,20)); mainTickPane.add(mainUnitField); mainTickPane.add(mainType);