Browse Source

Merge branch 'release/10.0' of http://cloud.finedevelop.com:2015/scm/~neil/design into release/10.0

bugfix/10.0
neil 6 years ago
parent
commit
64640bd98c
  1. 31
      designer-base/src/main/java/com/fr/design/fun/HyperlinkProvider.java
  2. 16
      designer-base/src/main/java/com/fr/design/fun/JavaScriptActionProvider.java
  3. 24
      designer-base/src/main/java/com/fr/design/fun/impl/AbstractHyperlinkProvider.java
  4. 16
      designer-base/src/main/java/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java
  5. 3
      designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java
  6. 9
      designer-base/src/main/java/com/fr/design/web/CustomIconPane.java
  7. 11
      designer-base/src/main/java/com/fr/start/ServerStarter.java
  8. 14
      designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedChartReportDataPane.java
  9. 7
      designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedChartTableDataPane.java
  10. 2
      designer-chart/src/main/java/com/fr/van/chart/designer/TableLayout4VanChartHelper.java
  11. 4
      designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java

31
designer-base/src/main/java/com/fr/design/fun/HyperlinkProvider.java

@ -1,21 +1,44 @@
package com.fr.design.fun;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.stable.fun.Level;
import com.fr.js.Hyperlink;
import com.fr.stable.fun.mark.Mutable;
/**
* Created by zack on 2016/1/20.
*/
public interface HyperlinkProvider extends Mutable {
public interface HyperlinkProvider<T extends Hyperlink> extends Mutable {
String XML_TAG = "HyperlinkProvider";
int CURRENT_LEVEL = 2;
/**
* 创建一个超级连接类型
* @return NameableCreator
* 超级链接的描述信息如果是实现类中重载了这个方法就不需要再实现下面的三个方法
* @see HyperlinkProvider#text()
* @see HyperlinkProvider#target()
* @see HyperlinkProvider#appearance()
* 如果并不重载就需要分别实现上面的三个方法不推荐重载这个方法
* @return 描述信息
*/
NameableCreator createHyperlinkCreator();
/**
* 超级链接的名字
* @return 名字
*/
String text();
/**
* 超级链接的实现类
* @return 实现类
*/
Class<T> target();
/**
* 超级链接的界面配置类
* @return 配置类
*/
Class<? extends BasicBeanPane<T>> appearance();
}

16
designer-base/src/main/java/com/fr/design/fun/JavaScriptActionProvider.java

@ -2,11 +2,12 @@ package com.fr.design.fun;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.javascript.JavaScriptActionPane;
import com.fr.design.mainframe.JTemplate;
import com.fr.js.JavaScript;
import com.fr.stable.fun.mark.Mutable;
/**
* Created by zack on 2015/8/14.
* 控件的事件扩展接口
*/
public interface JavaScriptActionProvider extends Mutable{
@ -14,10 +15,21 @@ public interface JavaScriptActionProvider extends Mutable{
int CURRENT_LEVEL = 1;
/**
* 事件的界面
*/
FurtherBasicBeanPane<? extends JavaScript> getJavaScriptActionPane();
/**
* 这个界面在哪些类型模板设计的时候会出现
* @see com.fr.design.mainframe.JWorkBook
* @see com.fr.design.mainframe.JForm
*/
boolean accept(JTemplate template);
@Deprecated
FurtherBasicBeanPane<? extends JavaScript> getJavaScriptActionPane(JavaScriptActionPane pane);
@Deprecated
boolean isSupportType();
}

24
designer-base/src/main/java/com/fr/design/fun/impl/AbstractHyperlinkProvider.java

@ -1,6 +1,10 @@
package com.fr.design.fun.impl;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.fun.HyperlinkProvider;
import com.fr.design.gui.controlpane.NameObjectCreator;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.stable.StringUtils;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
@ -18,4 +22,24 @@ public abstract class AbstractHyperlinkProvider extends AbstractProvider impleme
public String mark4Provider() {
return getClass().getName();
}
@Override
public NameableCreator createHyperlinkCreator() {
return new NameObjectCreator(text(), target(), appearance());
}
@Override
public String text() {
return StringUtils.EMPTY;
}
@Override
public Class target() {
return null;
}
@Override
public Class<? extends BasicBeanPane> appearance() {
return null;
}
}

16
designer-base/src/main/java/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java

@ -3,6 +3,8 @@ package com.fr.design.fun.impl;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.fun.JavaScriptActionProvider;
import com.fr.design.javascript.JavaScriptActionPane;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JTemplate;
import com.fr.js.JavaScript;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
@ -27,10 +29,16 @@ public abstract class AbstractJavaScriptActionProvider extends AbstractProvider
return getJavaScriptActionPane();
}
/**
* 判断是否是支持的类型cpt,frm默认是
* @return
*/
@Override
public boolean accept(JTemplate template) {
// 这里只是为了兼容原来的isSupportType方法
boolean result = isSupportType();
if (result) {
return true;
}
return true;
}
@Override
public boolean isSupportType(){
return true;

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

@ -7,6 +7,7 @@ import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.fun.JavaScriptActionProvider;
import com.fr.design.gui.frpane.UIComboBoxPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.write.submit.DBManipulationPane;
import com.fr.form.ui.WebContentUtils;
import com.fr.js.JavaScript;
@ -45,7 +46,7 @@ public abstract class JavaScriptActionPane extends UIComboBoxPane<JavaScript> {
Set<JavaScriptActionProvider> javaScriptActionProviders = ExtraDesignClassManager.getInstance().getArray(JavaScriptActionProvider.XML_TAG);
if (javaScriptActionProviders != null) {
for (JavaScriptActionProvider jsp : javaScriptActionProviders) {
if(jsp.isSupportType()){
if(jsp.accept(DesignerContext.getDesignerFrame().getSelectedJTemplate())){
paneList.add(jsp.getJavaScriptActionPane(this));
}
}

9
designer-base/src/main/java/com/fr/design/web/CustomIconPane.java

@ -24,6 +24,8 @@ import com.fr.stable.Constants;
import com.fr.stable.CoreGraphHelper;
import com.fr.stable.ListMap;
import com.fr.stable.StringUtils;
import com.fr.transaction.Configurations;
import com.fr.transaction.WorkerFacade;
import javax.swing.*;
import javax.swing.event.ChangeEvent;
@ -283,6 +285,13 @@ public class CustomIconPane extends BasicPane {
}
public String update() {
//把图标信息入库
Configurations.update(new WorkerFacade(WidgetInfoConfig.class) {
@Override
public void run() {
WidgetInfoConfig.getInstance().setIconManager(IconManager.getIconManager());
}
});
return selectedIconName;
}

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

@ -5,18 +5,11 @@ 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.start.server.FineEmbedServer;
import com.fr.start.server.FineEmbedServerMonitor;
import com.fr.workspace.WorkContext;
import javax.swing.JOptionPane;
import java.awt.Desktop;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
@ -66,7 +59,11 @@ public class ServerStarter {
@Override
public void run() {
try {
FineEmbedServer.start();
} finally {
FineEmbedServerMonitor.getInstance().setComplete();
}
BrowseUtils.browser(url);
}
});

14
designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedChartReportDataPane.java

@ -6,6 +6,7 @@ import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane;
import javax.swing.BorderFactory;
@ -49,16 +50,17 @@ public abstract class AbstractExtendedChartReportDataPane<T extends AbstractData
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f, COMPONENT_WIDTH};
double[] columnSize = {ChartDataPane.LABEL_WIDTH, COMPONENT_WIDTH};
double[] rowSize = new double[len + (hasCustomFieldPane() ? 2 : 0)];
Arrays.fill(rowSize, p);
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 24, 6);
panel.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 8));
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 0, 6);
this.setLayout(new BorderLayout());
this.add(panel, BorderLayout.CENTER);
this.add(addSouthPane(), BorderLayout.SOUTH);
this.setLayout(new BorderLayout(0,6));
this.add(panel, BorderLayout.NORTH);
this.add(addSouthPane(), BorderLayout.CENTER);
this.setBorder(BorderFactory.createEmptyBorder(0, 15, 0, 8));
}
protected JPanel addSouthPane() {

7
designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedChartTableDataPane.java

@ -7,6 +7,7 @@ import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.CalculateComboBox;
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
import com.fr.general.GeneralUtils;
@ -43,13 +44,13 @@ public abstract class AbstractExtendedChartTableDataPane<T extends AbstractDataC
}
double p = TableLayout.PREFERRED;
double[] columnSize = {TableLayout.FILL, 120};
double[] columnSize = {ChartDataPane.LABEL_WIDTH, 122};
double[] rowSize = new double[len];
Arrays.fill(rowSize, p);
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize,0,6);
this.setLayout(new BorderLayout(0, 6));
this.setLayout(new BorderLayout(0, 4));
this.setBorder(BorderFactory.createEmptyBorder(2, 24, 0, 15));
this.add(panel, BorderLayout.NORTH);

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

@ -37,7 +37,7 @@ public class TableLayout4VanChartHelper {
public static JPanel createExpandablePaneWithTitle(String title, Component[][] components) {
JPanel panel = createGapTableLayoutPane(components);
return createExpandablePaneWithTitle(title, panel);
return createExpandablePaneWithTitleTopGap(title, panel);
}
public static JPanel createExpandablePaneWithTitle(String title, JPanel panel) {

4
designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java

@ -52,10 +52,12 @@ public class DesignerStartup extends Activator {
@Override
public void run() {
try {
designer.show(args);
} finally {
DesignerContext.getDesignerFrame().getProgressDialog().dispose();
}
}
});
service.shutdown();
DesignerContext.getDesignerFrame().setVisible(true);

Loading…
Cancel
Save