From 82517ab7436bddd1277b62dd8f3cff16ceb22c17 Mon Sep 17 00:00:00 2001 From: Hades Date: Wed, 19 Dec 2018 10:27:04 +0800 Subject: [PATCH 01/10] =?UTF-8?q?REPORT-13528=20=E6=9C=80=E6=96=B0?= =?UTF-8?q?=E7=9A=84jar=EF=BC=8C=E5=9B=BE=E7=89=87=E8=B6=85=E9=93=BE?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E5=8F=96=E5=88=B0=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SeriesCondition/impl/FormHyperlinkNorthPane.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/FormHyperlinkNorthPane.java b/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/FormHyperlinkNorthPane.java index 63d94bbb2..5159e318c 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/FormHyperlinkNorthPane.java +++ b/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/FormHyperlinkNorthPane.java @@ -110,12 +110,14 @@ public class FormHyperlinkNorthPane extends BasicBeanPane } String editorName = formHyperlink.getRelateEditorName(); //防止初始的时候有空白选项 - if (editorName == null) { - return; + String[] formHyperlinkEditNames = getFormHyperlinkEditNames(); + if (editorName == null && formHyperlinkEditNames.length > 0) { + editorName = formHyperlinkEditNames[0]; + formHyperlink.setRelateEditorName(editorName); } if (targetFrameComboBox != null) { //noinspection unchecked - targetFrameComboBox.setModel(new DefaultComboBoxModel(getFormHyperlinkEditNames())); + targetFrameComboBox.setModel(new DefaultComboBoxModel(formHyperlinkEditNames)); targetFrameComboBox.setSelectedItem(editorName); } } From 630ad3cf0c223ffa29132528d2baf177b4a39b86 Mon Sep 17 00:00:00 2001 From: kerry Date: Wed, 19 Dec 2018 14:56:48 +0800 Subject: [PATCH 02/10] =?UTF-8?q?MOBILE-18837=E3=80=90RN=E3=80=91=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E3=80=8Btabpane=E3=80=8B=E7=A7=BB=E5=8A=A8=E7=AB=AF?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E6=A8=A1=E6=9D=BF=E8=AE=BE=E4=B8=BA=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=EF=BC=8Ctabpane=E4=B8=80=E4=BA=9B=E5=AD=97=E4=BD=93?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E4=B8=8D=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mobile/ui/DefaultMobileStyleDefinePane.java | 15 ++++++++++++--- .../mobile/ui/TemplateStyleDefinePaneFactory.java | 5 +++-- .../designer/layout/WCardTagLayoutDefinePane.java | 5 ++++- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/DefaultMobileStyleDefinePane.java b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/DefaultMobileStyleDefinePane.java index 10fc42e8f..860a0c9fb 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/DefaultMobileStyleDefinePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/DefaultMobileStyleDefinePane.java @@ -7,7 +7,10 @@ import com.fr.form.ui.container.cardlayout.WCardTagLayout; import com.fr.general.FRFont; import com.fr.general.cardtag.mobile.DefaultMobileTemplateStyle; import com.fr.general.cardtag.mobile.MobileTemplateStyle; +import com.fr.general.cardtag.mobile.TabFontConfig; + import java.awt.BasicStroke; +import java.awt.Color; import java.awt.Dimension; import java.awt.FontMetrics; import java.awt.Graphics; @@ -41,17 +44,17 @@ public class DefaultMobileStyleDefinePane extends MobileTemplateStyleDefinePane @Override public MobileTemplateStyle updateBean() { - return new DefaultMobileTemplateStyle(); + return getDefaultTemplateStyle(); } public MobileTemplateStyle updateConfig(){ - return new DefaultMobileTemplateStyle(); + return getDefaultTemplateStyle(); } @Override protected MobileTemplateStyle getDefaultTemplateStyle() { - return new DefaultMobileTemplateStyle(); + return new DefaultMobileTemplateStyle(new TabFontConfig(getTagLayout().getTitleFont())); } @Override @@ -74,6 +77,10 @@ public class DefaultMobileStyleDefinePane extends MobileTemplateStyleDefinePane this.setBackground(DefaultMobileTemplateStyle.DEFAULT_INITIAL_COLOR); } + public Color getInitialColor() { + return DefaultMobileTemplateStyle.DEFAULT_INITIAL_COLOR; + } + public void repaint() { super.repaint(); } @@ -94,11 +101,13 @@ public class DefaultMobileStyleDefinePane extends MobileTemplateStyleDefinePane int fontHeight = fm.getHeight(); int ascentHeight = fm.getAscent(); for (int i = 0; i < cardTagLayout.getWidgetCount(); i++) { + g2d.setColor(frFont.getForeground()); CardSwitchButton cardSwitchButton = cardTagLayout.getSwitchButton(i); String displayName = calculateDisplayName(cardSwitchButton.getText(), fm, eachWidth); int width = fm.stringWidth(displayName); g2d.drawString(displayName, (eachWidth - width) / 2, (panelHeight - fontHeight) / 2 + ascentHeight); if (i == 0) { + g2d.setColor(Color.BLACK); g2d.setStroke(new BasicStroke(2.0f)); g2d.drawLine(0, panelHeight - 1, eachWidth, panelHeight - 1); } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/TemplateStyleDefinePaneFactory.java b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/TemplateStyleDefinePaneFactory.java index 9b287de07..dab5a03ba 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/TemplateStyleDefinePaneFactory.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/TemplateStyleDefinePaneFactory.java @@ -24,9 +24,10 @@ public class TemplateStyleDefinePaneFactory { public static BasicBeanPane createDefinePane(String style, WCardTagLayout tagLayout) { StyleDefinePaneUI styleDefinePaneUI = defineMap.get(style); - Class> clazz = styleDefinePaneUI.getaClass(); - if (clazz == null) { + if(styleDefinePaneUI == null){ + styleDefinePaneUI = defineMap.get(DefaultMobileTemplateStyle.STYLE_NAME); } + Class> clazz = styleDefinePaneUI.getaClass(); BasicBeanPane quickPane = null; try { quickPane = Reflect.on(clazz).create(tagLayout).get(); diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/WCardTagLayoutDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/WCardTagLayoutDefinePane.java index d1e68baf3..41ea1c1c7 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/WCardTagLayoutDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/WCardTagLayoutDefinePane.java @@ -115,6 +115,7 @@ public class WCardTagLayoutDefinePane extends AbstractDataModify templateStyleEditor.setValue(ob.getTemplateStyle()); FRFont frFont = layoutBorderStyle.getTitle().getFrFont(); if (frFont != null) { + ob.setTitleFont(frFont); frFontPane.populateBean(frFont); } } @@ -126,8 +127,10 @@ public class WCardTagLayoutDefinePane extends AbstractDataModify XWCardLayout xCardLayout = ((XWCardMainBorderLayout) topLayout).getCardPart(); LayoutBorderStyle layoutBorderStyle = xCardLayout.toData().getBorderStyle(); FRFont frFont = layoutBorderStyle.getTitle().getFrFont() == null ? FRFont.getInstance() : layoutBorderStyle.getTitle().getFrFont(); - layoutBorderStyle.getTitle().setFrFont(frFontPane.update(frFont)); + FRFont titleFont = frFontPane.update(frFont); + layoutBorderStyle.getTitle().setFrFont(titleFont); WCardTagLayout layout = (WCardTagLayout) creator.toData(); + layout.setTitleFont(titleFont); boolean isHori = displayPositionGroup.getSelectedIndex() == WTabDisplayPosition.TOP_POSITION.getType() || displayPositionGroup.getSelectedIndex() == WTabDisplayPosition.BOTTOM_POSITION.getType(); if (ComparatorUtils.equals(getGlobalName(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Tab_Style_Template"))) { layout.setDisplayPosition(WTabDisplayPosition.parse(displayPositionGroup.getSelectedIndex())); From 42f0405e0c6f27667820027e9bf24f837612a442 Mon Sep 17 00:00:00 2001 From: plough Date: Wed, 19 Dec 2018 16:04:10 +0800 Subject: [PATCH 03/10] =?UTF-8?q?REPORT-13654=20=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E6=8D=A2=E4=B8=8A12=E5=8F=B7=E7=9A=84release?= =?UTF-8?q?=E5=90=8E=EF=BC=8C=E8=B0=83=E8=89=B2=E6=9D=BF=E5=87=BA=E4=B8=8D?= =?UTF-8?q?=E6=9D=A5=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../style/color/NewColorSelectPane.java | 21 +++++++++++----- .../style/color/PickColorButtonFactory.java | 24 ++++++++++++------- 2 files changed, 31 insertions(+), 14 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/style/color/NewColorSelectPane.java b/designer-base/src/main/java/com/fr/design/style/color/NewColorSelectPane.java index 0f5e629e2..d53232416 100644 --- a/designer-base/src/main/java/com/fr/design/style/color/NewColorSelectPane.java +++ b/designer-base/src/main/java/com/fr/design/style/color/NewColorSelectPane.java @@ -8,11 +8,16 @@ import com.fr.design.gui.ibutton.UIButton; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.DesignerContext; - -import javax.swing.*; +import javax.swing.BorderFactory; +import javax.swing.Box; +import javax.swing.JPanel; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; -import java.awt.*; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Cursor; +import java.awt.Dimension; +import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; @@ -92,11 +97,15 @@ public class NewColorSelectPane extends BasicPane implements ColorSelectable { centerPane.add(Box.createVerticalStrut(1)); // mod by anchore 16/11/16 - UIButton customButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_More_Color")); + final UIButton customButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_More_Color")); - customButton.addActionListener(new ActionListener() { + // 不能使用 ActionListener,否则设计器工具栏中的"更多颜色"按钮会有问题(REPORT-13654) + customButton.addMouseListener(new MouseAdapter() { @Override - public void actionPerformed(ActionEvent e) { + public void mousePressed(MouseEvent e) { + if (!customButton.isEnabled()) { + return; + } customButtonPressed(); } }); diff --git a/designer-base/src/main/java/com/fr/design/style/color/PickColorButtonFactory.java b/designer-base/src/main/java/com/fr/design/style/color/PickColorButtonFactory.java index 67d99819d..f394801c8 100644 --- a/designer-base/src/main/java/com/fr/design/style/color/PickColorButtonFactory.java +++ b/designer-base/src/main/java/com/fr/design/style/color/PickColorButtonFactory.java @@ -4,11 +4,15 @@ import com.fr.base.BaseUtils; import com.fr.design.gui.ibutton.SpecialUIButton; import com.fr.design.gui.ibutton.UIBasicButtonUI; -import javax.swing.*; -import javax.swing.plaf.ButtonUI; -import javax.swing.plaf.basic.BasicButtonUI; -import java.awt.*; -import java.awt.event.*; +import javax.swing.JButton; +import javax.swing.JComponent; +import java.awt.Color; +import java.awt.Cursor; +import java.awt.Dimension; +import java.awt.Graphics; +import java.awt.Image; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; /** * Created by plough on 2016/12/22. @@ -28,7 +32,7 @@ class PickColorButtonFactory { * @return SpecialUIButton 屏幕取色按钮 */ static JButton getPickColorButton(final ColorSelectable colorSelectable, IconType iconType, final boolean setColorRealTime) { - SpecialUIButton pickColorButton = new SpecialUIButton(new WhiteButtonUI()); + final SpecialUIButton pickColorButton = new SpecialUIButton(new WhiteButtonUI()); PickColorButtonFactory.iconType = iconType; if (iconType == IconType.ICON16) { @@ -42,9 +46,13 @@ class PickColorButtonFactory { pickColorButton.setPreferredSize(new Dimension(iconSize, iconSize)); pickColorButton.setCursor(new Cursor(Cursor.HAND_CURSOR)); - pickColorButton.addActionListener(new ActionListener() { + // 不能使用 ActionListener,否则设计器工具栏中的取色按钮会有问题(REPORT-13654) + pickColorButton.addMouseListener(new MouseAdapter() { @Override - public void actionPerformed(ActionEvent e) { + public void mousePressed(MouseEvent e) { + if (!pickColorButton.isEnabled()) { + return; + } new ColorPicker(colorSelectable, setColorRealTime); } }); From 6b7bb5b6c3fc4c1e58a41da6fae0ad629e11ab7d Mon Sep 17 00:00:00 2001 From: zack Date: Thu, 20 Dec 2018 09:47:40 +0800 Subject: [PATCH 04/10] =?UTF-8?q?REPORT-10829=20=E5=BC=80=E5=8F=91?= =?UTF-8?q?=E8=80=85=E5=A4=A7=E8=B5=9B=E6=94=AF=E6=92=91,=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=90=8C=E6=AD=A510.0=20,=E6=9C=89=E9=81=97=E6=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/grid/selection/CellSelection.java | 4 ++++ .../src/main/java/com/fr/grid/selection/FloatSelection.java | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java b/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java index e6eb983c6..ee80f22a2 100644 --- a/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java +++ b/designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java @@ -508,6 +508,10 @@ public class CellSelection extends Selection { popup.add(DeprecatedActionManager.getInsertMenu(ePane)); popup.add(DeprecatedActionManager.getDeleteMenu(ePane)); popup.add(DeprecatedActionManager.getClearMenu(ePane)); + + popup.addSeparator(); + + addExtraMenu(ePane, popup); return popup; } diff --git a/designer-realize/src/main/java/com/fr/grid/selection/FloatSelection.java b/designer-realize/src/main/java/com/fr/grid/selection/FloatSelection.java index c982934a0..6ce0d736f 100644 --- a/designer-realize/src/main/java/com/fr/grid/selection/FloatSelection.java +++ b/designer-realize/src/main/java/com/fr/grid/selection/FloatSelection.java @@ -1,6 +1,5 @@ package com.fr.grid.selection; -import com.fr.base.BaseUtils; import com.fr.base.FRContext; import com.fr.base.vcs.DesignerMode; import com.fr.design.actions.cell.CleanAuthorityAction; @@ -27,7 +26,6 @@ import com.fr.design.mainframe.ElementCasePane.Clear; import com.fr.design.selection.QuickEditor; import com.fr.design.utils.DesignUtils; import com.fr.general.ComparatorUtils; - import com.fr.report.cell.FloatElement; import com.fr.report.elementcase.TemplateElementCase; import com.fr.stable.ColumnRow; @@ -149,6 +147,10 @@ public class FloatSelection extends Selection { popup.add(new EditFloatElementNameAction(ePane).createMenuItem()); + popup.addSeparator(); + + addExtraMenu(ePane, popup); + return popup; } From fcb58a3448c87d95554f99c2dfada0eeda64a693 Mon Sep 17 00:00:00 2001 From: zack Date: Thu, 20 Dec 2018 15:26:44 +0800 Subject: [PATCH 05/10] =?UTF-8?q?REPORT-13018=20=E5=A4=A7=E8=B5=9B?= =?UTF-8?q?=E5=90=8E=E7=BB=AD=E5=BC=80=E4=B8=A4=E4=B8=AA=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/mainframe/loghandler/LogMessageBar.java | 1 + 1 file changed, 1 insertion(+) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/loghandler/LogMessageBar.java b/designer-base/src/main/java/com/fr/design/mainframe/loghandler/LogMessageBar.java index 620915243..bf815e1d7 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/loghandler/LogMessageBar.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/loghandler/LogMessageBar.java @@ -73,5 +73,6 @@ public class LogMessageBar extends JPanel { if (dlg != null) { dlg.dispose(); } + THIS = null; } } \ No newline at end of file From ef2d65581066c301ae265f881e778a63a59a26b9 Mon Sep 17 00:00:00 2001 From: "Mata.Li" Date: Thu, 20 Dec 2018 16:30:52 +0800 Subject: [PATCH 06/10] REPORT-13689 & REPORT-13733 & REPORT-13716 & REPORT-13720 --- .../design/file/HistoryTemplateListCache.java | 5 ++ .../fr/design/mainframe/DesignerFrame.java | 26 ++++--- .../mainframe/EastRegionContainerPane.java | 2 + .../actions/server/StyleListAction.java | 77 ++++++++++--------- .../com/fr/design/present/StyleArrayPane.java | 16 ++-- 5 files changed, 72 insertions(+), 54 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/file/HistoryTemplateListCache.java b/designer-base/src/main/java/com/fr/design/file/HistoryTemplateListCache.java index e4bd1db95..b41e15e80 100644 --- a/designer-base/src/main/java/com/fr/design/file/HistoryTemplateListCache.java +++ b/designer-base/src/main/java/com/fr/design/file/HistoryTemplateListCache.java @@ -2,6 +2,7 @@ package com.fr.design.file; import com.fr.base.chart.chartdata.CallbackEvent; import com.fr.design.DesignerEnvManager; +import com.fr.design.base.mode.DesignModeContext; import com.fr.design.data.DesignTableDataManager; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.DesignerContext; @@ -59,6 +60,10 @@ public class HistoryTemplateListCache implements CallbackEvent { public void closeSelectedReport(JTemplate selected) { DesignModuleFactory.clearChartPropertyPane(); DesignTableDataManager.closeTemplate(selected); + //直接关闭模板的时候退出权限编辑 + if (DesignModeContext.isAuthorityEditing()) { + DesignerContext.getDesignerFrame().closeAuthorityEditing(); + } if (contains(selected) == -1) { return; } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java index 5c262da9d..d7c40e6bd 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java @@ -10,6 +10,7 @@ import com.fr.design.DesignState; import com.fr.design.DesignerEnvManager; import com.fr.design.ExtraDesignClassManager; import com.fr.design.actions.core.ActionFactory; +import com.fr.design.base.mode.DesignModeContext; import com.fr.design.constants.UIConstants; import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.datapane.TableDataTreePane; @@ -17,6 +18,7 @@ import com.fr.design.env.DesignerWorkspaceInfo; import com.fr.design.event.DesignerOpenedListener; import com.fr.design.event.TargetModifiedEvent; import com.fr.design.event.TargetModifiedListener; +import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.MutilTempalteTabPane; import com.fr.design.file.NewTemplatePane; @@ -224,16 +226,8 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta } public void mouseReleased(MouseEvent e) { - if (DesignerMode.isAuthorityEditing()) { - DesignerMode.setMode(DesignerMode.NORMAL); - WestRegionContainerPane.getInstance().replaceDownPane( - TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter())); - HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().refreshEastPropertiesPane(); - DesignerContext.getDesignerFrame().resetToolkitByPlus( - HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getToolBarMenuDockPlus()); - needToAddAuhtorityPaint(); - refreshDottedLine(); - fireAuthorityStateToNomal(); + if (DesignModeContext.isAuthorityEditing()) { + closeAuthorityEditing(); } } @@ -332,6 +326,18 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta this.progressDialog = new ProgressDialog(this); } + public void closeAuthorityEditing(){ + DesignModeContext.switchTo(com.fr.design.base.mode.DesignerMode.NORMAL); + WestRegionContainerPane.getInstance().replaceDownPane( + TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter())); + HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().refreshEastPropertiesPane(); + DesignerContext.getDesignerFrame().resetToolkitByPlus( + HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().getToolBarMenuDockPlus()); + needToAddAuhtorityPaint(); + refreshDottedLine(); + fireAuthorityStateToNomal(); + } + /** * 注册app. * diff --git a/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java b/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java index a49d66791..97ce22814 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java @@ -412,6 +412,8 @@ public class EastRegionContainerPane extends UIEastResizableContainer { if (propertyItem.isVisible() && propertyItem.isEnabled() && !propertyItem.isPoppedOut()) { propertyCard.show(rightPane, tabName); propertyItem.setTabButtonSelected(); + //从单元格菜单过来也要关闭弹出窗 + hideCurrentPopupPane(); } } diff --git a/designer-realize/src/main/java/com/fr/design/actions/server/StyleListAction.java b/designer-realize/src/main/java/com/fr/design/actions/server/StyleListAction.java index 61276163d..4f57bdc2a 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/server/StyleListAction.java +++ b/designer-realize/src/main/java/com/fr/design/actions/server/StyleListAction.java @@ -10,8 +10,11 @@ import com.fr.design.mainframe.DesignerFrame; import com.fr.design.menu.MenuKeySet; import com.fr.general.IOUtils; +import com.fr.transaction.CallBackAdaptor; import com.fr.transaction.Configurations; import com.fr.transaction.Worker; +import com.fr.transaction.WorkerCallBack; +import com.fr.transaction.WorkerFacade; import javax.swing.*; import java.awt.event.ActionEvent; @@ -21,16 +24,17 @@ import java.awt.event.ActionEvent; * StyleList Action */ public class StyleListAction extends UpdateAction { - public StyleListAction() { + public StyleListAction() { this.setMenuKeySet(PREDEFINED_STYLES); - this.setName(getMenuKeySet().getMenuKeySetName()+ "..."); + this.setName(getMenuKeySet().getMenuKeySetName() + "..."); this.setMnemonic(getMenuKeySet().getMnemonic()); - this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/m_web/style.png")); - this.generateAndSetSearchText(StyleManagerPane.class.getName()); - } + this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/m_web/style.png")); + this.generateAndSetSearchText(StyleManagerPane.class.getName()); + } /** * 动作 + * * @param evt 事件 */ public void actionPerformed(ActionEvent evt) { @@ -40,45 +44,44 @@ public class StyleListAction extends UpdateAction { styleListDialog.addDialogActionListener(new DialogActionAdapter() { @Override public void doOk() { - Configurations.update(new Worker() { + Configurations.modify(new WorkerFacade(ServerPreferenceConfig.class) { @Override public void run() { styleListPane.update(ServerPreferenceConfig.getInstance()); } + }.addCallBack(new CallBackAdaptor(){ + @Override + public void afterCommit() { + DesignerContext.getDesignerBean("predefinedStyle").refreshBeanElement(); + } + })); - @Override - public Class[] targets() { - return new Class[]{ServerPreferenceConfig.class}; - } - }); - - } + } }); - ServerPreferenceConfig mirror = ServerPreferenceConfig.getInstance().mirror(); - styleListPane.populate(mirror); - styleListDialog.setVisible(true); - - } - - @Override - public void update() { - this.setEnabled(true); - } + ServerPreferenceConfig mirror = ServerPreferenceConfig.getInstance().mirror(); + styleListPane.populate(mirror); + styleListDialog.setVisible(true); + } + + @Override + public void update() { + this.setEnabled(true); + } - public static final MenuKeySet PREDEFINED_STYLES = new MenuKeySet() { - @Override - public char getMnemonic() { - return 'K'; - } + public static final MenuKeySet PREDEFINED_STYLES = new MenuKeySet() { + @Override + public char getMnemonic() { + return 'K'; + } - @Override - public String getMenuName() { - return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ServerM_Predefined_Styles"); - } + @Override + public String getMenuName() { + return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ServerM_Predefined_Styles"); + } - @Override - public KeyStroke getKeyStroke() { - return null; - } - }; + @Override + public KeyStroke getKeyStroke() { + return null; + } + }; } diff --git a/designer-realize/src/main/java/com/fr/design/present/StyleArrayPane.java b/designer-realize/src/main/java/com/fr/design/present/StyleArrayPane.java index bd7602ee7..76c1e7261 100644 --- a/designer-realize/src/main/java/com/fr/design/present/StyleArrayPane.java +++ b/designer-realize/src/main/java/com/fr/design/present/StyleArrayPane.java @@ -2,6 +2,7 @@ package com.fr.design.present; import com.fr.base.Style; import com.fr.config.ServerPreferenceConfig; +import com.fr.config.StyleMap; import com.fr.design.gui.controlpane.AbstractNameableCreator; import com.fr.design.gui.controlpane.JListControlPane; import com.fr.design.gui.controlpane.NameableCreator; @@ -13,6 +14,8 @@ import com.fr.design.style.StylePane; import com.fr.general.NameObject; import com.fr.stable.Nameable; +import com.fr.transaction.Configurations; +import com.fr.transaction.WorkerAdaptor; import java.util.ArrayList; import java.util.Iterator; @@ -90,17 +93,16 @@ public class StyleArrayPane extends JListControlPane { /** * Update. */ - public void update(ServerPreferenceConfig configManager) { - configManager.clearAllStyle(); + public void update(final ServerPreferenceConfig configManager) { + //configManager.clearAllStyle(); // Nameable[]居然不能强转成Parameter[],一定要这么写... Nameable[] nameables = this.update(); - + final StyleMap styleMap = new StyleMap(); for (int i = 0; i < nameables.length; i++) { - configManager.putStyle(((NameObject)nameables[i]).getName(), (Style)((NameObject)nameables[i]).getObject()); + styleMap.put(((NameObject)nameables[i]).getName(), (Style)((NameObject)nameables[i]).getObject()); } - DesignerContext.getDesignerBean("predefinedStyle").refreshBeanElement(); - } - + configManager.setStyleMap(styleMap); + } } From 3ed78faa5143aacd59c59cd984c1a7492fddf72b Mon Sep 17 00:00:00 2001 From: "Wim.Zhai" Date: Thu, 20 Dec 2018 19:11:33 +0800 Subject: [PATCH 07/10] =?UTF-8?q?CHART-3169=20=E6=96=B0=E7=89=B9=E6=80=A7?= =?UTF-8?q?=E5=9B=BE=E8=A1=A8=20=E6=A0=B7=E5=BC=8F=E7=B3=BB=E5=88=97?= =?UTF-8?q?=E9=A2=9C=E8=89=B2=E9=A3=8E=E6=A0=BC=20=E6=94=B9=E4=B8=BA'?= =?UTF-8?q?=E6=B8=90=E5=8F=98'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../van/chart/designer/component/VanChartBeautyPane.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartBeautyPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartBeautyPane.java index 44c0e1a55..f6642bd71 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartBeautyPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartBeautyPane.java @@ -4,6 +4,7 @@ import com.fr.chart.base.ChartConstants; import com.fr.design.beans.BasicBeanPane; import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ilable.UILabel; +import com.fr.design.i18n.Toolkit; import com.fr.design.layout.TableLayout; import com.fr.van.chart.designer.TableLayout4VanChartHelper; @@ -28,7 +29,7 @@ public class VanChartBeautyPane extends BasicBeanPane { double[] columnSize = {f, e}; double[] rowSize = {p}; Component[][] components = new Component[][]{ - new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Style")), styleBox}, + new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Style")), styleBox}, } ; JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); this.setLayout(new BorderLayout()); @@ -36,8 +37,8 @@ public class VanChartBeautyPane extends BasicBeanPane { } protected String[] getNameArray(){ - return new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Default_Name"), - com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Top_Down_Shade") + return new String[]{Toolkit.i18nText("Fine-Design_Chart_Default_Name"), + Toolkit.i18nText("Fine-Design_Chart_Style_TopDownShade") }; } @Override From 67ab9101f53ef4b1ae9091623dcdd2c0c39bf3c4 Mon Sep 17 00:00:00 2001 From: "Wim.Zhai" Date: Thu, 20 Dec 2018 19:15:31 +0800 Subject: [PATCH 08/10] =?UTF-8?q?CHART-3573=20=E4=BD=BF=E7=94=A8=E6=96=B0?= =?UTF-8?q?=E7=9A=84key=E6=9D=A5=E5=8C=BA=E5=88=AB=E5=BC=80'=E7=A9=BA?= =?UTF-8?q?=E5=80=BC=E6=96=AD=E5=BC=80'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/gui/style/series/CustomDefaultSeriesPane.java | 2 +- .../chart/gui/style/series/CustomTypeConditionSeriesPane.java | 2 +- .../design/mainframe/chart/gui/style/series/LineSeriesPane.java | 2 +- .../mainframe/chart/gui/style/series/RadarSeriesPane.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/CustomDefaultSeriesPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/CustomDefaultSeriesPane.java index d31aad3b3..d0507acc0 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/CustomDefaultSeriesPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/CustomDefaultSeriesPane.java @@ -240,7 +240,7 @@ public class CustomDefaultSeriesPane extends BasicPane{ isCurve = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Curve_Smooth")); lineStyle = new LineComboBox(CoreConstants.STRIKE_LINE_STYLE_ARRAY_4_CHART); markerPane = new MarkerComboBox(MarkerFactory.getMarkerArray()); - String[] nameArray = {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Null_Value_Break"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Null_Value_Continue")}; + String[] nameArray = {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Break"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Null_Value_Continue")}; Boolean[] valueArray = {true, false}; isNullValueBreak = new UIButtonGroup(nameArray, valueArray); double p = TableLayout.PREFERRED; diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/CustomTypeConditionSeriesPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/CustomTypeConditionSeriesPane.java index 7b6bb3657..3c2f52349 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/CustomTypeConditionSeriesPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/CustomTypeConditionSeriesPane.java @@ -449,7 +449,7 @@ public class CustomTypeConditionSeriesPane extends BasicBeanPane{ lineStyle.setPreferredSize(new Dimension(150,20)); markerPane.setPreferredSize(new Dimension(150,20)); - String[] nameArray = {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Null_Value_Break"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Null_Value_Continue")}; + String[] nameArray = {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Break"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Null_Value_Continue")}; Boolean[] valueArray = {true, false}; isNullValueBreak = new UIButtonGroup(nameArray, valueArray); double p = TableLayout.PREFERRED; diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/LineSeriesPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/LineSeriesPane.java index 9fbbb1197..612e89b48 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/LineSeriesPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/LineSeriesPane.java @@ -49,7 +49,7 @@ public class LineSeriesPane extends AbstractPlotSeriesPane{ isCurve = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Curve_Smooth")); lineStyle = new LineComboBox(CoreConstants.STRIKE_LINE_STYLE_ARRAY_4_CHART); markerPane = new MarkerComboBox(MarkerFactory.getMarkerArray()); - String[] nameArray = {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Null_Value_Break"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Null_Value_Continue")}; + String[] nameArray = {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Break"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Null_Value_Continue")}; Boolean[] valueArray = {true, false}; isNullValueBreak = new UIButtonGroup(nameArray, valueArray); double p = TableLayout.PREFERRED; diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/RadarSeriesPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/RadarSeriesPane.java index 894347327..a5a3fb4d6 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/RadarSeriesPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/RadarSeriesPane.java @@ -45,7 +45,7 @@ public class RadarSeriesPane extends AbstractPlotSeriesPane{ isCurve = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Fill")); lineStyle = new LineComboBox(CoreConstants.STRIKE_LINE_STYLE_ARRAY_4_CHART); markerPane = new MarkerComboBox(MarkerFactory.getMarkerArray()); - String[] nameArray = {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Null_Value_Break"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Null_Value_Continue")}; + String[] nameArray = {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Break"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Null_Value_Continue")}; Boolean[] valueArray = {true, false}; isNullValueBreak = new UIButtonGroup(nameArray, valueArray); From 2dcaaef7ed49bffdd039ffbd5c4daea63aaab0fe Mon Sep 17 00:00:00 2001 From: "Wim.Zhai" Date: Thu, 20 Dec 2018 20:11:23 +0800 Subject: [PATCH 09/10] =?UTF-8?q?CHART-3575=20=E4=BF=AE=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E7=9A=84'=E5=88=86=E7=B1=BB=E5=90=8D'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/chart/gui/style/ChartDatapointLabelPane.java | 2 +- .../component/format/CategoryNameFormatPaneWithCheckBox.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartDatapointLabelPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartDatapointLabelPane.java index 48585ae5b..8e198ea6c 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartDatapointLabelPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartDatapointLabelPane.java @@ -96,7 +96,7 @@ public class ChartDatapointLabelPane extends BasicPane{ boolean isGuidline = plot.isSupportLeadLine(); if(plot.isSupportCategoryFilter()) { - isCategory = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Style_Format_Category_Name")); + isCategory = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Category_Use_Name")); } isSeries = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Series_Name")); isValue = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Use_Value")); diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/format/CategoryNameFormatPaneWithCheckBox.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/format/CategoryNameFormatPaneWithCheckBox.java index 2e0d55a41..575143a62 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/format/CategoryNameFormatPaneWithCheckBox.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/format/CategoryNameFormatPaneWithCheckBox.java @@ -1,6 +1,7 @@ package com.fr.van.chart.designer.component.format; +import com.fr.design.i18n.Toolkit; import com.fr.van.chart.designer.style.VanChartStylePane; import javax.swing.JPanel; @@ -18,6 +19,7 @@ public class CategoryNameFormatPaneWithCheckBox extends VanChartFormatPaneWithCh @Override protected String getCheckBoxText() { - return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Style_Format_Category_Name"); + //"分类名" 图表(新特性)标签、提示时有用到 + return Toolkit.i18nText("Fine-Design_Chart_Category_Use_Name"); } } From f2d684e167b360eeb42abded516b511611d5eef5 Mon Sep 17 00:00:00 2001 From: "Mata.Li" Date: Fri, 21 Dec 2018 10:37:25 +0800 Subject: [PATCH 10/10] MOBILE-18801 --- .../fr/design/actions/FormMobileAttrAction.java | 16 ++++++++++++++++ .../designer/layout/FRFitLayoutDefinePane.java | 11 +++-------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/actions/FormMobileAttrAction.java b/designer-form/src/main/java/com/fr/design/actions/FormMobileAttrAction.java index 033ba5ea5..d77078fad 100644 --- a/designer-form/src/main/java/com/fr/design/actions/FormMobileAttrAction.java +++ b/designer-form/src/main/java/com/fr/design/actions/FormMobileAttrAction.java @@ -3,11 +3,15 @@ package com.fr.design.actions; import com.fr.base.BaseUtils; import com.fr.base.iofile.attr.MobileOnlyTemplateAttrMark; import com.fr.design.actions.JTemplateAction; +import com.fr.design.designer.creator.XLayoutContainer; +import com.fr.design.designer.creator.XWAbsoluteBodyLayout; +import com.fr.design.designer.creator.XWFitLayout; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.form.mobile.FormMobileAttrPane; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.FormArea; +import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.JForm; import com.fr.design.mainframe.WidgetPropertyPane; import com.fr.design.menu.MenuKeySet; @@ -73,6 +77,9 @@ public class FormMobileAttrAction extends JTemplateAction { formTpl.setFormMobileAttr(formMobileAttr); // 会调整 body 的自适应布局,放到最后 ((FormArea)jf.getFormDesign().getParent()).onMobileAttrModified(); jf.getFormDesign().getSelectionModel().setSelectedCreator(jf.getFormDesign().getRootComponent()); + //改变布局为自适应布局,只在移动端属性设置保存后改变一次 + doChangeBodyLayout(); + WidgetPropertyPane.getInstance().refreshDockingView(); jf.fireTargetModified(); } @@ -80,6 +87,15 @@ public class FormMobileAttrAction extends JTemplateAction { dialog.setVisible(true); } + private void doChangeBodyLayout(){ + FormDesigner formDesigner = WidgetPropertyPane.getInstance().getEditingFormDesigner(); + XLayoutContainer rootLayout = formDesigner.getRootComponent(); + if (rootLayout.getComponentCount() == 1 && rootLayout.getXCreator(0).acceptType(XWAbsoluteBodyLayout.class)) { + rootLayout = (XWAbsoluteBodyLayout) rootLayout.getXCreator(0); + } + ((XWFitLayout)formDesigner.getRootComponent()).switch2FitBodyLayout(rootLayout); + } + @Focus(id = "com.fr.mobile.mobile_template_frm", text = "Fine-Design_Function_Mobile_Template_Frm", source = Original.EMBED) private void recordFunction() { // do nothing diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java index 0f3e0aba0..dd19d7c81 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java @@ -137,14 +137,9 @@ public class FRFitLayoutDefinePane extends AbstractDataModify { XLayoutContainer rootLayout = selectedBodyLayout(formDesigner); if (rootLayout != formDesigner.getRootComponent() && formDesigner.getSelectionModel().getSelection().getSelectedCreator() == formDesigner.getRootComponent()) { - //原单例面板populate根据当前样式populate属性面板,现加入移动端逻辑:可能需要根据面板属性改变样式 - Form form = formDesigner.getTarget(); - if (form.getFormMobileAttr().isMobileOnly() && form.getFormMobileAttr().isAdaptivePropertyAutoMatch()) { - ((XWFitLayout)formDesigner.getRootComponent()).switch2FitBodyLayout(rootLayout); - } else { - formDesigner.getSelectionModel().setSelectedCreators( - FormSelectionUtils.rebuildSelection(xWFitLayout, new Widget[]{selectedBodyLayout(formDesigner).toData()})); - } + formDesigner.getSelectionModel().setSelectedCreators( + FormSelectionUtils.rebuildSelection(xWFitLayout, new Widget[]{selectedBodyLayout(formDesigner).toData()})); + } paddingBound.populate(ob); layoutComboBox.setSelectedIndex(ob.getBodyLayoutType().getTypeValue());