Browse Source

Merge remote-tracking branch 'origin/release/10.0' into feature/10.0

# Conflicts:
#	designer-base/pom.xml
#	designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
#	designer-base/src/main/java/com/fr/start/ServerStarter.java
research/10.0
richie 6 years ago
parent
commit
908c0f800f
  1. 1
      designer-base/pom.xml
  2. 3
      designer-base/src/main/java/com/fr/design/DesignerEnvManager.java
  3. 29
      designer-base/src/main/java/com/fr/design/actions/community/BBSAction.java
  4. 28
      designer-base/src/main/java/com/fr/design/actions/community/BugAction.java
  5. 47
      designer-base/src/main/java/com/fr/design/actions/community/CenterAction.java
  6. 48
      designer-base/src/main/java/com/fr/design/actions/community/CusDemandAction.java
  7. 30
      designer-base/src/main/java/com/fr/design/actions/community/NeedAction.java
  8. 29
      designer-base/src/main/java/com/fr/design/actions/community/QuestionAction.java
  9. 27
      designer-base/src/main/java/com/fr/design/actions/community/SignAction.java
  10. 52
      designer-base/src/main/java/com/fr/design/actions/community/TechSolutionAction.java
  11. 26
      designer-base/src/main/java/com/fr/design/actions/community/VideoAction.java
  12. 2
      designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java
  13. 36
      designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java
  14. 33
      designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java
  15. 3
      designer-base/src/main/java/com/fr/design/env/LocalDesignerWorkspaceInfo.java
  16. 2
      designer-base/src/main/java/com/fr/design/extra/PluginUtils.java
  17. 9
      designer-base/src/main/java/com/fr/design/extra/PluginWebBridge.java
  18. 7
      designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java
  19. 5
      designer-base/src/main/java/com/fr/design/gui/controlpane/UIListControlPane.java
  20. 22
      designer-base/src/main/java/com/fr/design/gui/icontainer/UIModeControlContainer.java
  21. 16
      designer-base/src/main/java/com/fr/design/javascript/JSContentPane.java
  22. 4
      designer-base/src/main/java/com/fr/design/mainframe/loghandler/DesignerLogHandler.java
  23. 9
      designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
  24. 62
      designer-base/src/main/java/com/fr/design/utils/BrowseUtils.java
  25. 2
      designer-base/src/main/java/com/fr/env/EnvListPane.java
  26. 43
      designer-base/src/main/java/com/fr/start/ServerStarter.java
  27. BIN
      designer-base/src/main/resources/com/fr/design/images/bbs/bbs.png
  28. BIN
      designer-base/src/main/resources/com/fr/design/images/bbs/bug.png
  29. BIN
      designer-base/src/main/resources/com/fr/design/images/bbs/center.png
  30. BIN
      designer-base/src/main/resources/com/fr/design/images/bbs/demand.png
  31. BIN
      designer-base/src/main/resources/com/fr/design/images/bbs/help.png
  32. BIN
      designer-base/src/main/resources/com/fr/design/images/bbs/need.png
  33. BIN
      designer-base/src/main/resources/com/fr/design/images/bbs/question.png
  34. BIN
      designer-base/src/main/resources/com/fr/design/images/bbs/sign.png
  35. BIN
      designer-base/src/main/resources/com/fr/design/images/bbs/solotion.png
  36. BIN
      designer-base/src/main/resources/com/fr/design/images/bbs/video.png
  37. 8
      designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java
  38. 19
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartUIListControlPane.java
  39. 10
      designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartConditionAttrContentPane.java
  40. 10
      designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartConditionListControlPane.java
  41. 3
      designer-chart/src/main/java/com/fr/van/chart/designer/style/background/AlertLineListControlPane.java
  42. 3
      designer-chart/src/main/java/com/fr/van/chart/designer/style/background/BackgroundListControlPane.java
  43. 3
      designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartStackedAndAxisListControlPane.java
  44. 2
      designer-chart/src/main/java/com/fr/van/chart/pie/VanChartPiePlotPane.java
  45. 7
      designer-form/src/main/java/com/fr/design/mainframe/JForm.java
  46. 2
      designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java
  47. 19
      designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java
  48. 18
      designer-realize/src/main/java/com/fr/start/Designer.java

1
designer-base/pom.xml

@ -18,5 +18,4 @@
<version>0.7.0</version>
</dependency>
</dependencies>
</project>

3
designer-base/src/main/java/com/fr/design/DesignerEnvManager.java

