Browse Source

Merge pull request #5632 in DESIGN/design from release/10.0 to release/11.0

* commit '66af712ed9859ab6f536c6340b2c563f569fd78d':
  REPORT-57171 AF打不开
  无jira 加个切换时处理 防止工具栏残留
  REPORT-58296 调整参数面板高度消失问题
  REPORT-58159 组件编辑按钮-表单组件选中-设计器日志框无法置于设计器上方
  无jira 调整下日志等级
  REPORT-58260 组件包安装适配zip
  REPORT-58260 组件包安装适配zip
  CHART-20476 图表-超链悬浮窗代码回退
fix-lag
superman 3 years ago
parent
commit
d61e687266
  1. 4
      designer-base/src/main/java/com/fr/design/mainframe/loghandler/LogMessageBar.java
  2. 40
      designer-chart/src/main/java/com/fr/design/module/ChartHyperlinkGroup.java
  3. 6
      designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java
  4. 5
      designer-form/src/main/java/com/fr/design/designer/creator/XWParameterLayout.java
  5. 5
      designer-form/src/main/java/com/fr/design/mainframe/share/action/InstallComponentAction.java
  6. 11
      designer-form/src/main/java/com/fr/design/mainframe/share/util/InstallUtils.java
  7. 21
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java
  8. 4
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/HotIssuesManager.java
  9. 2
      designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java
  10. 1
      designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceActivator.java

4
designer-base/src/main/java/com/fr/design/mainframe/loghandler/LogMessageBar.java

@ -88,4 +88,8 @@ public class LogMessageBar extends JPanel {
}
THIS = null;
}
public JFrame getLogFrame() {
return dlg;
}
}

40
designer-chart/src/main/java/com/fr/design/module/ChartHyperlinkGroup.java

