diff --git a/designer-base/src/main/java/com/fr/design/env/LocalDesignerWorkspaceInfo.java b/designer-base/src/main/java/com/fr/design/env/LocalDesignerWorkspaceInfo.java index 2aa3c5504..6bb8ec37a 100644 --- a/designer-base/src/main/java/com/fr/design/env/LocalDesignerWorkspaceInfo.java +++ b/designer-base/src/main/java/com/fr/design/env/LocalDesignerWorkspaceInfo.java @@ -31,7 +31,7 @@ public class LocalDesignerWorkspaceInfo implements DesignerWorkspaceInfo { } REPORT_ENGINE_JAR = properties.getProperty(REPORT_ENGINE_KEY, "default.jar"); } - + private String name; private String path; @@ -108,7 +108,7 @@ public class LocalDesignerWorkspaceInfo implements DesignerWorkspaceInfo { File engineLib = new File(StableUtils.pathJoin(this.path, ProjectConstants.LIB_NAME, REPORT_ENGINE_JAR)); // 非安装版本允许自由切换 boolean notExistLib = !ComparatorUtils.equals(GeneralUtils.readFullBuildNO(), InterProviderFactory.getProvider().getLocText("Fine-Core_Basic_About_No_Build")) - && !engineLib.exists(); + && !engineLib.exists(); if (notExistLib) { throw new MainVersionNotMatchException(); } diff --git a/designer-base/src/main/java/com/fr/env/handler/WorkspaceExceptionHandler.java b/designer-base/src/main/java/com/fr/env/handler/WorkspaceExceptionHandler.java index ae214d242..367cd6bbb 100644 --- a/designer-base/src/main/java/com/fr/env/handler/WorkspaceExceptionHandler.java +++ b/designer-base/src/main/java/com/fr/env/handler/WorkspaceExceptionHandler.java @@ -68,7 +68,7 @@ public class WorkspaceExceptionHandler { if (workspaceInfo == null || workspaceInfo.getType() == DesignerWorkspaceType.Local) { FineLoggerFactory.getLogger().error(e.getMessage(), e); if (e instanceof ExceptionDescriptor) { - new CommonHandler(true).handle(new RefWrapper(e, StringUtils.EMPTY)); + new CommonHandler(true).handle(new RefWrapper(e, StringUtils.EMPTY)); } else { FineJOptionPane.showMessageDialog(EnvChangeEntrance.getInstance().getDialog(), Toolkit.i18nText("Fine-Design_Basic_Switch_Workspace_Failed"), diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java index ac0bfcb57..e93f0023b 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java @@ -25,17 +25,19 @@ import com.fr.stable.AssistUtils; import com.fr.stable.StringUtils; import javax.swing.JPanel; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; import java.awt.BorderLayout; import java.awt.CardLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; /** * 图表 属性表, 类型选择 界面. @@ -99,6 +101,19 @@ public class ChartTypePane extends AbstractChartAttrPane { buttonPane.setEditingChartPane(chartTypeComBox); + buttonPane.addMouseListener(new MouseAdapter() { + @Override + public void mouseReleased(MouseEvent e) { + buttonPane.requestFocus(); + } + }); + + chartTypeComBox.addMouseListener(new MouseAdapter() { + @Override + public void mouseReleased(MouseEvent e) { + content.requestFocus(); + } + }); return content; } diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/ChartImagePane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/ChartImagePane.java index 584d7fd1d..e8ef8714d 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/ChartImagePane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/ChartImagePane.java @@ -72,6 +72,7 @@ public class ChartImagePane extends ChartSelectDemoPane { }else{ this.isDoubleClicked = false; } + this.requestFocus(); super.mouseClicked(e); } diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XWParameterLayout.java b/designer-form/src/main/java/com/fr/design/designer/creator/XWParameterLayout.java index 1d37024d9..f60aa9846 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XWParameterLayout.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XWParameterLayout.java @@ -103,6 +103,16 @@ public class XWParameterLayout extends XWAbsoluteLayout { return false; } + @Override + public boolean canEnterIntoAbsolutePane() { + return false; + } + + @Override + public boolean canEnterIntoAdaptPane() { + return false; + } + /** * 该组件是否可以拖拽(表单中参数面板和自适应布局不可以拖拽) * @return 是则返回true diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormSelectionUtils.java b/designer-form/src/main/java/com/fr/design/mainframe/FormSelectionUtils.java index 2900650aa..84b8f6bf3 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormSelectionUtils.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormSelectionUtils.java @@ -10,6 +10,7 @@ import com.fr.design.designer.creator.XCreatorUtils; import com.fr.design.designer.creator.XLayoutContainer; import com.fr.design.designer.creator.XWAbsoluteLayout; import com.fr.design.designer.creator.XWFitLayout; +import com.fr.design.designer.creator.XWParameterLayout; import com.fr.design.designer.creator.XWScaleLayout; import com.fr.design.designer.creator.XWTitleLayout; import com.fr.design.designer.creator.cardlayout.XWTabFitLayout; @@ -60,6 +61,11 @@ public class FormSelectionUtils { */ public static void paste2Container(FormDesigner designer, XLayoutContainer parent, FormSelection clipboard, int x, int y) { + clipboard = filterFormSelection(clipboard, parent); + if (clipboard.isEmpty()) { + Toolkit.getDefaultToolkit().beep(); + return; + } LayoutAdapter adapter = parent.getLayoutAdapter(); if (parent instanceof XWAbsoluteLayout) { //绝对布局 @@ -77,6 +83,27 @@ public class FormSelectionUtils { Toolkit.getDefaultToolkit().beep(); } + private static FormSelection filterFormSelection(FormSelection clipboard, XLayoutContainer parent) { + FormSelection newSelection = new FormSelection(); + for (XCreator xCreator : clipboard.getSelectedCreators()) { + if (parent.acceptType(XWParameterLayout.class)) { + if (xCreator.canEnterIntoParaPane()) { + newSelection.addSelectedCreator(xCreator); + } + } else if (parent.acceptType(XWAbsoluteLayout.class)) { + if (xCreator.canEnterIntoAbsolutePane()) { + newSelection.addSelectedCreator(xCreator); + } + } else if (parent.acceptType(XWFitLayout.class)) { + if (xCreator.canEnterIntoAdaptPane()) { + newSelection.addSelectedCreator(xCreator); + } + } + + } + return newSelection; + } + private static boolean isExtraContainer(XLayoutContainer parent) { if (parent != null) { Set set = ExtraDesignClassManager.getInstance().getArray(FormWidgetOptionProvider.XML_TAG); diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetRepoPane.java b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetRepoPane.java index af329cde8..c07485745 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetRepoPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetRepoPane.java @@ -14,6 +14,7 @@ import com.fr.stable.StringUtils; import javax.swing.BorderFactory; import javax.swing.JPanel; +import javax.swing.JTextField; import javax.swing.SwingConstants; import javax.swing.SwingWorker; import java.awt.BorderLayout; @@ -164,9 +165,14 @@ public class OnlineWidgetRepoPane extends BasicPane { tipLabel1.setForeground(Color.decode("#8F8F92")); UILabel tipLabel2 = tipLabel(Toolkit.i18nText("Fine-Design_Share_Internet_Connect_Failed_Tip2")); tipLabel2.setForeground(Color.decode("#8F8F92")); - UILabel tipLabel3 = tipLabel(MARKET_URL); - tipLabel3.setForeground(Color.decode("#8F8F92")); + JTextField tipLabel3 = new JTextField(MARKET_URL); + tipLabel3.setHorizontalAlignment(JTextField.CENTER); + tipLabel3.setPreferredSize(new Dimension(240, 20)); + tipLabel3.setEditable(false); + tipLabel3.setForeground(Color.decode("#8F8F92")); + tipLabel3.setBackground(null); + tipLabel3.setBorder(null); UILabel emptyLabel = tipLabel(StringUtils.EMPTY); panel.add(uiLabel);