@ -207,7 +207,8 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
return;
}
String installHome = StableUtils.getInstallHome();
if (installHome != null && !".".equals(installHome)) {
//这里不判断路径是.的情况,放在checkValid方法里面,重新选
if (installHome != null) {
String name = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Engine_DEFAULT");
String envPath = designerEnvManager.getDefaultenvPath(installHome);
designerEnvManager.putEnv(name, LocalDesignerWorkspaceInfo.create(name, envPath));

29
designer-base/src/main/java/com/fr/design/actions/community/BBSAction.java

@ -1,20 +1,15 @@
package com.fr.design.actions.community;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet;
import com.fr.design.utils.BrowseUtils;
import com.fr.general.CloudCenter;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
public class BBSAction extends UpdateAction
{
@ -25,33 +20,19 @@ public class BBSAction extends UpdateAction
this.setMenuKeySet(BBS);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bbs.png"));
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bbs/bbs.png"));
}
/**
* 动作
* @param e 事件
* @param arg0 事件
*/
@Override
public void actionPerformed(ActionEvent arg0)
{
String url = CloudCenter.getInstance().acquireUrlByKind("bbs");
if (StringUtils.isEmpty(url)) {
FRContext.getLogger().info("The URL is empty!");
return;
}
try {
Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) {
JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Default_Browser"));
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (Exception exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
FineLoggerFactory.getLogger().error("Can not open the browser for URL: " + url);
}
BrowseUtils.browser(url);
}
public static final MenuKeySet BBS = new MenuKeySet() {
@Override

28
designer-base/src/main/java/com/fr/design/actions/community/BugAction.java

@ -1,20 +1,14 @@
package com.fr.design.actions.community;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet;
import com.fr.design.utils.BrowseUtils;
import com.fr.general.CloudCenter;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
public class BugAction extends UpdateAction
{
@ -23,7 +17,7 @@ public class BugAction extends UpdateAction
{ this.setMenuKeySet(BUG);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bug.png"));
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bbs/bug.png"));
}
@ -31,21 +25,7 @@ public class BugAction extends UpdateAction
public void actionPerformed(ActionEvent arg0)
{
String url = CloudCenter.getInstance().acquireUrlByKind("bbs.bugs");
if (StringUtils.isEmpty(url)) {
FRContext.getLogger().info("The URL is empty!");
return;
}
try {
Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) {
JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Default_Browser"));
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (Exception exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
FineLoggerFactory.getLogger().error("Can not open the browser for URL: " + url);
}
BrowseUtils.browser(url);
}
public static final MenuKeySet BUG = new MenuKeySet() {

47
designer-base/src/main/java/com/fr/design/actions/community/CenterAction.java

@ -0,0 +1,47 @@
package com.fr.design.actions.community;
import com.fr.base.BaseUtils;
import com.fr.design.menu.MenuKeySet;
import com.fr.design.utils.BrowseUtils;
import com.fr.general.CloudCenter;
import javax.swing.KeyStroke;
import java.awt.event.ActionEvent;
/**
* Created by XINZAI on 2018/8/23.
*/
public class CenterAction extends UpAction{
public CenterAction()
{
this.setMenuKeySet(CENTER);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bbs/center.png"));
}
@Override
public void actionPerformed(ActionEvent arg0)
{
String url = CloudCenter.getInstance().acquireUrlByKind("bbs.center");
BrowseUtils.browser(url);
}
public static final MenuKeySet CENTER = new MenuKeySet() {
@Override
public char getMnemonic() {
return 'C';
}
@Override
public String getMenuName() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Commuinity_Center");
}
@Override
public KeyStroke getKeyStroke() {
return null;
}
};
}

48
designer-base/src/main/java/com/fr/design/actions/community/CusDemandAction.java

@ -0,0 +1,48 @@
package com.fr.design.actions.community;
import com.fr.base.BaseUtils;
import com.fr.design.menu.MenuKeySet;
import com.fr.design.utils.BrowseUtils;
import com.fr.general.CloudCenter;
import javax.swing.KeyStroke;
import java.awt.event.ActionEvent;
/**
* Created by XINZAI on 2018/8/23.
*/
public class CusDemandAction extends UpAction{
public CusDemandAction()
{
this.setMenuKeySet(DEMAND);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bbs/demand.png"));
}
@Override
public void actionPerformed(ActionEvent arg0)
{
String url = CloudCenter.getInstance().acquireUrlByKind("bbs.demand");
BrowseUtils.browser(url);
}
public static final MenuKeySet DEMAND = new MenuKeySet() {
@Override
public char getMnemonic() {
return 'D';
}
@Override
public String getMenuName() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Commuinity_Demand");
}
@Override
public KeyStroke getKeyStroke() {
return null;
}
};
}

30
designer-base/src/main/java/com/fr/design/actions/community/NeedAction.java

@ -1,20 +1,14 @@
package com.fr.design.actions.community;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet;
import com.fr.design.utils.BrowseUtils;
import com.fr.general.CloudCenter;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
public class NeedAction extends UpdateAction
{
@ -24,29 +18,15 @@ public class NeedAction extends UpdateAction
this.setMenuKeySet(NEED);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/need.png"));
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bbs/need.png"));
}
@Override
public void actionPerformed(ActionEvent arg0)
{
String url = CloudCenter.getInstance().acquireUrlByKind("bbs.needs");
if (StringUtils.isEmpty(url)) {
FRContext.getLogger().info("The URL is empty!");
return;
}
try {
Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) {
JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Default_Browser"));
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (Exception exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
FineLoggerFactory.getLogger().error("Can not open the browser for URL: " + url);
}
BrowseUtils.browser(url);
}
public static final MenuKeySet NEED = new MenuKeySet() {

29
designer-base/src/main/java/com/fr/design/actions/community/QuestionAction.java

@ -1,20 +1,14 @@
package com.fr.design.actions.community;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet;
import com.fr.design.utils.BrowseUtils;
import com.fr.general.CloudCenter;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
public class QuestionAction extends UpdateAction
{
@ -23,7 +17,7 @@ public class QuestionAction extends UpdateAction
{ this.setMenuKeySet(QUESTIONS);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/questions.png"));
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bbs/question.png"));
}
@ -31,22 +25,7 @@ public class QuestionAction extends UpdateAction
public void actionPerformed(ActionEvent arg0)
{
String url = CloudCenter.getInstance().acquireUrlByKind("bbs.questions");
if (StringUtils.isEmpty(url)) {
FRContext.getLogger().info("The URL is empty!");
return;
}
try {
Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) {
JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Default_Browser"));
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (Exception exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
FineLoggerFactory.getLogger().error("Can not open the browser for URL: " + url);
}
BrowseUtils.browser(url);
}
public static final MenuKeySet QUESTIONS = new MenuKeySet() {
@Override

27
designer-base/src/main/java/com/fr/design/actions/community/SignAction.java

@ -1,20 +1,15 @@
package com.fr.design.actions.community;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet;
import com.fr.design.utils.BrowseUtils;
import com.fr.general.CloudCenter;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
public class SignAction extends UpdateAction
{
@ -24,7 +19,7 @@ public class SignAction extends UpdateAction
this.setMenuKeySet(SIGN);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/signature.png"));
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bbs/sign.png"));
}
@ -32,21 +27,7 @@ public class SignAction extends UpdateAction
public void actionPerformed(ActionEvent arg0)
{
String url = CloudCenter.getInstance().acquireUrlByKind("bbs.aut");
if (StringUtils.isEmpty(url)) {
FRContext.getLogger().info("The URL is empty!");
return;
}
try {
Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) {
JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Default_Browser"));
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (Exception exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
FineLoggerFactory.getLogger().error("Can not open the browser for URL: " + url);
}
BrowseUtils.browser(url);
}
public static final MenuKeySet SIGN = new MenuKeySet() {

52
designer-base/src/main/java/com/fr/design/actions/community/TechSolutionAction.java

@ -0,0 +1,52 @@
package com.fr.design.actions.community;
import com.fr.base.BaseUtils;
import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet;
import com.fr.design.utils.BrowseUtils;
import com.fr.general.CloudCenter;
import javax.swing.KeyStroke;
import java.awt.event.ActionEvent;
/**
* Created by XINZAI on 2018/8/23.
*/
public class TechSolutionAction extends UpdateAction{
public TechSolutionAction()
{
this.setMenuKeySet(TSO);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images//bbs/solotion.png"));
}
@Override
public void actionPerformed(ActionEvent arg0)
{
String url = CloudCenter.getInstance().acquireUrlByKind("bbs.solution");
BrowseUtils.browser(url);
}
public static final MenuKeySet TSO = new MenuKeySet() {
@Override
public char getMnemonic() {
return 'T';
}
@Override
public String getMenuName() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Commuinity_Solution");
}
@Override
public KeyStroke getKeyStroke() {
return null;
}
};
}

26
designer-base/src/main/java/com/fr/design/actions/community/VideoAction.java

@ -1,20 +1,14 @@
package com.fr.design.actions.community;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet;
import com.fr.design.utils.BrowseUtils;
import com.fr.general.CloudCenter;
import com.fr.general.GeneralContext;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Locale;
public class VideoAction extends UpdateAction
@ -25,7 +19,7 @@ public class VideoAction extends UpdateAction
this.setMenuKeySet(VIDEO);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/video.png"));
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bbs/video.png"));
}
@ -38,21 +32,7 @@ public class VideoAction extends UpdateAction
} else {
url = CloudCenter.getInstance().acquireUrlByKind("bbs.video");
}
if (StringUtils.isEmpty(url)) {
FRContext.getLogger().info("The URL is empty!");
return;
}
try {
Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) {
JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Default_Browser_Duplicate"));
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (Exception exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
FineLoggerFactory.getLogger().error("Can not open the browser for URL: " + url);
}
BrowseUtils.browser(url);
}
public static final MenuKeySet VIDEO = new MenuKeySet() {

2
designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java

@ -31,7 +31,7 @@ public class TutorialAction extends UpdateAction {
this.setMenuKeySet(HELP_TUTORIAL);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/help.png"));
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bbs/help.png"));
this.setAccelerator(getMenuKeySet().getKeyStroke());
}

36
designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java

@ -29,14 +29,13 @@ import java.awt.event.WindowEvent;
*/
public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connection> extends BasicBeanPane<com.fr.data.impl.Connection> {
// 编码转换.
private UIComboBox originalCharSetComboBox;
private UIComboBox newCharSetComboBox;
private UILabel message;
private UIButton okButton;
private UIButton cancelButton;
private JDialog dialog;
private UILabel uiLabel;
private String oirginalCharSet = null;
private String newCharSet = null;
// Database pane
public DatabaseConnectionPane() {
@ -44,8 +43,6 @@ public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connecti
}
protected void initComponents() {
originalCharSetComboBox = new UIComboBox(EncodeConstants.ALL_ENCODING_ARRAY);
newCharSetComboBox = new UIComboBox(EncodeConstants.ALL_ENCODING_ARRAY);
message = new UILabel();
uiLabel = new UILabel();
okButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_OK"));
@ -64,18 +61,6 @@ public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connecti
// Center
northPane.add(mainPanel(), BorderLayout.CENTER);
if (!isFineBI()) {
// ChartSet
JPanel chartSetPane = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(2);
northPane.add(chartSetPane);
chartSetPane.setBorder(BorderFactory.createTitledBorder(
new ModLineBorder(ModLineBorder.TOP),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Datasource_Convert_Charset")
));
chartSetPane.add(GUICoreUtils.createNamedPane(originalCharSetComboBox, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Datasource_Original_Charset") + ":"));
chartSetPane.add(GUICoreUtils.createNamedPane(newCharSetComboBox, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Datasource_New_Charset") + ":"));
}
}
protected abstract JPanel mainPanel();
@ -84,8 +69,8 @@ public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connecti
@Override
public void populateBean(com.fr.data.impl.Connection ob) {
this.originalCharSetComboBox.setSelectedItem(ob.getOriginalCharsetName());
this.newCharSetComboBox.setSelectedItem(ob.getNewCharsetName());
this.oirginalCharSet = ob.getOriginalCharsetName();
this.newCharSet = ob.getNewCharsetName();
populateSubDatabaseConnectionBean((E) ob);
}
@ -96,17 +81,8 @@ public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connecti
public com.fr.data.impl.Connection updateBean() {
E ob = updateSubDatabaseConnectionBean();
if (this.originalCharSetComboBox.getSelectedIndex() == 0) {
ob.setOriginalCharsetName(null);
} else {
ob.setOriginalCharsetName((String) this.originalCharSetComboBox.getSelectedItem());
}
if (this.newCharSetComboBox.getSelectedIndex() == 0) {
ob.setNewCharsetName(null);
} else {
ob.setNewCharsetName((String) this.newCharSetComboBox.getSelectedItem());
}
ob.setOriginalCharsetName(this.oirginalCharSet);
ob.setNewCharsetName(this.newCharSet);
return ob;
}

33
designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java

@ -26,14 +26,25 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext;
import com.fr.function.TIME;
import com.fr.general.FRFont;
import com.fr.log.FineLoggerFactory;
import javax.swing.*;
import javax.swing.BorderFactory;
import javax.swing.Icon;
import javax.swing.JComponent;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.SwingWorker;
import javax.swing.UIManager;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.TableColumn;
import javax.swing.table.TableModel;
import java.awt.*;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
@ -285,7 +296,7 @@ public class PreviewTablePane extends BasicPane {
previewTablePane.dialog.setVisible(true);
}
return previewTablePane.previewTableData;
return previewTablePane.previewTableData;
}
private void showErrorMessage(Exception exp) {
@ -358,14 +369,16 @@ public class PreviewTablePane extends BasicPane {
worker = new SwingWorker<PreviewTableModel, Void>() {
protected PreviewTableModel doInBackground() throws Exception {
connectionBar.start();
if (tableData instanceof DBTableData) {
boolean status = DataOperator.getInstance().testConnection(((DBTableData) tableData).getDatabase());
if (!status) {
connectionBar.close();
throw new Exception(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database_Connection_Failed"));
try {
if (tableData instanceof DBTableData) {
boolean status = DataOperator.getInstance().testConnection(((DBTableData) tableData).getDatabase());
if (!status) {
throw new Exception(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database_Connection_Failed"));
}
}
} finally {
connectionBar.close();
}
connectionBar.close();
TableDataSource dataSource = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getTarget();
previewTableData = DesignTableDataManager.previewTableDataNeedInputParameters(dataSource, tableData, (int) maxPreviewNumberField.getValue(), true);
// parameterInputDialog

3
designer-base/src/main/java/com/fr/design/env/LocalDesignerWorkspaceInfo.java vendored

@ -77,7 +77,8 @@ public class LocalDesignerWorkspaceInfo implements DesignerWorkspaceInfo {
@Override
public boolean checkValid(){
File file = new File(this.path);
if(!file.isDirectory() || !ComparatorUtils.equals(file.getName(), "WEB-INF")) {
//判断不是文件夹/路径不在WEB-INF下/代码启动三种情况
if(!file.isDirectory() || !ComparatorUtils.equals(file.getName(), "WEB-INF") || this.path.startsWith(".")) {
return false;
}

2
designer-base/src/main/java/com/fr/design/extra/PluginUtils.java

@ -177,7 +177,7 @@ public class PluginUtils {
private static String getInterKeyByErrorCode(PluginErrorCode errorCode) {
return ERROR_CODE_I18N_PREFIX + errorCode.getDescription();
return errorCode.getDescription();
}
public static PluginMarker getInstalledPluginMarkerByID(String pluginID) {

9
designer-base/src/main/java/com/fr/design/extra/PluginWebBridge.java

@ -570,6 +570,15 @@ public class PluginWebBridge {
//todo 初始化设计器其他部分
}
/**
* 国际化(用来做兼容暂时不删)
*/
public String parseI18(final String key) {
return com.fr.design.i18n.Toolkit.i18nText(key);
}
/**
* 是否是在设计器中操作
*/

7
designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java

@ -1,6 +1,5 @@
package com.fr.design.gui.controlpane;
import com.fr.base.chart.BasePlot;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.controlpane.shortcutfactory.ShortCutFactory;
import com.fr.design.gui.ilable.UILabel;
@ -49,7 +48,6 @@ import java.awt.event.WindowEvent;
abstract class UIControlPane extends JControlPane {
private UIToolbar topToolBar;
protected Window popupEditDialog;
protected BasePlot plot;
private static final int TOP_TOOLBAR_HEIGHT = 20;
private static final int TOP_TOOLBAR_WIDTH = 156; // 可能因为用了tablelayout,要比其他地方多一个像素,看起来才正常
private static final int TOP_TOOLBAR_WIDTH_SHORT = 76;
@ -58,11 +56,6 @@ abstract class UIControlPane extends JControlPane {
super();
}
UIControlPane(BasePlot plot) {
super();
this.plot = plot;
}
public abstract void saveSettings();
@Override

5
designer-base/src/main/java/com/fr/design/gui/controlpane/UIListControlPane.java

@ -1,6 +1,5 @@
package com.fr.design.gui.controlpane;
import com.fr.base.chart.BasePlot;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.icontainer.UIScrollPane;
@ -55,10 +54,6 @@ public abstract class UIListControlPane extends UIControlPane implements ListCon
}
public UIListControlPane(BasePlot plot) {
super(plot);
}
private ListControlPaneHelper getHelper() {
if (helper == null) {
helper = ListControlPaneHelper.newInstance(this);

22
designer-base/src/main/java/com/fr/design/gui/icontainer/UIModeControlContainer.java

@ -1,16 +1,28 @@
package com.fr.design.gui.icontainer;
import com.fr.base.BaseUtils;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.utils.gui.GUICoreUtils;
import javax.swing.*;
import java.awt.*;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JLayeredPane;
import javax.swing.JPanel;
import java.awt.AlphaComposite;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Composite;
import java.awt.Container;
import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.LayoutManager;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionListener;
@ -263,7 +275,7 @@ public class UIModeControlContainer extends JLayeredPane {
public HidePane() {
setLayout(new FlowLayout(FlowLayout.CENTER, 10, -3));
setBackground(UIConstants.NORMAL_BACKGROUND);
add(new UILabel("<html><font size='5' face='Microsoft YaHei' color='#999999999'><B>" + com.fr.design.i18n.Toolkit.i18nText("Parameter Panel") + "</B></font></html>"));
add(new UILabel("<html><font size='5' face='Microsoft YaHei' color='#999999999'><B>" + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Parameter_Panel") + "</B></font></html>"));
UIButton viewButton = new UIButton(UIConstants.VIEW_NORMAL_ICON, UIConstants.VIEW_PRESSED_ICON, UIConstants.VIEW_PRESSED_ICON) {
@Override
public Dimension getPreferredSize() {

16
designer-base/src/main/java/com/fr/design/javascript/JSContentPane.java

@ -1,7 +1,9 @@
package com.fr.design.javascript;
import com.fr.design.DesignerEnvManager;
import com.fr.design.border.UIRoundedBorder;
import com.fr.design.constants.KeyWords;
import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.autocomplete.AutoCompletion;
import com.fr.design.gui.autocomplete.BasicCompletion;
@ -14,7 +16,6 @@ import com.fr.design.gui.syntax.ui.rsyntaxtextarea.RSyntaxTextArea;
import com.fr.design.gui.syntax.ui.rsyntaxtextarea.SyntaxConstants;
import com.fr.design.javascript.beautify.JavaScriptFormatHelper;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.IOUtils;
@ -60,10 +61,15 @@ public class JSContentPane extends BasicPane {
}
});
this.add(GUICoreUtils.createBorderLayoutPane(
funNameLabel, BorderLayout.WEST,
label, BorderLayout.EAST
), BorderLayout.NORTH);
//REPORT-10533 用户参数多达25个,导致JS没地方写,增加滚动条显示
JPanel jsParaPane = new JPanel(new BorderLayout(4, 4));
jsParaPane.setPreferredSize(new Dimension(300, 80));
UIScrollPane scrollPane = new UIScrollPane(funNameLabel);
scrollPane.setPreferredSize(new Dimension(400, 80));
scrollPane.setBorder(new UIRoundedBorder(UIConstants.TITLED_BORDER_COLOR, 1, UIConstants.ARC));
jsParaPane.add(scrollPane, BorderLayout.WEST);
jsParaPane.add(label, BorderLayout.EAST);
this.add(jsParaPane, BorderLayout.NORTH);
contentTextArea = new RSyntaxTextArea();
contentTextArea.setCloseCurlyBraces(true);

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

@ -38,6 +38,7 @@ public class DesignerLogHandler {
protected static final int INFO_INT = Level.INFO.toInt();
protected static final int ERROR_INT = Level.ERROR.toInt();
protected static final int WARN_INT = Level.WARN.toInt();
protected static final int DEBUG_INT = Level.DEBUG.toInt();
private static final int GAP_X = -150;
private static final int INFO_GAP_Y = -60;
private static final int ERRO_GAP_Y = -40;
@ -209,12 +210,15 @@ public class DesignerLogHandler {
public void printStackTrace(String message, Level level, Date date) {
int intLevel = level.toInt();
int logLevel = Log4jConfig.getInstance().getRootLevel().toInt();
if (intLevel == INFO_INT && showInfo.isSelected()) {
printMessage(message, intLevel, date);
} else if (intLevel == ERROR_INT && showError.isSelected()) {
printMessage(message, intLevel, date);
} else if (intLevel == WARN_INT && showServer.isSelected()) {
printMessage(message, intLevel, date);
} else if (intLevel == DEBUG_INT && logLevel == DEBUG_INT){
printMessage(message, intLevel, date);
}
}

9
designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java

@ -10,9 +10,12 @@ import com.fr.design.ExtraDesignClassManager;
import com.fr.design.actions.UpdateAction;
import com.fr.design.actions.community.BBSAction;
import com.fr.design.actions.community.BugAction;
import com.fr.design.actions.community.CenterAction;
import com.fr.design.actions.community.CusDemandAction;
import com.fr.design.actions.community.NeedAction;
import com.fr.design.actions.community.QuestionAction;
import com.fr.design.actions.community.SignAction;
import com.fr.design.actions.community.TechSolutionAction;
import com.fr.design.actions.community.UpAction;
import com.fr.design.actions.community.VideoAction;
import com.fr.design.actions.file.CloseCurrentTemplateAction;
@ -494,9 +497,11 @@ public abstract class ToolBarMenuDock {
shortCuts.add(new VideoAction());
shortCuts.add(new TutorialAction());
shortCuts.add(new QuestionAction());
shortCuts.add(new UpAction());
shortCuts.add(new NeedAction());
shortCuts.add(new TechSolutionAction());
shortCuts.add(new BugAction());
shortCuts.add(new NeedAction());
shortCuts.add(new CusDemandAction());
shortCuts.add(new CenterAction());
shortCuts.add(new SignAction());
return shortCuts.toArray(new ShortCut[shortCuts.size()]);
}

62
designer-base/src/main/java/com/fr/design/utils/BrowseUtils.java

@ -0,0 +1,62 @@
package com.fr.design.utils;
import com.fr.base.FRContext;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.OperatingSystem;
import com.fr.stable.StringUtils;
import javax.swing.JOptionPane;
import java.awt.Desktop;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
/**
* Created by XINZAI on 2018/8/23.
*/
public class BrowseUtils {
/**
* 处理内存异常win10下用rundll32打开
* @param uri 网址
* @param e
*/
private static void startBrowserFromCommand(String uri, IOException e) {
if (OperatingSystem.isWindows()) {
try {
// win10 内存用到到80%左右的时候, Desktop.browser经常提示"存储空间不足, 无法处理改命令", 用rundll32可以打开.
Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + uri);
} catch (IOException ee) {
JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Default_Browser_Duplicate"));
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
} else {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
/**
* 打开网页,用默认浏览器
* @param url 网址
*/
public static void browser(String url) {
if (StringUtils.isEmpty(url)) {
FRContext.getLogger().info("The URL is empty!");
return;
}
try {
Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) {
startBrowserFromCommand(url, exp);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (Exception exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
FineLoggerFactory.getLogger().error("Can not open the browser for URL: " + url);
}
}
}

2
designer-base/src/main/java/com/fr/env/EnvListPane.java vendored

@ -53,7 +53,7 @@ public class EnvListPane extends JListControlPane {
*/
@Override
public NameableCreator[] createNameableCreators() {
NameableCreator local = new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("FR-Engine-Local_Workspace"), "com/fr/design/images/data/bind/localconnect.png",
NameableCreator local = new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Local_Workspace"), "com/fr/design/images/data/bind/localconnect.png",
LocalDesignerWorkspaceInfo.class, LocalEnvPane.class);
NameableCreator remote = new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Env_Remote_Server"), "com/fr/design/images/data/bind/distanceconnect.png",
RemoteDesignerWorkspaceInfo.class, RemoteEnvPane.class);

43
designer-base/src/main/java/com/fr/start/ServerStarter.java

@ -1,14 +1,13 @@
package com.fr.start;
import com.fr.base.FRContext;
import com.fr.base.ServerConfig;
import com.fr.design.DesignerEnvManager;
import com.fr.design.utils.BrowseUtils;
import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralContext;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.OperatingSystem;
import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import com.fr.start.server.FineEmbedServer;
import com.fr.start.server.FineEmbedServerMonitor;
import com.fr.workspace.WorkContext;
@ -31,7 +30,7 @@ public class ServerStarter {
if (!WorkContext.getCurrent().isLocal()) {
//有问题,这里拿不到远程的http端口
browser(WorkContext.getCurrent().getPath());
BrowseUtils.browser(WorkContext.getCurrent().getPath());
}
else if (ComparatorUtils.equals(StableUtils.getInstallHome(), ".")) {//august:供代码使用
String web = GeneralContext.getCurrentAppNameOfEnv();
@ -49,7 +48,7 @@ public class ServerStarter {
FineEmbedServer.start();
} finally {
//先访问Demo, 后访问报表, 不需要重置服务器.
browser("http://localhost:" + DesignerEnvManager.getEnvManager().getEmbedServerPort() + "/" + GeneralContext.getCurrentAppNameOfEnv() + "/" + ServerConfig.getInstance().getServletName());
BrowseUtils.browser("http://localhost:" + DesignerEnvManager.getEnvManager().getEmbedServerPort() + "/" + GeneralContext.getCurrentAppNameOfEnv() + "/" + ServerConfig.getInstance().getServletName());
}
}
@ -77,40 +76,4 @@ public class ServerStarter {
browser(url);
}
}
private static void browser(String uri) {
if (StringUtils.isEmpty(uri)) {
FRContext.getLogger().info("The URL is empty!");
return;
}
try {
Desktop.getDesktop().browse(new URI(uri));
} catch (IOException e) {
startBrowserFromCommand(uri, e);
} catch (URISyntaxException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
FineLoggerFactory.getLogger().error("Can not open the browser for URL: " + uri);
}
}
private static void startBrowserFromCommand(String uri, IOException e) {
if (OperatingSystem.isWindows()) {
try {
// win10 内存用到到80%左右的时候, Desktop.browser经常提示"存储空间不足, 无法处理改命令", 用rundll32可以打开.
Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + uri);
} catch (IOException ee) {
JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Default_Browser_Duplicate"));
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
} else {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
}

BIN
designer-base/src/main/resources/com/fr/design/images/bbs/bbs.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

BIN
designer-base/src/main/resources/com/fr/design/images/bbs/bug.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 560 B

BIN
designer-base/src/main/resources/com/fr/design/images/bbs/center.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 B

BIN
designer-base/src/main/resources/com/fr/design/images/bbs/demand.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 505 B

BIN
designer-base/src/main/resources/com/fr/design/images/bbs/help.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 B

BIN
designer-base/src/main/resources/com/fr/design/images/bbs/need.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 362 B

BIN
designer-base/src/main/resources/com/fr/design/images/bbs/question.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 543 B

BIN
designer-base/src/main/resources/com/fr/design/images/bbs/sign.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 B

BIN
designer-base/src/main/resources/com/fr/design/images/bbs/solotion.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 B

BIN
designer-base/src/main/resources/com/fr/design/images/bbs/video.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

8
designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java

@ -14,7 +14,6 @@ import com.fr.design.chart.series.SeriesCondition.impl.ChartHyperRelateFloatLink
import com.fr.design.chart.series.SeriesCondition.impl.FormHyperlinkPane;
import com.fr.design.designer.TargetComponent;
import com.fr.design.fun.HyperlinkProvider;
import com.fr.design.gui.HyperlinkFilterHelper;
import com.fr.design.gui.controlpane.NameObjectCreator;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.imenutable.UIMenuNameableCreator;
@ -23,8 +22,6 @@ import com.fr.design.hyperlink.WebHyperlinkPane;
import com.fr.design.javascript.JavaScriptImplPane;
import com.fr.design.javascript.ParameterJavaScriptPane;
import com.fr.design.module.DesignModuleFactory;
import com.fr.log.FineLoggerFactory;
import com.fr.general.NameObject;
import com.fr.js.EmailJavaScript;
import com.fr.js.FormHyperlinkProvider;
@ -35,6 +32,7 @@ import com.fr.js.NameJavaScriptGroup;
import com.fr.js.ParameterJavaScript;
import com.fr.js.ReportletHyperlink;
import com.fr.js.WebHyperlink;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.ListMap;
import com.fr.stable.Nameable;
import com.fr.stable.bridge.StableFactory;
@ -93,7 +91,7 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane {
}
protected Map<String, BaseFormula> getHyperLinkEditorMap() {
return plot.getHyperLinkEditorMap();
return getPlot().getHyperLinkEditorMap();
}
/**
@ -147,7 +145,7 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane {
}
public void populate(Plot plot) {
this.plot = plot;
setPlot(plot);
HashMap paneMap = getHyperlinkMap(plot);
//安装平台内打开插件时,添加相应按钮

19
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartUIListControlPane.java

@ -1,6 +1,5 @@
package com.fr.van.chart.designer.component;
import com.fr.base.chart.BasePlot;
import com.fr.chart.chartattr.Plot;
import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener;
@ -13,7 +12,6 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.stable.Nameable;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
@ -38,15 +36,18 @@ import java.awt.event.ActionListener;
public abstract class VanChartUIListControlPane extends UIListControlPane implements UIObserver {
private UIObserverListener uiObserverListener;
private Plot plot;//update用
public VanChartUIListControlPane() {
super();
this.setBorder(null);
iniListener();
protected Plot getPlot() {
return plot;
}
public VanChartUIListControlPane(BasePlot plot) {
super(plot);
protected void setPlot(Plot plot) {
this.plot = plot;
}
public VanChartUIListControlPane() {
super();
this.setBorder(null);
iniListener();
}
@ -116,7 +117,7 @@ public abstract class VanChartUIListControlPane extends UIListControlPane implem
if (isPopulating) {
return;
}
update((Plot) plot);
update(getPlot());
fireChanged();//图表属性改变,响应事件
}

10
designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartConditionAttrContentPane.java

@ -27,10 +27,16 @@ public class VanChartConditionAttrContentPane extends AbstractConditionAttrConte
populateBean(plot, collection, showPane);
}
public void populateBean(Plot plot, ConditionCollection collection, Class<? extends ConditionAttributesPane> showPane){
public void populateBean(final Plot plot, ConditionCollection collection, Class<? extends ConditionAttributesPane> showPane) {
if (conditionPane == null) {
conditionPane = new VanChartConditionListControlPane(plot);
conditionPane = new VanChartConditionListControlPane() {
@Override
protected Plot getPlot() {
return plot;
}
};
}
this.setLayout(new BorderLayout());

10
designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartConditionListControlPane.java

@ -1,6 +1,5 @@
package com.fr.van.chart.designer.other;
import com.fr.base.chart.BasePlot;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.chart.chartglyph.ConditionCollection;
@ -9,7 +8,6 @@ import com.fr.design.beans.BasicBeanPane;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.gui.controlpane.NameObjectCreator;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.general.NameObject;
import com.fr.stable.Nameable;
import com.fr.van.chart.designer.component.VanChartUIListControlPane;
@ -23,10 +21,6 @@ import java.lang.reflect.InvocationTargetException;
*/
public class VanChartConditionListControlPane extends VanChartUIListControlPane {
public VanChartConditionListControlPane(BasePlot plot) {
super(plot);
}
public void populate(Nameable[] nameableArray, Class<? extends ConditionAttributesPane> showPane) {
initComponentPane();
this.setBorder(null);
@ -37,7 +31,7 @@ public class VanChartConditionListControlPane extends VanChartUIListControlPane
@Override
public NameableCreator[] createNameableCreators() {
return new NameObjectCreator[]{new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Condition_Attributes"), ConditionAttr.class, ChartTypeInterfaceManager.getInstance().getPlotConditionPane((Plot) plot).getClass())};
return new NameObjectCreator[]{new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Condition_Attributes"), ConditionAttr.class, ChartTypeInterfaceManager.getInstance().getPlotConditionPane(getPlot()).getClass())};
}
@ -45,7 +39,7 @@ public class VanChartConditionListControlPane extends VanChartUIListControlPane
Constructor<? extends BasicBeanPane> constructor = null;
try {
constructor = creator.getUpdatePane().getConstructor(Plot.class);
return constructor.newInstance(plot);
return constructor.newInstance(getPlot());
} catch (InstantiationException e) {
throw new RuntimeException(e);

3
designer-chart/src/main/java/com/fr/van/chart/designer/style/background/AlertLineListControlPane.java

@ -5,7 +5,6 @@ import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.controlpane.ShortCut4JControlPane;
import com.fr.general.ComparatorUtils;
import com.fr.general.NameObject;
import com.fr.plugin.chart.attr.DefaultAxisHelper;
import com.fr.plugin.chart.attr.axis.VanChartAlertValue;
@ -47,7 +46,7 @@ public class AlertLineListControlPane extends VanChartUIListControlPane {
}
public void populate(Plot plot) {
this.plot = plot;
setPlot(plot);
VanChartRectanglePlot rectanglePlot = (VanChartRectanglePlot) plot;
List<VanChartAxis> xAxisList = rectanglePlot.getXAxisList();
List<VanChartAxis> yAxisList = rectanglePlot.getYAxisList();

3
designer-chart/src/main/java/com/fr/van/chart/designer/style/background/BackgroundListControlPane.java

@ -5,7 +5,6 @@ import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.controlpane.ShortCut4JControlPane;
import com.fr.general.ComparatorUtils;
import com.fr.general.NameObject;
import com.fr.plugin.chart.attr.DefaultAxisHelper;
import com.fr.plugin.chart.attr.axis.VanChartAlertValue;
@ -49,7 +48,7 @@ public class BackgroundListControlPane extends VanChartUIListControlPane {
}
public void populate(Plot plot) {
this.plot = plot;
setPlot(plot);
VanChartRectanglePlot rectanglePlot = (VanChartRectanglePlot) plot;
List<VanChartAxis> xAxisList = rectanglePlot.getXAxisList();
List<VanChartAxis> yAxisList = rectanglePlot.getYAxisList();

3
designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartStackedAndAxisListControlPane.java

@ -6,7 +6,6 @@ import com.fr.chart.chartglyph.ConditionCollection;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.controlpane.ShortCut4JControlPane;
import com.fr.general.NameObject;
import com.fr.plugin.chart.attr.DefaultAxisHelper;
import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot;
@ -47,7 +46,7 @@ public class VanChartStackedAndAxisListControlPane extends VanChartUIListControl
}
public void populate(VanChartRectanglePlot plot) {
this.plot = plot;
setPlot(plot);
String[] axisXNames = DefaultAxisHelper.getXAxisNames(plot);
String[] axisYNames = DefaultAxisHelper.getYAxisNames(plot);

2
designer-chart/src/main/java/com/fr/van/chart/pie/VanChartPiePlotPane.java

@ -30,7 +30,7 @@ public class VanChartPiePlotPane extends AbstractVanChartTypePane {
return new String[]{
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_New_Pie"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_SameArc_Pie"),
com.fr.design.i18n.Toolkit.i18nText("Plugin-ChartF_DifferentArcPie")
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_DifferArc_Pie")
};
}

7
designer-form/src/main/java/com/fr/design/mainframe/JForm.java

@ -61,6 +61,8 @@ import com.fr.form.ui.container.WLayout;
import com.fr.general.ComparatorUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.page.PaperSettingProvider;
import com.fr.report.cell.Elem;
import com.fr.report.cell.cellattr.CellImage;
import com.fr.report.worksheet.FormElementCase;
import com.fr.stable.ArrayUtils;
import com.fr.stable.Constants;
@ -465,7 +467,10 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
// ////////////////for toolbarMenuAdapter//////////////////////////////
// ////////////////////////////////////////////////////////////////////
@Override
public void setPictureElem(Elem elem, CellImage cellImage) {
elem.setValue(cellImage.getImage());
}
/**
* 目标菜单
*

2
designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java

@ -87,7 +87,7 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
*/
public JPanel createContentPane() {
JPanel downPane = new JPanel(new BorderLayout());
downPane.add(new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Auto_Adjust_Size"), HEAD_WDITH, HEAD_HEIGTH, seniorPane()), BorderLayout.NORTH);
downPane.add(new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advaced"), HEAD_WDITH, HEAD_HEIGTH, seniorPane()), BorderLayout.NORTH);
downPane.add(new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Pagination"), HEAD_WDITH, HEAD_HEIGTH, pagePane()), BorderLayout.CENTER);
JPanel contentPane = new JPanel(new BorderLayout(0, 0));
contentPane.add(new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Basic"), HEAD_WDITH, HEAD_HEIGTH, basicPane()), BorderLayout.NORTH);

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

@ -6,7 +6,6 @@ import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.TemplatePane;
import com.fr.design.mainframe.loghandler.DesignerLogHandler;
import com.fr.event.EventDispatcher;
import com.fr.log.FineLoggerFactory;
import com.fr.serialization.SerializerHelper;
import com.fr.stable.ArrayUtils;
@ -21,7 +20,9 @@ import io.socket.client.IO;
import io.socket.client.Socket;
import io.socket.emitter.Emitter;
import javax.swing.*;
import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import java.io.IOException;
import java.net.URI;
import java.net.URL;
@ -80,9 +81,17 @@ public class DesignerSocketIO {
@Override
public void call(Object... objects) {
if (status != Status.Disconnecting) {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remote_Disconnected"),
null, 0, UIManager.getIcon("OptionPane.errorIcon"));
TemplatePane.getInstance().editItems();
try {
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remote_Disconnected"),
null, 0, UIManager.getIcon("OptionPane.errorIcon"));
TemplatePane.getInstance().editItems();
}
});
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
status = Status.Disconnected;
}

18
designer-realize/src/main/java/com/fr/start/Designer.java

@ -38,9 +38,7 @@ import com.fr.design.module.DesignModuleFactory;
import com.fr.design.utils.DesignUtils;
import com.fr.design.utils.concurrent.ThreadFactoryBuilder;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.CloudCenter;
import com.fr.general.ComparatorUtils;
import com.fr.module.Module;
import com.fr.module.ModuleContext;
import com.fr.stable.BuildContext;
@ -57,9 +55,13 @@ import com.fr.start.preload.ImagePreLoader;
import com.fr.start.server.ServerTray;
import com.fr.workspace.WorkContext;
import javax.swing.*;
import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.border.MatteBorder;
import java.awt.*;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
@ -125,14 +127,6 @@ public class Designer extends BaseDesigner {
private static void preloadResource() {
ExecutorService service = Executors.newCachedThreadPool();
service.submit(new Runnable() {
@Override
public void run() {
CloudCenter.getInstance();
Cursor cursor = UIConstants.CELL_DEFAULT_CURSOR;
}
});
service.submit(new Runnable() {
@Override
public void run() {

Loading…
Cancel
Save