@ -58,21 +58,26 @@ public class ChartHyperlinkGroup extends BaseHyperlinkGroup {
if (template == null) {
return false;
}
if (template.isJWorkBook() || DesignModeContext.isDuchampMode()) {
// 如果是普通报表单元格,那么没有 FormHyperlink 选项
FormHyperlinkProvider formHyperlink = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class);
//返回true表示可用,返回false表示不可用
return !ComparatorUtils.equals(clazz, formHyperlink.getClass());
} else {
// 如果是决策报表
if (template.getEditingReportIndex() == BaseJForm.FORM_TAB) {
// 编辑的是决策报表中的图表,那么没有ChartHyperRelateFloatLink 和 ChartHyperRelateCellLink 选项,有FormHyperlink 选项
Class[] classes = new Class[]{ChartHyperRelateCellLink.class, ChartHyperRelateFloatLink.class};
return !ArrayUtils.contains(classes, clazz);
} else if (template.getEditingReportIndex() == BaseJForm.ELEMENTCASE_TAB) {
// 编辑的是决策报表中的报表块,那么没有 ChartHyperPoplink 和 ChartHyperRelateFloatLink
Class[] classes = new Class[]{ChartHyperPoplink.class, ChartHyperRelateFloatLink.class};
return !ArrayUtils.contains(classes, clazz);
Class[] classes = new Class[]{ChartHyperRelateCellLink.class, ChartHyperRelateFloatLink.class};
for (Class aClass : classes) {
if (template.getEditingReportIndex() == BaseJForm.FORM_TAB) {
// 编辑的是决策报表中的图表,那么没有ChartHyperRelateFloatLink 和 ChartHyperRelateCellLink 选项,有FormHyperlink 选项
if (ComparatorUtils.equals(aClass, clazz)) {
return false;
}
} else if (template.getEditingReportIndex() == BaseJForm.ELEMENTCASE_TAB) {
// 编辑的是决策报表中的报表块,那么没有 ChartHyperRelateFloatLink,有ChartHyperRelateCellLink 和 FormHyperlink 选项
return !ComparatorUtils.equals(clazz, ChartHyperRelateFloatLink.class);
}
}
}
return true;
@ -96,14 +101,17 @@ public class ChartHyperlinkGroup extends BaseHyperlinkGroup {
return !ComparatorUtils.equals(object.getClass(), formHyperlink.getClass());
} else {
// 如果是决策报表
if (template.getEditingReportIndex() == BaseJForm.FORM_TAB) {
// 编辑的是决策报表中的图表,那么没有ChartHyperRelateFloatLink 和 ChartHyperRelateCellLink 选项,有FormHyperlink 选项
Class[] classes = new Class[]{ChartHyperRelateCellLink.class, ChartHyperRelateFloatLink.class};
return !ArrayUtils.contains(classes, object.getClass());
} else if (template.getEditingReportIndex() == BaseJForm.ELEMENTCASE_TAB) {
// 编辑的是决策报表中的报表块,那么没有 ChartHyperPoplink 和 ChartHyperRelateFloatLink
Class[] classes = new Class[]{ChartHyperPoplink.class, ChartHyperRelateFloatLink.class};
return !ArrayUtils.contains(classes, object.getClass());
Class[] classes = new Class[]{ChartHyperRelateCellLink.class, ChartHyperRelateFloatLink.class};
for (Class aClass : classes) {
if (template.getEditingReportIndex() == BaseJForm.FORM_TAB) {
// 编辑的是决策报表中的图表,那么没有ChartHyperRelateFloatLink 和 ChartHyperRelateCellLink 选项,有FormHyperlink 选项
if (ComparatorUtils.equals(aClass, object.getClass())) {
return false;
}
} else if (template.getEditingReportIndex() == BaseJForm.ELEMENTCASE_TAB) {
// 编辑的是决策报表中的报表块,那么没有 ChartHyperRelateFloatLink,有ChartHyperRelateCellLink 和 FormHyperlink 选项
return !ComparatorUtils.equals(object.getClass(), ChartHyperRelateFloatLink.class);
}
}
}
return true;

6
designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java

@ -23,6 +23,7 @@ import com.fr.design.mainframe.EditingMouseListener;
import com.fr.design.mainframe.FormDesigner;
import com.fr.design.mainframe.NoSupportAuthorityEdit;
import com.fr.design.mainframe.WidgetPropertyPane;
import com.fr.design.mainframe.loghandler.LogMessageBar;
import com.fr.design.plugin.DesignerPluginContext;
import com.fr.design.utils.gui.LayoutUtils;
import com.fr.form.ui.Widget;
@ -33,6 +34,7 @@ import com.fr.stable.StringUtils;
import javax.swing.BorderFactory;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import javax.swing.border.Border;
@ -776,6 +778,10 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo
if (popup == null) {
popup = new SelectedPopupDialog(this, designer);
}
JFrame frame = LogMessageBar.getInstance().getLogFrame();
if (frame!= null && frame.isActive()) {
return;
}
int creatorRightX = (int) ((bounds.x + bounds.width + SelectedPopupDialog.OFFSET_X) * designer.getScale());
int creatorRightY = (int) (bounds.y * designer.getScale());
int formDesignerWidth = designer.getWidth();

5
designer-form/src/main/java/com/fr/design/designer/creator/XWParameterLayout.java

@ -108,11 +108,6 @@ public class XWParameterLayout extends XWAbsoluteLayout {
return false;
}
@Override
public boolean canEnterIntoAdaptPane() {
return false;
}
/**
* 该组件是否可以拖拽(表单中参数面板和自适应布局不可以拖拽)
* @return 是则返回true

5
designer-form/src/main/java/com/fr/design/mainframe/share/action/InstallComponentAction.java

@ -120,7 +120,7 @@ public class InstallComponentAction extends UpdateAction {
private boolean containRues(File[] chosenFiles) {
for (File file : chosenFiles) {
if (file.getName().endsWith(ReuxUtils.REUS_SUFFIX))
if (ReuxUtils.isReusFile(file))
return true;
}
return false;
@ -142,8 +142,7 @@ public class InstallComponentAction extends UpdateAction {
return false;
}
ShareComponentUtils.checkReadMe();
boolean isReus = chosenFile.getName().endsWith(ReuxUtils.REUS_SUFFIX);
return isReus ? InstallUtils.installReusFile(chosenFile, installTime, failList) : InstallUtils.installReuFile(chosenFile, installTime, failList);
return ReuxUtils.isReusFile(chosenFile) ? InstallUtils.installReusFile(chosenFile, installTime, failList) : InstallUtils.installReuFile(chosenFile, installTime, failList);
}
private static class InstallBackInfo {

11
designer-form/src/main/java/com/fr/design/mainframe/share/util/InstallUtils.java

@ -84,7 +84,7 @@ public class InstallUtils {
@Nullable
private static Group createComponentGroup(String fileName) {
String groupName = fileName.substring(0, fileName.indexOf(DOT + ReuxUtils.REUS_SUFFIX));
String groupName = createGroupName(fileName);
//有重名分组则加后缀
if (DefaultShareGroupManager.getInstance().getGroup(groupName) != null) {
@ -101,6 +101,15 @@ public class InstallUtils {
return DefaultShareGroupManager.getInstance().getGroup(groupName);
}
private static String createGroupName(String fileName) {
for (String suffix : ReuxUtils.SUPPORT_REUS_SUFFIX) {
if (fileName.endsWith(suffix)) {
return fileName.substring(0, fileName.indexOf(DOT + suffix));
}
}
return fileName;
}
private static boolean installReuFile(Group group, File chosenFile, long installTime) {
try {
if (!group.installModule(chosenFile)) {

21
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java

@ -57,8 +57,6 @@ import javax.swing.KeyStroke;
import javax.swing.SwingUtilities;
import javax.swing.SwingWorker;
import javax.swing.Timer;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import java.awt.AWTEvent;
import java.awt.BorderLayout;
import java.awt.Color;
@ -242,21 +240,28 @@ public class AlphaFineDialog extends UIDialog {
if (hotData == null) {
hotData = HotIssuesManager.getInstance().getHotIssues();
}
for (int i = 0; i < hotData.length; i++) {
panel.add(new HotIssueJpanel(hotData[i], i + 1));
}
} else {
hotData = null;
for (int i = 0; i < AlphaFineConstants.HOT_ITEMS; i++) {
panel.add(new HotIssueJpanel(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Connection_Failed")}, i + 1));
}
}
initHotPane(panel, hotData);
hotPane.add(uiLabel, BorderLayout.NORTH);
hotPane.add(panel, BorderLayout.CENTER);
add(hotPane, BorderLayout.SOUTH);
setSize(AlphaFineConstants.FULL_SIZE);
}
private void initHotPane(JPanel panel, String[][] hotData) {
if (hotData == null) {
for (int i = 0; i < AlphaFineConstants.HOT_ITEMS; i++) {
panel.add(new HotIssueJpanel(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Connection_Failed")}, i + 1));
}
} else {
for (int i = 0; i < hotData.length; i++) {
panel.add(new HotIssueJpanel(hotData[i], i + 1));
}
}
}
/**
* 初始化输入框
*/

4
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/HotIssuesManager.java

@ -20,6 +20,7 @@ import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.jetbrains.annotations.Nullable;
/**
@ -71,6 +72,7 @@ public class HotIssuesManager {
* 从热门问题接口获取热门问题
* @return
*/
@Nullable
public String[][] getHotIssues() {
try {
@ -84,7 +86,7 @@ public class HotIssuesManager {
}
}
} catch (Exception e) {
FineLoggerFactory.getLogger().error("hotissues search error: " + e.getMessage());
FineLoggerFactory.getLogger().error("hotissues search error: " + e.getMessage(), e);
return null;
}
return data;

2
designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java

@ -173,7 +173,7 @@ public class DesignerSocketIO {
RemoteDesignConstants.USER_LOCK_ID,
connection.getId());
}
FineLoggerFactory.getLogger().error("Available ports: {}, current Protocol: {}", Arrays.toString(ports), currentProtocol);
FineLoggerFactory.getLogger().info("Available ports: {}, current Protocol: {}", Arrays.toString(ports), currentProtocol);
return result;
}

1
designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceActivator.java

@ -53,6 +53,7 @@ public class DesignerWorkspaceActivator extends Activator {
public void on(Event event, Workspace workspace) {
PluginClassRefreshManager.getInstance().removePluginListener();
HistoryTemplateListCache.getInstance().stash();
PluginClassRefreshManager.getInstance().fireTabChange();
}
});

Loading…
Cancel
Save