Browse Source

Merge branch 'feature/big-screen' of ssh://code.fineres.com:7999/~zheng/C-design into feature/big-screen

feature/10.0
shine 3 years ago
parent
commit
0c3ac63b10
  1. 4
      designer-base/src/main/java/com/fr/design/mainframe/loghandler/LogMessageBar.java
  2. 42
      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; THIS = null;
} }
public JFrame getLogFrame() {
return dlg;
}
} }

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

@ -58,21 +58,26 @@ public class ChartHyperlinkGroup extends BaseHyperlinkGroup {
if (template == null) { if (template == null) {
return false; return false;
} }
if (template.isJWorkBook() || DesignModeContext.isDuchampMode()) { if (template.isJWorkBook() || DesignModeContext.isDuchampMode()) {
// 如果是普通报表单元格,那么没有 FormHyperlink 选项 // 如果是普通报表单元格,那么没有 FormHyperlink 选项
FormHyperlinkProvider formHyperlink = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class); FormHyperlinkProvider formHyperlink = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class);
//返回true表示可用,返回false表示不可用 //返回true表示可用,返回false表示不可用
return !ComparatorUtils.equals(clazz, formHyperlink.getClass()); return !ComparatorUtils.equals(clazz, formHyperlink.getClass());
} else { } else {
// 如果是决策报表 // 如果是决策报表
if (template.getEditingReportIndex() == BaseJForm.FORM_TAB) { Class[] classes = new Class[]{ChartHyperRelateCellLink.class, ChartHyperRelateFloatLink.class};
// 编辑的是决策报表中的图表,那么没有ChartHyperRelateFloatLink 和 ChartHyperRelateCellLink 选项,有FormHyperlink 选项 for (Class aClass : classes) {
Class[] classes = new Class[]{ChartHyperRelateCellLink.class, ChartHyperRelateFloatLink.class}; if (template.getEditingReportIndex() == BaseJForm.FORM_TAB) {
return !ArrayUtils.contains(classes, clazz); // 编辑的是决策报表中的图表,那么没有ChartHyperRelateFloatLink 和 ChartHyperRelateCellLink 选项,有FormHyperlink 选项
} else if (template.getEditingReportIndex() == BaseJForm.ELEMENTCASE_TAB) { if (ComparatorUtils.equals(aClass, clazz)) {
// 编辑的是决策报表中的报表块,那么没有 ChartHyperPoplink 和 ChartHyperRelateFloatLink return false;
Class[] classes = new Class[]{ChartHyperPoplink.class, ChartHyperRelateFloatLink.class}; }
return !ArrayUtils.contains(classes, clazz); } else if (template.getEditingReportIndex() == BaseJForm.ELEMENTCASE_TAB) {
// 编辑的是决策报表中的报表块,那么没有 ChartHyperRelateFloatLink,有ChartHyperRelateCellLink 和 FormHyperlink 选项
return !ComparatorUtils.equals(clazz, ChartHyperRelateFloatLink.class);
}
} }
} }
return true; return true;
@ -96,18 +101,21 @@ public class ChartHyperlinkGroup extends BaseHyperlinkGroup {
return !ComparatorUtils.equals(object.getClass(), formHyperlink.getClass()); return !ComparatorUtils.equals(object.getClass(), formHyperlink.getClass());
} else { } else {
// 如果是决策报表 // 如果是决策报表
if (template.getEditingReportIndex() == BaseJForm.FORM_TAB) { Class[] classes = new Class[]{ChartHyperRelateCellLink.class, ChartHyperRelateFloatLink.class};
// 编辑的是决策报表中的图表,那么没有ChartHyperRelateFloatLink 和 ChartHyperRelateCellLink 选项,有FormHyperlink 选项 for (Class aClass : classes) {
Class[] classes = new Class[]{ChartHyperRelateCellLink.class, ChartHyperRelateFloatLink.class}; if (template.getEditingReportIndex() == BaseJForm.FORM_TAB) {
return !ArrayUtils.contains(classes, object.getClass()); // 编辑的是决策报表中的图表,那么没有ChartHyperRelateFloatLink 和 ChartHyperRelateCellLink 选项,有FormHyperlink 选项
} else if (template.getEditingReportIndex() == BaseJForm.ELEMENTCASE_TAB) { if (ComparatorUtils.equals(aClass, object.getClass())) {
// 编辑的是决策报表中的报表块,那么没有 ChartHyperPoplink 和 ChartHyperRelateFloatLink return false;
Class[] classes = new Class[]{ChartHyperPoplink.class, ChartHyperRelateFloatLink.class}; }
return !ArrayUtils.contains(classes, object.getClass()); } else if (template.getEditingReportIndex() == BaseJForm.ELEMENTCASE_TAB) {
// 编辑的是决策报表中的报表块,那么没有 ChartHyperRelateFloatLink,有ChartHyperRelateCellLink 和 FormHyperlink 选项
return !ComparatorUtils.equals(object.getClass(), ChartHyperRelateFloatLink.class);
}
} }
} }
return true; 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.FormDesigner;
import com.fr.design.mainframe.NoSupportAuthorityEdit; import com.fr.design.mainframe.NoSupportAuthorityEdit;
import com.fr.design.mainframe.WidgetPropertyPane; import com.fr.design.mainframe.WidgetPropertyPane;
import com.fr.design.mainframe.loghandler.LogMessageBar;
import com.fr.design.plugin.DesignerPluginContext; import com.fr.design.plugin.DesignerPluginContext;
import com.fr.design.utils.gui.LayoutUtils; import com.fr.design.utils.gui.LayoutUtils;
import com.fr.form.ui.Widget; import com.fr.form.ui.Widget;
@ -33,6 +34,7 @@ import com.fr.stable.StringUtils;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.JComponent; import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.SwingUtilities; import javax.swing.SwingUtilities;
import javax.swing.border.Border; import javax.swing.border.Border;
@ -776,6 +778,10 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo
if (popup == null) { if (popup == null) {
popup = new SelectedPopupDialog(this, designer); 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 creatorRightX = (int) ((bounds.x + bounds.width + SelectedPopupDialog.OFFSET_X) * designer.getScale());
int creatorRightY = (int) (bounds.y * designer.getScale()); int creatorRightY = (int) (bounds.y * designer.getScale());
int formDesignerWidth = designer.getWidth(); 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; return false;
} }
@Override
public boolean canEnterIntoAdaptPane() {
return false;
}
/** /**
* 该组件是否可以拖拽(表单中参数面板和自适应布局不可以拖拽) * 该组件是否可以拖拽(表单中参数面板和自适应布局不可以拖拽)
* @return 是则返回true * @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) { private boolean containRues(File[] chosenFiles) {
for (File file : chosenFiles) { for (File file : chosenFiles) {
if (file.getName().endsWith(ReuxUtils.REUS_SUFFIX)) if (ReuxUtils.isReusFile(file))
return true; return true;
} }
return false; return false;
@ -142,8 +142,7 @@ public class InstallComponentAction extends UpdateAction {
return false; return false;
} }
ShareComponentUtils.checkReadMe(); ShareComponentUtils.checkReadMe();
boolean isReus = chosenFile.getName().endsWith(ReuxUtils.REUS_SUFFIX); return ReuxUtils.isReusFile(chosenFile) ? InstallUtils.installReusFile(chosenFile, installTime, failList) : InstallUtils.installReuFile(chosenFile, installTime, failList);
return isReus ? InstallUtils.installReusFile(chosenFile, installTime, failList) : InstallUtils.installReuFile(chosenFile, installTime, failList);
} }
private static class InstallBackInfo { 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 @Nullable
private static Group createComponentGroup(String fileName) { 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) { if (DefaultShareGroupManager.getInstance().getGroup(groupName) != null) {
@ -101,6 +101,15 @@ public class InstallUtils {
return DefaultShareGroupManager.getInstance().getGroup(groupName); 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) { private static boolean installReuFile(Group group, File chosenFile, long installTime) {
try { try {
if (!group.installModule(chosenFile)) { 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.SwingUtilities;
import javax.swing.SwingWorker; import javax.swing.SwingWorker;
import javax.swing.Timer; import javax.swing.Timer;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import java.awt.AWTEvent; import java.awt.AWTEvent;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Color; import java.awt.Color;
@ -242,21 +240,28 @@ public class AlphaFineDialog extends UIDialog {
if (hotData == null) { if (hotData == null) {
hotData = HotIssuesManager.getInstance().getHotIssues(); hotData = HotIssuesManager.getInstance().getHotIssues();
} }
for (int i = 0; i < hotData.length; i++) {
panel.add(new HotIssueJpanel(hotData[i], i + 1));
}
} else { } else {
hotData = null; 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(uiLabel, BorderLayout.NORTH);
hotPane.add(panel, BorderLayout.CENTER); hotPane.add(panel, BorderLayout.CENTER);
add(hotPane, BorderLayout.SOUTH); add(hotPane, BorderLayout.SOUTH);
setSize(AlphaFineConstants.FULL_SIZE); 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.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.jetbrains.annotations.Nullable;
/** /**
@ -71,6 +72,7 @@ public class HotIssuesManager {
* 从热门问题接口获取热门问题 * 从热门问题接口获取热门问题
* @return * @return
*/ */
@Nullable
public String[][] getHotIssues() { public String[][] getHotIssues() {
try { try {
@ -84,7 +86,7 @@ public class HotIssuesManager {
} }
} }
} catch (Exception e) { } catch (Exception e) {
FineLoggerFactory.getLogger().error("hotissues search error: " + e.getMessage()); FineLoggerFactory.getLogger().error("hotissues search error: " + e.getMessage(), e);
return null; return null;
} }
return data; 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, RemoteDesignConstants.USER_LOCK_ID,
connection.getId()); 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; 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) { public void on(Event event, Workspace workspace) {
PluginClassRefreshManager.getInstance().removePluginListener(); PluginClassRefreshManager.getInstance().removePluginListener();
HistoryTemplateListCache.getInstance().stash(); HistoryTemplateListCache.getInstance().stash();
PluginClassRefreshManager.getInstance().fireTabChange();
} }
}); });

Loading…
Cancel
Save