Browse Source

Merge pull request #79 in BA/design from release to master

* commit 'aaa9350a4aaadd474aab1896f2ffffb1e481e75c':
  1
  1
  冲突
  update
  update
  update
  接口
  rt
  接口
  去掉无用返回值
  private
  改成循环存取
  邮件图片导出设置part5 in 5
  接口命名规范
  接口命名规范
  1、更新对话框在插件管理背面的问题 2、下载插件和更新插件时提醒登陆
  数据集分组插件调整
  update
master
superman 9 years ago
parent
commit
7490bd1b7c
  1. 6
      designer/src/com/fr/design/report/ExcelExportPane.java
  2. 4
      designer/src/com/fr/design/report/PDFExportPane.java
  3. 32
      designer/src/com/fr/design/report/ReportExportAttrPane.java
  4. 4
      designer/src/com/fr/design/report/WordExportPane.java
  5. 10
      designer_base/src/com/fr/design/extra/PluginManagerPane.java
  6. 7
      designer_base/src/com/fr/design/extra/exe/InstallOnlineExecutor.java
  7. 7
      designer_base/src/com/fr/design/extra/exe/UpdateOnlineExecutor.java
  8. 13
      designer_base/src/com/fr/design/fun/AbstractExportPane.java
  9. 22
      designer_base/src/com/fr/design/fun/ExportAttrTabProvider.java
  10. 4
      designer_base/src/com/fr/design/fun/WidgetPropertyUIProvider.java
  11. 19
      designer_base/src/com/fr/design/fun/impl/AbstractExportAttrTabProvider.java
  12. 4
      designer_base/src/com/fr/design/fun/impl/AbstractWidgetPropertyUIProvider.java
  13. 3
      designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java
  14. 4
      designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java
  15. 2
      designer_chart/src/com/fr/design/chart/fun/IndependentChartUIProvider.java
  16. 4
      designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUI.java
  17. 5
      designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUIWithAPILevel.java
  18. 9
      designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java
  19. 4
      designer_chart/src/com/fr/design/mainframe/chart/ChartHyperEditPane.java
  20. 6
      designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java

6
designer/src/com/fr/design/report/ExcelExportPane.java

