From 0e6cffac44b92354f0ba30adba207cdbd1dda021 Mon Sep 17 00:00:00 2001 From: hades Date: Mon, 12 Jul 2021 09:55:50 +0800 Subject: [PATCH 1/6] =?UTF-8?q?REPORT-54122=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E9=80=89=E4=B8=AD=E7=8A=B6=E6=80=81=E5=8F=B3?= =?UTF-8?q?=E4=BE=A7=E5=BC=B9=E7=AA=97=E6=94=B9=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/images/control/edit_lock.png | Bin 0 -> 255 bytes .../fr/design/images/control/edit_unlock.png | Bin 0 -> 220 bytes .../designer/creator/SelectedBorderIcon.java | 47 ----- .../fr/design/designer/creator/XCreator.java | 22 +- .../design/designer/ui/PopupControlPanel.java | 193 ++++++++++++++++++ .../designer/ui/SelectedPopupDialog.java | 36 ++++ .../fr/design/mainframe/FormDesignerUI.java | 5 +- 7 files changed, 247 insertions(+), 56 deletions(-) create mode 100644 designer-base/src/main/resources/com/fr/design/images/control/edit_lock.png create mode 100644 designer-base/src/main/resources/com/fr/design/images/control/edit_unlock.png delete mode 100644 designer-form/src/main/java/com/fr/design/designer/creator/SelectedBorderIcon.java create mode 100644 designer-form/src/main/java/com/fr/design/designer/ui/PopupControlPanel.java create mode 100644 designer-form/src/main/java/com/fr/design/designer/ui/SelectedPopupDialog.java diff --git a/designer-base/src/main/resources/com/fr/design/images/control/edit_lock.png b/designer-base/src/main/resources/com/fr/design/images/control/edit_lock.png new file mode 100644 index 0000000000000000000000000000000000000000..6168d9a98ea8b35b5b03f8610c79af1c2fdcba55 GIT binary patch literal 255 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F5M?jcysy3fAP;jHC zi(`mI@7oCrxtJV9T;HEiN}6zV$H_$b{FCmxGhE(eqgSYx!I!2Hgh z*-1+!8Ce4u%@?p{JuvzHE%?W&5Z!=d4Cmx_Ft96pXJhc?N%-+sqGD!sxk4n<61(L8 zFDICMxvw`VCGBt0S%>?ta~L-~WGI>R?V_V`^wNX!8<-UC9BE&2cYT96!?ET7NArt? QK$kIiy85}Sb4q9e0M}Gd*#H0l literal 0 HcmV?d00001 diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/SelectedBorderIcon.java b/designer-form/src/main/java/com/fr/design/designer/creator/SelectedBorderIcon.java deleted file mode 100644 index fe2d839b9..000000000 --- a/designer-form/src/main/java/com/fr/design/designer/creator/SelectedBorderIcon.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.fr.design.designer.creator; - -import com.fr.design.form.util.XCreatorConstants; -import com.fr.general.IOUtils; -import java.awt.AlphaComposite; -import java.awt.Color; -import java.awt.Graphics; -import java.awt.Graphics2D; -import java.awt.Image; -import java.awt.Rectangle; - -/** - * @author hades - * @version 10.0 - * Created by hades on 2021/06/30 - */ -public class SelectedBorderIcon { - - private static final Image EDIT_ICON = IOUtils.readImage("/com/fr/design/images/control/show_edit.png"); - private static final Image SETTING_ICON = IOUtils.readImage("/com/fr/design/images/control/show_setting.png"); - private static final float ALPHA = 0.7F; - private static final int TIP_WIDTH = 20; - private static final int TIP_HEIGHT = 40; - private static final int ARC_VALUE = 4; - // 组件到整个提示之间的空隙 - private static final int CREATOR_TO_TIP_GAP = 5; - // icon在整个提示背景下缩进 - private static final int TIP_ICON_GAP = 2; - - /** - * 在bounds范围的右上角绘制特定图标 - * - * @param g - * @param bounds - */ - public void paint(Graphics g, Rectangle bounds) { - Graphics2D g2d = (Graphics2D) g; - AlphaComposite alphaComposite = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, ALPHA); - g2d.setColor(XCreatorConstants.EDIT_COLOR); - g2d.setComposite(alphaComposite); - g2d.fillRoundRect(bounds.x + bounds.width + CREATOR_TO_TIP_GAP, bounds.y, TIP_WIDTH, TIP_HEIGHT, ARC_VALUE, ARC_VALUE); - g2d.drawImage(EDIT_ICON, bounds.x + bounds.width + CREATOR_TO_TIP_GAP + TIP_ICON_GAP, bounds.y + TIP_ICON_GAP, EDIT_ICON.getWidth(null), EDIT_ICON.getHeight(null), null); - g2d.drawImage(SETTING_ICON, bounds.x + bounds.width + CREATOR_TO_TIP_GAP + TIP_ICON_GAP, bounds.y + CREATOR_TO_TIP_GAP + EDIT_ICON.getHeight(null), SETTING_ICON.getWidth(null), SETTING_ICON.getHeight(null), null); - g2d.setColor(Color.WHITE); - g2d.drawLine(bounds.x + bounds.width + CREATOR_TO_TIP_GAP + TIP_ICON_GAP, bounds.y + TIP_WIDTH, bounds.x + bounds.width + CREATOR_TO_TIP_GAP + TIP_ICON_GAP + EDIT_ICON.getWidth(null), bounds.y + TIP_WIDTH); - } -} diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java b/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java index 7220eafe8..7f76eb385 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java @@ -11,6 +11,7 @@ import com.fr.design.designer.beans.AdapterBus; import com.fr.design.designer.beans.ComponentAdapter; import com.fr.design.designer.beans.events.DesignerEditor; import com.fr.design.designer.beans.models.SelectionModel; +import com.fr.design.designer.ui.SelectedPopupDialog; import com.fr.design.fun.ShareWidgetUIProcessor; import com.fr.design.fun.WidgetPropertyUIProvider; import com.fr.design.gui.imenu.UIPopupMenu; @@ -25,6 +26,7 @@ import com.fr.design.mainframe.WidgetPropertyPane; import com.fr.design.utils.gui.LayoutUtils; import com.fr.form.ui.Widget; import com.fr.form.ui.container.WTitleLayout; +import com.fr.log.FineLoggerFactory; import com.fr.stable.Constants; import com.fr.stable.StableUtils; import com.fr.stable.StringUtils; @@ -70,7 +72,7 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo private boolean isHelpBtnOnFocus = false;//焦点是否在帮助按钮上 // 当前组件是否处在选中状态 private boolean selected; - private SelectedBorderIcon selectedBorderIcon = new SelectedBorderIcon(); + private SelectedPopupDialog popup; private static final int SHORTS_SEPARATOR_POS = 4; // 弹出菜单分割的位置 public XCreator(Widget ob, Dimension initSize) { @@ -764,15 +766,20 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo } /** - * 绘制选中时右上边框图标 + * 选中时右侧展示小弹窗 * - * @param g + * @param designer * @param bounds */ - public void paintSelectedBorderIcon(Graphics g, Rectangle bounds) { - if (selected) { - selectedBorderIcon.paint(g, bounds); + public void showSelectedPopup(FormDesigner designer, Rectangle bounds, boolean accept) { + if (popup == null) { + popup = new SelectedPopupDialog(this, designer); } + int extraX = (int) ((bounds.x + bounds.width + SelectedPopupDialog.OFFSET_X) * designer.getScale()); + int extraY = (int) (bounds.y * designer.getScale()); + popup.setLocation(designer.getLocationOnScreen().x + designer.getPaintX() + extraX, designer.getLocationOnScreen().y + designer.getPaintY() + extraY); + popup.setVisible(selected && accept); + popup.setRelativeBounds(bounds); } /** @@ -818,6 +825,9 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo public void setSelected(boolean selected) { this.selected = selected; + if (popup != null && !selected) { + popup.setVisible(false); + } } } diff --git a/designer-form/src/main/java/com/fr/design/designer/ui/PopupControlPanel.java b/designer-form/src/main/java/com/fr/design/designer/ui/PopupControlPanel.java new file mode 100644 index 000000000..a2e899208 --- /dev/null +++ b/designer-form/src/main/java/com/fr/design/designer/ui/PopupControlPanel.java @@ -0,0 +1,193 @@ +package com.fr.design.designer.ui; + +import com.fr.design.designer.creator.XCreator; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.i18n.Toolkit; +import com.fr.design.mainframe.CoverReportPane; +import com.fr.design.mainframe.EditingMouseListener; +import com.fr.design.mainframe.FormDesigner; +import com.fr.general.IOUtils; +import com.fr.log.FineLoggerFactory; +import com.fr.stable.ArrayUtils; +import java.awt.Color; +import java.awt.Component; +import java.awt.Container; +import java.awt.Dimension; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.Insets; +import java.awt.LayoutManager; +import java.awt.Rectangle; +import java.awt.RenderingHints; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import javax.swing.AbstractButton; +import javax.swing.Icon; +import javax.swing.JButton; +import javax.swing.JPanel; +import javax.swing.JToggleButton; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; + +/** + * @author hades + * @version 10.0 + * Created by hades on 2021/7/8 + */ +public class PopupControlPanel extends JPanel { + + private static final int ARC_VALUE = 4; + private static final Color FILLED_COLOR = new Color(60, 63, 65); + private static final int V_GAP = 10; + private static final int H_GAP = 2; + + private Dimension defaultDimension = new Dimension(20, 60); + private Rectangle rectangle; + private final JButton editButton; + private final JButton settingButton; + private final JToggleButton toggleButton; + private final XCreator creator; + private final UILabel firstLabel; + private final UILabel secondLabel; + + public PopupControlPanel(XCreator creator, FormDesigner designer) { + FineLoggerFactory.getLogger().error("shared: {}", creator.isShared()); + if (creator.isShared()) { + defaultDimension = new Dimension(20, 85); + } + setLayout(getCustomLayout()); + this.creator = creator; + editButton = createNormalButton(IOUtils.readIcon("/com/fr/design/images/control/show_edit.png"), Toolkit.i18nText("Fine-Design_Form_Edit_Widget")); + editButton.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent e) { + int x = rectangle.x + rectangle.width / 2; + int y = rectangle.y + rectangle.height / 2; + XCreator childCreator = PopupControlPanel.this.creator.getEditingChildCreator(); + MouseListener[] listeners = designer.getMouseListeners(); + if (ArrayUtils.isNotEmpty(listeners) && listeners[0] instanceof EditingMouseListener) { + childCreator.respondClick(((EditingMouseListener) listeners[0]), new MouseEvent(childCreator, MouseEvent.MOUSE_CLICKED, e.getWhen(), e.getModifiers(), x, y, 2, false)); + } + } + }); + settingButton = createNormalButton(IOUtils.readIcon("/com/fr/design/images/control/show_setting.png"), Toolkit.i18nText("Fine-Design_Share_Help_Settings")); + + settingButton.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + CoverReportPane.showShareConfig(creator.toData()); + } + }); + toggleButton = new JToggleButton(IOUtils.readIcon("/com/fr/design/images/control/edit_lock.png")); + initButtonStyle(toggleButton); + toggleButton.setSelectedIcon(IOUtils.readIcon("com/fr/design/images/control/edit_unlock.png")); + toggleButton.setToolTipText(Toolkit.i18nText("Fine-Design_Form_Lock_Widget_Ratio")); + toggleButton.addChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + JToggleButton toggleBtn = (JToggleButton) e.getSource(); + String toolTipText = toggleBtn.isSelected() ? Toolkit.i18nText("Fine-Design_Form_UnLock_Widget_Ratio") : Toolkit.i18nText("Fine-Design_Form_Lock_Widget_Ratio"); + toggleBtn.setToolTipText(toolTipText); + } + }); + + firstLabel = createLabel(); + secondLabel = createLabel(); + + add(editButton); + add(toggleButton); + add(settingButton); + add(firstLabel); + add(secondLabel); + } + + protected LayoutManager getCustomLayout() { + return new LayoutManager() { + + @Override + public void removeLayoutComponent(Component comp) { + } + + @Override + public Dimension preferredLayoutSize(Container parent) { + return defaultDimension; + } + + @Override + public Dimension minimumLayoutSize(Container parent) { + return null; + } + + @Override + public void layoutContainer(Container parent) { + int width = parent.getPreferredSize().width; + int buttonWidth = editButton.getPreferredSize().width; + int buttonHeight = editButton.getPreferredSize().height; + int x = (width - buttonWidth) / 2; + editButton.setBounds(x, V_GAP, buttonWidth, buttonHeight); + firstLabel.setBounds(x, V_GAP + editButton.getHeight() + V_GAP / 2, buttonWidth, buttonHeight); + toggleButton.setBounds(x, V_GAP * 2 + editButton.getHeight(), buttonWidth, buttonHeight); + if (creator.isShared()) { + secondLabel.setBounds(x, V_GAP * 2 + editButton.getHeight() + toggleButton.getHeight() + V_GAP / 2, buttonWidth, buttonHeight); + settingButton.setBounds(x, V_GAP * 3 + editButton.getHeight() + toggleButton.getHeight(), buttonWidth, buttonHeight); + } + } + + @Override + public void addLayoutComponent(String name, Component comp) { + } + }; + } + + private JButton createNormalButton(Icon icon, String toolTipText) { + JButton button = new JButton(icon); + initButtonStyle(button); + button.setToolTipText(toolTipText); + return button; + } + + private void initButtonStyle(AbstractButton button) { + button.setBorderPainted(false); + button.setBorder(null); + button.setMargin(new Insets(0, 0, 0, 0)); + button.setContentAreaFilled(false); + } + + private UILabel createLabel() { + return new UILabel() { + @Override + public void paint(Graphics g) { + super.paint(g); + Graphics2D g2d = (Graphics2D) g; + g2d.setColor(Color.WHITE); + g2d.drawLine(H_GAP, 0, toggleButton.getWidth() - H_GAP, 0); + + } + }; + } + + @Override + protected void paintComponent(Graphics g) { + super.paintComponent(g); + int w = this.getWidth(); + int h = this.getHeight(); + Graphics2D g2d = (Graphics2D) g; + g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); + g2d.setColor(FILLED_COLOR); + g2d.fillRoundRect(0, 0, w - 1, h - 1, ARC_VALUE, ARC_VALUE); + g2d.setColor(Color.WHITE); + g2d.drawRoundRect(0, 0, w - 1, h - 1, ARC_VALUE, ARC_VALUE); + } + + public Dimension getDefaultDimension() { + return defaultDimension; + } + + public void setRelativeBounds(Rectangle rectangle) { + this.rectangle = rectangle; + } + +} diff --git a/designer-form/src/main/java/com/fr/design/designer/ui/SelectedPopupDialog.java b/designer-form/src/main/java/com/fr/design/designer/ui/SelectedPopupDialog.java new file mode 100644 index 000000000..e7de92679 --- /dev/null +++ b/designer-form/src/main/java/com/fr/design/designer/ui/SelectedPopupDialog.java @@ -0,0 +1,36 @@ +package com.fr.design.designer.ui; + +import com.fr.design.designer.creator.XCreator; +import com.fr.design.mainframe.DesignerContext; +import com.fr.design.mainframe.FormDesigner; +import java.awt.Rectangle; +import javax.swing.JDialog; + +/** + * @author hades + * @version 10.0 + * Created by hades on 2021/7/09 + */ +public class SelectedPopupDialog extends JDialog { + + /** + * 弹窗的相对组件的偏移 + */ + public static final int OFFSET_X = 5; + + private final PopupControlPanel controlPanel; + + public SelectedPopupDialog(XCreator creator, FormDesigner designer) { + super(DesignerContext.getDesignerFrame()); + this.setUndecorated(true); + this.setModal(false); + controlPanel = new PopupControlPanel(creator, designer); + this.getContentPane().add(controlPanel); + this.setSize(controlPanel.getDefaultDimension()); + } + + public void setRelativeBounds(Rectangle rectangle) { + this.controlPanel.setRelativeBounds(rectangle); + } + +} diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java b/designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java index 8df27c19f..c49902c8d 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java @@ -13,6 +13,7 @@ import com.fr.design.designer.beans.models.SelectionModel; import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XLayoutContainer; import com.fr.design.designer.creator.XWFitLayout; +import com.fr.design.designer.creator.XWTitleLayout; import com.fr.design.form.util.XCreatorConstants; import com.fr.design.roleAuthority.ReportAndFSManagePane; import com.fr.design.utils.ComponentUtils; @@ -325,9 +326,7 @@ public class FormDesignerUI extends ComponentUI { } creator.paintBorder(g, creatorBounds); // 拖拽时不绘制 - if (!designer.getStateModel().isDragging()) { - creator.paintSelectedBorderIcon(g, creatorBounds); - } + creator.showSelectedPopup(designer, creatorBounds, !designer.getStateModel().isDragging() && creator.acceptType(XWTitleLayout.class)); } } From cc92aac234c731dd818c0f43b2993c0c87d4b6f4 Mon Sep 17 00:00:00 2001 From: hades Date: Mon, 12 Jul 2021 09:58:06 +0800 Subject: [PATCH 2/6] =?UTF-8?q?REPORT-54122=20fix=20=E6=97=A0=E7=94=A8impo?= =?UTF-8?q?rt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/designer/creator/XCreator.java | 1 - 1 file changed, 1 deletion(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java b/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java index 7f76eb385..80bf1b51d 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java @@ -26,7 +26,6 @@ import com.fr.design.mainframe.WidgetPropertyPane; import com.fr.design.utils.gui.LayoutUtils; import com.fr.form.ui.Widget; import com.fr.form.ui.container.WTitleLayout; -import com.fr.log.FineLoggerFactory; import com.fr.stable.Constants; import com.fr.stable.StableUtils; import com.fr.stable.StringUtils; From f144baf9cabe638ce3025cb6c3f248b1576bad23 Mon Sep 17 00:00:00 2001 From: hades Date: Mon, 12 Jul 2021 10:05:36 +0800 Subject: [PATCH 3/6] =?UTF-8?q?REPORT-54122=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E9=80=89=E4=B8=AD=E7=8A=B6=E6=80=81=E5=8F=B3?= =?UTF-8?q?=E4=BE=A7=E5=BC=B9=E7=AA=97=E6=94=B9=E8=BF=9B=20=E5=8E=BB?= =?UTF-8?q?=E6=8E=89=E6=97=A0=E7=94=A8=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/designer/ui/PopupControlPanel.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/ui/PopupControlPanel.java b/designer-form/src/main/java/com/fr/design/designer/ui/PopupControlPanel.java index a2e899208..b8133d3da 100644 --- a/designer-form/src/main/java/com/fr/design/designer/ui/PopupControlPanel.java +++ b/designer-form/src/main/java/com/fr/design/designer/ui/PopupControlPanel.java @@ -7,7 +7,6 @@ import com.fr.design.mainframe.CoverReportPane; import com.fr.design.mainframe.EditingMouseListener; import com.fr.design.mainframe.FormDesigner; import com.fr.general.IOUtils; -import com.fr.log.FineLoggerFactory; import com.fr.stable.ArrayUtils; import java.awt.Color; import java.awt.Component; @@ -54,7 +53,6 @@ public class PopupControlPanel extends JPanel { private final UILabel secondLabel; public PopupControlPanel(XCreator creator, FormDesigner designer) { - FineLoggerFactory.getLogger().error("shared: {}", creator.isShared()); if (creator.isShared()) { defaultDimension = new Dimension(20, 85); } From d1e2aa982b3e3d0d9d8dddd5626a9c004d36fd10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Mon, 12 Jul 2021 10:54:35 +0800 Subject: [PATCH 4/6] =?UTF-8?q?CHART-19488=20=E6=97=A5=E6=9C=9F=E8=BD=B4?= =?UTF-8?q?=E7=9A=84=E6=97=A5=E6=9C=9F=E6=8E=A7=E4=BB=B6=E6=9E=84=E5=BB=BA?= =?UTF-8?q?=E6=88=90=E5=AD=97=E7=AC=A6=E4=B8=B2=E5=85=AC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/designer/style/axis/VanChartTimeAxisPane.java | 9 +++++++-- 1 file changed, 7 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 f960b4aff..1a0b78982 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 @@ -293,7 +293,7 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane { DateEditor dateEditor = (DateEditor)minValueField.getCurrentEditor(); String dateString = dateEditor.getUIDatePickerFormat().format(datetmp); timeAxis.setCustomMinValue(StringUtils.isNotEmpty(dateString)); - timeAxis.setMinValue(BaseFormula.createFormulaBuilder().build(dateString)); + timeAxis.setMinValue(createDataFormula(dateString)); } } else { timeAxis.setCustomMinValue(false); @@ -308,7 +308,7 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane { DateEditor dateEditor = (DateEditor)maxValueField.getCurrentEditor(); String dateString = dateEditor.getUIDatePickerFormat().format(datetmp); timeAxis.setCustomMaxValue(StringUtils.isNotEmpty(dateString)); - timeAxis.setMaxValue(BaseFormula.createFormulaBuilder().build(dateString)); + timeAxis.setMaxValue(createDataFormula(dateString)); } } else { timeAxis.setCustomMaxValue(false); @@ -332,6 +332,11 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane { checkBoxUse(); } + private BaseFormula createDataFormula(String dateString) { + String formulaString = "\"" + dateString + "\""; + return BaseFormula.createFormulaBuilder().build(formulaString); + } + public void populate(VanChartTimeAxis timeAxis){ // 最小值 if (timeAxis.isCustomMinValue() && timeAxis.getMinValue() != null) { From dfb56cb2ec65bc17c8e9208d0d000ae654901f71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Mon, 12 Jul 2021 14:47:59 +0800 Subject: [PATCH 5/6] =?UTF-8?q?CHART-19834=20svg=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/editor/editor/Editor.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/editor/editor/Editor.java b/designer-base/src/main/java/com/fr/design/editor/editor/Editor.java index b4e885d1b..d80e3d730 100644 --- a/designer-base/src/main/java/com/fr/design/editor/editor/Editor.java +++ b/designer-base/src/main/java/com/fr/design/editor/editor/Editor.java @@ -4,6 +4,7 @@ package com.fr.design.editor.editor; import com.fr.base.BaseUtils; +import com.fr.stable.StringUtils; import javax.swing.*; import javax.swing.event.ChangeEvent; @@ -34,6 +35,9 @@ public abstract class Editor extends JComponent { // 约定图片的文件名为this.getName(),处理起来方便些 // b:这里国际化没有考虑 public Icon getIcon() { + if (StringUtils.isEmpty(this.getIconName())) { + return null; + } String iconName = "com/fr/design/images/buttonicon/" + this.getIconName() + ".png"; try { return BaseUtils.readIcon(iconName); From c83ade528924a90d9e815bb1d7634663ccbc92a4 Mon Sep 17 00:00:00 2001 From: pengda Date: Mon, 12 Jul 2021 14:57:19 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=EF=BC=8C?= =?UTF-8?q?=E5=B1=8F=E8=94=BD=E4=B8=80=E4=B8=8B=E5=8A=9F=E8=83=BD=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E5=9C=A8=E7=BB=B4=E6=8A=A4=E7=89=88=E6=9C=AC=E5=8F=91?= =?UTF-8?q?=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/env/CheckServiceDialog.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/env/CheckServiceDialog.java b/designer-base/src/main/java/com/fr/env/CheckServiceDialog.java index fb1adae6f..441a1fdec 100644 --- a/designer-base/src/main/java/com/fr/env/CheckServiceDialog.java +++ b/designer-base/src/main/java/com/fr/env/CheckServiceDialog.java @@ -167,7 +167,8 @@ public class CheckServiceDialog extends JDialog implements ActionListener { centerPanel.add(detailsPane, BorderLayout.CENTER); JPanel buttonPanel = FRGUIPaneFactory.createBorderLayout_M_Pane(); buttonPanel.setBorder(BorderFactory.createEmptyBorder(0, 10, 10, 10)); - if (isOnline()) { + boolean Sync = false; + if (isOnline() && Sync) { ignoreButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Sync_Ignore")); ignoreButton.addActionListener(this); syncButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Sync_To_Local")); @@ -183,8 +184,6 @@ public class CheckServiceDialog extends JDialog implements ActionListener { buttonPanel.add(progressBar, BorderLayout.CENTER); buttonPanel.add(syncButton, BorderLayout.EAST); } else { - UILabel adviceLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Sync_Suggestion")); - centerPanel.add(adviceLabel, BorderLayout.SOUTH); UIButton okButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Button_Confirm")); okButton.addActionListener(this); buttonPanel.add(okButton, BorderLayout.EAST);