@ -4,8 +4,10 @@ package com.fr.design.report;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import com.fr.design.fun.AbstractExportPane;
import com.fr.design.gui.ilable.UILabel;
import javax.swing.JPanel;
import javax.swing.*;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.itextfield.UITextField;
@ -32,7 +34,7 @@ public class ExcelExportPane extends BasicPane {
protected void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
JPanel outnorthPane =FRGUIPaneFactory.createTitledBorderPane("Excel" + Inter.getLocText("ReportD-Excel_Export"));
JPanel northPane=FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane();
this.add(outnorthPane);

4
designer/src/com/fr/design/report/PDFExportPane.java

@ -4,7 +4,7 @@ package com.fr.design.report;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JPanel;
import javax.swing.*;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
@ -26,7 +26,7 @@ public class PDFExportPane extends BasicPane {
protected void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
JPanel outnorthPane =FRGUIPaneFactory.createTitledBorderPane("PDF" + Inter.getLocText("ReportD-Excel_Export"));
JPanel northPane=FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane();
this.add(outnorthPane);

32
designer/src/com/fr/design/report/ReportExportAttrPane.java

@ -1,27 +1,42 @@
package com.fr.design.report;
import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
import javax.swing.*;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.dialog.BasicPane;
import com.fr.design.fun.AbstractExportPane;
import com.fr.design.fun.ExportAttrTabProvider;
import com.fr.design.gui.frpane.UITabbedPane;
import com.fr.general.Inter;
import com.fr.io.attr.ReportExportAttr;
import java.util.ArrayList;
import java.util.List;
public class ReportExportAttrPane extends BasicPane {
private ExcelExportPane excelExportPane;
private PDFExportPane pdfExportPane;
private WordExportPane wordExportPane;
private List<AbstractExportPane> paneList;
public ReportExportAttrPane() {
UITabbedPane uiTabbedPane = new UITabbedPane();
this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
this.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
excelExportPane = new ExcelExportPane();
this.add(excelExportPane);
uiTabbedPane.addTab("Excel", excelExportPane);
pdfExportPane = new PDFExportPane();
this.add(pdfExportPane);
uiTabbedPane.addTab("PDF", pdfExportPane);
wordExportPane = new WordExportPane();
this.add(wordExportPane);
uiTabbedPane.addTab("Word", wordExportPane);
ExportAttrTabProvider[] providers = ExtraDesignClassManager.getInstance().getExportAttrTabProviders();
paneList = new ArrayList<AbstractExportPane>();
for (ExportAttrTabProvider provider : providers) {
uiTabbedPane.addTab(provider.title(), provider.toSwingComponent());
paneList.add(provider.toExportPane());
}
this.add(uiTabbedPane);
}
@Override
@ -45,6 +60,10 @@ public class ReportExportAttrPane extends BasicPane {
if (this.wordExportPane != null) {
this.wordExportPane.populate(reportExportAttr.getWordExportAttr());
}
for (AbstractExportPane exportpane : paneList) {
exportpane.populate(reportExportAttr);
}
}
public ReportExportAttr update() {
@ -62,6 +81,9 @@ public class ReportExportAttrPane extends BasicPane {
reportExportAttr.setWordExportAttr(this.wordExportPane.update());
}
for (AbstractExportPane exportPane : paneList) {
exportPane.update(reportExportAttr);
}
return reportExportAttr;
}
}

4
designer/src/com/fr/design/report/WordExportPane.java

@ -4,7 +4,7 @@ package com.fr.design.report;
import java.awt.Color;
import java.awt.Dimension;
import javax.swing.JPanel;
import javax.swing.*;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.MultilineLabel;
@ -23,7 +23,7 @@ public class WordExportPane extends BasicPane {
protected void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
JPanel outnorthPane =FRGUIPaneFactory.createTitledBorderPane("Word" + Inter.getLocText("ReportD-Excel_Export"));
this.add(outnorthPane);

10
designer_base/src/com/fr/design/extra/PluginManagerPane.java

@ -42,6 +42,7 @@ public class PluginManagerPane extends BasicPane {
if (StableUtils.isDebug()) {
URL url = ClassLoader.getSystemResource("");
installHome = url.getPath();
addPane(installHome);
} else {
installHome = StableUtils.getInstallHome();
File file = new File(StableUtils.pathJoin(installHome, "scripts"));
@ -57,16 +58,21 @@ public class PluginManagerPane extends BasicPane {
downloadShopScripts();
}
} else {
addPane(installHome);
updateShopScripts();
}
}
PluginWebPane webPane = new PluginWebPane(new File(installHome).getAbsolutePath());
add(webPane, BorderLayout.CENTER);
} else {
initTraditionalStore();
}
}
private void addPane(String installHome) {
PluginWebPane webPane = new PluginWebPane(new File(installHome).getAbsolutePath());
add(webPane, BorderLayout.CENTER);
}
private void initTraditionalStore() {
UITabbedPane tabbedPane = new UITabbedPane();
add(tabbedPane, BorderLayout.CENTER);

7
designer_base/src/com/fr/design/extra/exe/InstallOnlineExecutor.java

@ -4,10 +4,12 @@ import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager;
import com.fr.design.RestartHelper;
import com.fr.design.extra.After;
import com.fr.design.extra.LoginCheckContext;
import com.fr.design.extra.PluginHelper;
import com.fr.design.extra.Process;
import com.fr.general.Inter;
import com.fr.plugin.PluginVerifyException;
import com.fr.stable.StringUtils;
import javax.swing.*;
@ -38,6 +40,10 @@ public class InstallOnlineExecutor implements Executor {
@Override
public void run(final Process<String> process) {
if(StringUtils.isBlank(DesignerEnvManager.getEnvManager().getBBSName())){
LoginCheckContext.fireLoginCheckListener();
}
if(StringUtils.isNotBlank(DesignerEnvManager.getEnvManager().getBBSName())) {
String username = DesignerEnvManager.getEnvManager().getBBSName();
String password = DesignerEnvManager.getEnvManager().getBBSPassword();
try {
@ -51,6 +57,7 @@ public class InstallOnlineExecutor implements Executor {
FRContext.getLogger().error(e.getMessage(), e);
}
}
}
},
new Command() {
@Override

7
designer_base/src/com/fr/design/extra/exe/UpdateOnlineExecutor.java

@ -4,11 +4,13 @@ import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager;
import com.fr.design.RestartHelper;
import com.fr.design.extra.After;
import com.fr.design.extra.LoginCheckContext;
import com.fr.design.extra.PluginHelper;
import com.fr.design.extra.Process;
import com.fr.general.Inter;
import com.fr.plugin.Plugin;
import com.fr.plugin.PluginLoader;
import com.fr.stable.StringUtils;
import javax.swing.*;
import java.io.File;
@ -41,6 +43,10 @@ public class UpdateOnlineExecutor implements Executor {
@Override
public void run(Process<String> process) {
if(StringUtils.isBlank(DesignerEnvManager.getEnvManager().getBBSName())){
LoginCheckContext.fireLoginCheckListener();
}
if(StringUtils.isNotBlank(DesignerEnvManager.getEnvManager().getBBSName())){
for (int i = 0; i < pluginIDs.length; i++) {
Plugin plugin = PluginLoader.getLoader().getPluginById(pluginIDs[i]);
String id = null;
@ -78,6 +84,7 @@ public class UpdateOnlineExecutor implements Executor {
}
}
}
}
};
}

13
designer_base/src/com/fr/design/fun/AbstractExportPane.java

@ -0,0 +1,13 @@
package com.fr.design.fun;
import com.fr.design.dialog.BasicPane;
/**
* Created by vito on 16/5/5.
*/
public abstract class AbstractExportPane extends BasicPane {
public abstract void populate(Object t);
public abstract void update(Object t);
}

22
designer_base/src/com/fr/design/fun/ExportAttrTabProvider.java

@ -0,0 +1,22 @@
package com.fr.design.fun;
import com.fr.stable.fun.Level;
import javax.swing.*;
/**
* Created by vito on 16/5/5.
*/
public interface ExportAttrTabProvider extends Level{
String XML_TAG = "ExportAttrTabProvider";
int CURRENT_LEVEL = 1;
JComponent toSwingComponent();
AbstractExportPane toExportPane();
String title();
String tag();
}

4
designer_base/src/com/fr/design/fun/WidgetAttrProvider.java → designer_base/src/com/fr/design/fun/WidgetPropertyUIProvider.java

@ -7,8 +7,8 @@ import com.fr.stable.fun.Level;
/**
* Created by vito on 16/4/27.
*/
public interface WidgetAttrProvider extends Level {
String XML_TAG = "WidgetAttrProvider";
public interface WidgetPropertyUIProvider extends Level {
String XML_TAG = "WidgetPropertyUIProvider";
int CURRENT_LEVEL = 1;

19
designer_base/src/com/fr/design/fun/impl/AbstractExportAttrTabProvider.java

@ -0,0 +1,19 @@
package com.fr.design.fun.impl;
import com.fr.design.fun.ExportAttrTabProvider;
import com.fr.stable.fun.impl.AbstractProvider;
/**
* Created by vito on 16/5/5.
*/
public abstract class AbstractExportAttrTabProvider extends AbstractProvider implements ExportAttrTabProvider {
@Override
public int currentAPILevel() {
return CURRENT_LEVEL;
}
@Override
public String mark4Provider() {
return this.getClass().getName();
}
}

4
designer_base/src/com/fr/design/fun/impl/AbstractWidgetAttrProvider.java → designer_base/src/com/fr/design/fun/impl/AbstractWidgetPropertyUIProvider.java

@ -1,13 +1,13 @@
package com.fr.design.fun.impl;
import com.fr.design.fun.WidgetAttrProvider;
import com.fr.design.fun.WidgetPropertyUIProvider;
import com.fr.stable.fun.impl.AbstractProvider;
/**
* Created by vito on 16/4/27.
*/
public abstract class AbstractWidgetAttrProvider extends AbstractProvider implements WidgetAttrProvider {
public abstract class AbstractWidgetPropertyUIProvider extends AbstractProvider implements WidgetPropertyUIProvider {
@Override
public int currentAPILevel() {

3
designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java

@ -100,6 +100,9 @@ public class UIResizableContainer extends JPanel {
}
public void setDownPane(JComponent downPane) {
if (this.downPane != null){
return;
}
this.verticalToolPane = new VerticalToolPane();
this.downPane = downPane;
add(downPane);

4
designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java

@ -143,6 +143,10 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
}
public ChartDataPane getChartDataPane(String plotID, AttributeChangeListener listener) {
return chartTypeInterfaces.get(plotID).getChartDataPane(listener);
}
public AbstractChartAttrPane[] getAttrPaneArray(String plotID, AttributeChangeListener listener) {
return chartTypeInterfaces.get(plotID).getAttrPaneArray(listener);
}

2
designer_chart/src/com/fr/design/chart/fun/IndependentChartUIProvider.java

@ -68,6 +68,8 @@ public interface IndependentChartUIProvider extends Level {
*/
AbstractChartAttrPane[] getAttrPaneArray(AttributeChangeListener listener);
ChartDataPane getChartDataPane(AttributeChangeListener listener);
/**
* 是否使用默认的界面为了避免界面来回切换
*

4
designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUI.java

@ -7,6 +7,7 @@ import com.fr.design.chart.series.SeriesCondition.DataSeriesConditionPane;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.mainframe.chart.AbstractChartAttrPane;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.general.ComparatorUtils;
@ -26,6 +27,9 @@ public abstract class AbstractIndependentChartUI implements IndependentChartUIPr
return new AbstractChartAttrPane[0];
}
public ChartDataPane getChartDataPane(AttributeChangeListener listener){
return new ChartDataPane(listener);
}
/**
* 是否使用默认的界面为了避免界面来回切换
* @return 是否使用默认的界面

5
designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUIWithAPILevel.java

@ -7,6 +7,7 @@ import com.fr.design.chart.series.SeriesCondition.DataSeriesConditionPane;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.mainframe.chart.AbstractChartAttrPane;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.general.ComparatorUtils;
@ -23,6 +24,10 @@ public abstract class AbstractIndependentChartUIWithAPILevel implements Independ
return new AbstractChartAttrPane[0];
}
public ChartDataPane getChartDataPane(AttributeChangeListener listener){
return new ChartDataPane(listener);
}
/**
* 是否使用默认的界面为了避免界面来回切换
* @return 是否使用默认的界面

9
designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java

@ -139,7 +139,7 @@ public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4
this.removeAll();
this.setLayout(new BorderLayout());
paneList = new ArrayList<AbstractChartAttrPane>();
addTypeAndDataPane();
addTypePane();
boolean isDefault = true;
String plotID = "";
@ -149,10 +149,13 @@ public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4
}
if(isDefault){
paneList.add(dataPane4SupportCell);
paneList.add(stylePane);
paneList.add(otherPane);
this.isDefaultPane = true;
}else{
ChartDataPane chartDataPane = ChartTypeInterfaceManager.getInstance().getChartDataPane(plotID, listener);
paneList.add(chartDataPane);
AbstractChartAttrPane[] otherPaneList = ChartTypeInterfaceManager.getInstance().getAttrPaneArray(plotID, listener);
for(int i = 0; i < otherPaneList.length; i++){
otherPaneList[i].addAttributeChangeListener(listener);
@ -165,10 +168,8 @@ public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4
}
}
protected void addTypeAndDataPane() {
protected void addTypePane() {
paneList.add(typePane);
paneList.add(dataPane4SupportCell);
}
protected void setSelectedTab() {

4
designer_chart/src/com/fr/design/mainframe/chart/ChartHyperEditPane.java

@ -39,11 +39,9 @@ public class ChartHyperEditPane extends ChartEditPane {
}
protected void addTypeAndDataPane() {
protected void addTypePane() {
paneList.add(attrPane);
paneList.add(typePane);
paneList.add(dataPane4SupportCell);
}

6
designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java

@ -8,7 +8,7 @@ import javax.swing.*;
import com.fr.base.BaseUtils;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.fun.WidgetAttrProvider;
import com.fr.design.fun.WidgetPropertyUIProvider;
import com.fr.design.gui.frpane.UITabbedPane;
import com.fr.general.Inter;
import com.fr.design.gui.icontainer.UIScrollPane;
@ -88,8 +88,8 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper
tabbedPane.addTab(Inter.getLocText("Form-Properties"), psp);
tabbedPane.addTab(Inter.getLocText("Form-Events"), esp);
WidgetAttrProvider[] widgetAttrProviders = ExtraDesignClassManager.getInstance().getWidgetAttrProviders();
for (WidgetAttrProvider widgetAttrProvider : widgetAttrProviders) {
WidgetPropertyUIProvider[] widgetAttrProviders = ExtraDesignClassManager.getInstance().getWidgetAttrProviders();
for (WidgetPropertyUIProvider widgetAttrProvider : widgetAttrProviders) {
AbstractPropertyTable propertyTable = widgetAttrProvider.createWidgetAttrTable();
widgetPropertyTables.add(propertyTable);
designer.addDesignerEditListener(new WidgetPropertyDesignerAdapter(propertyTable));

Loading…
Cancel
Save