Browse Source

Merge remote-tracking branch 'origin/dev' into dev

master
richie 9 years ago
parent
commit
89c1f6e520
  1. 4
      designer_base/src/com/fr/design/data/datapane/ReportTableDataPane.java
  2. 4
      designer_base/src/com/fr/design/data/tabledata/tabledatapane/TableDataManagerPane.java
  3. 10
      designer_base/src/com/fr/design/extra/PluginWebBridge.java
  4. 35
      designer_base/src/com/fr/design/extra/exe/GetPluginCategoriesExecutor.java
  5. 8
      designer_base/src/com/fr/design/fun/TableDataPaneProcessor.java
  6. 8
      designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
  7. 6
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldNamePane.java
  8. 6
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldValuePane.java

4
designer_base/src/com/fr/design/data/datapane/ReportTableDataPane.java

@ -4,6 +4,7 @@
package com.fr.design.data.datapane; package com.fr.design.data.datapane;
import com.fr.data.TableDataSource; import com.fr.data.TableDataSource;
import com.fr.design.DesignModelAdapter;
import com.fr.design.ExtraDesignClassManager; import com.fr.design.ExtraDesignClassManager;
import com.fr.design.fun.TableDataPaneProcessor; import com.fr.design.fun.TableDataPaneProcessor;
import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.controlpane.NameableCreator;
@ -29,7 +30,8 @@ public class ReportTableDataPane extends LoadingBasicPane {
TableDataPaneProcessor paneProcessor = ExtraDesignClassManager.getInstance().getTableDataPaneProcessor(); TableDataPaneProcessor paneProcessor = ExtraDesignClassManager.getInstance().getTableDataPaneProcessor();
TableDataPaneController pane = null; TableDataPaneController pane = null;
if (paneProcessor != null) { if (paneProcessor != null) {
pane = paneProcessor.createServerTableDataPane(); pane = paneProcessor.createServerTableDataPane(DesignModelAdapter.getCurrentModelAdapter()
);
} }
tdPane = pane == null ? new TableDataPaneListPane() { tdPane = pane == null ? new TableDataPaneListPane() {
@Override @Override

4
designer_base/src/com/fr/design/data/tabledata/tabledatapane/TableDataManagerPane.java

@ -1,6 +1,7 @@
package com.fr.design.data.tabledata.tabledatapane; package com.fr.design.data.tabledata.tabledatapane;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.design.DesignModelAdapter;
import com.fr.design.ExtraDesignClassManager; import com.fr.design.ExtraDesignClassManager;
import com.fr.design.data.datapane.TableDataPaneController; import com.fr.design.data.datapane.TableDataPaneController;
import com.fr.design.data.datapane.TableDataPaneListPane; import com.fr.design.data.datapane.TableDataPaneListPane;
@ -42,7 +43,8 @@ public class TableDataManagerPane extends LoadingBasicPane {
TableDataPaneProcessor paneProcessor = ExtraDesignClassManager.getInstance().getTableDataPaneProcessor(); TableDataPaneProcessor paneProcessor = ExtraDesignClassManager.getInstance().getTableDataPaneProcessor();
TableDataPaneController pane = null; TableDataPaneController pane = null;
if (paneProcessor != null) { if (paneProcessor != null) {
pane = paneProcessor.createServerTableDataPane(); pane = paneProcessor.createServerTableDataPane(DesignModelAdapter.getCurrentModelAdapter()
);
} }
tableDataPane = pane == null ? new TableDataPaneListPane() { tableDataPane = pane == null ? new TableDataPaneListPane() {
public void rename(String oldName, String newName) { public void rename(String oldName, String newName) {

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

@ -243,6 +243,16 @@ public class PluginWebBridge {
new Thread(task).start(); new Thread(task).start();
} }
/**
* 在线获取插件分类
*
* @param callback 回调函数
*/
public void getPluginCategories(final JSObject callback) {
Task<Void> task = new PluginTask<>(webEngine, callback, new GetPluginCategoriesExecutor());
new Thread(task).start();
}
/** /**
* 展示一个重启的对话框(少用,莫名其妙会有bug) * 展示一个重启的对话框(少用,莫名其妙会有bug)
* *

35
designer_base/src/com/fr/design/extra/exe/GetPluginCategoriesExecutor.java

@ -0,0 +1,35 @@
package com.fr.design.extra.exe;
import com.fr.design.extra.Process;
import com.fr.general.SiteCenter;
import com.fr.general.http.HttpClient;
/**
* Created by vito on 16/5/16.
*/
public class GetPluginCategoriesExecutor implements Executor {
private String result = "[]";
@Override
public String getTaskFinishMessage() {
return result;
}
@Override
public Command[] getCommands() {
return new Command[]{
new Command() {
@Override
public String getExecuteMessage() {
return null;
}
@Override
public void run(Process<String> process) {
HttpClient httpClient = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("plugin.category"));
result = httpClient.getResponseText();
}
}
};
}
}

8
designer_base/src/com/fr/design/fun/TableDataPaneProcessor.java

@ -3,6 +3,7 @@ package com.fr.design.fun;
import com.fr.design.DesignModelAdapter; import com.fr.design.DesignModelAdapter;
import com.fr.design.data.BasicTableDataTreePane; import com.fr.design.data.BasicTableDataTreePane;
import com.fr.design.data.datapane.TableDataPaneController; import com.fr.design.data.datapane.TableDataPaneController;
import com.fr.design.menu.ShortCut;
import com.fr.stable.fun.Level; import com.fr.stable.fun.Level;
/** /**
@ -25,6 +26,11 @@ public interface TableDataPaneProcessor extends Level {
* 服务器数据集面板(模板数据集面板) * 服务器数据集面板(模板数据集面板)
* @return 服务器数据集面板 * @return 服务器数据集面板
*/ */
TableDataPaneController createServerTableDataPane(); TableDataPaneController createServerTableDataPane(DesignModelAdapter<?, ?> tc);
/**
* 自定义服务器数据集菜单项
* @return
*/
ShortCut createServerTDAction();
} }

8
designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java

@ -28,6 +28,7 @@ import com.fr.design.actions.server.PlatformManagerAction;
import com.fr.design.actions.server.PluginManagerAction; import com.fr.design.actions.server.PluginManagerAction;
import com.fr.design.file.NewTemplatePane; import com.fr.design.file.NewTemplatePane;
import com.fr.design.fun.MenuHandler; import com.fr.design.fun.MenuHandler;
import com.fr.design.fun.TableDataPaneProcessor;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.imenu.UIMenu; import com.fr.design.gui.imenu.UIMenu;
@ -263,7 +264,7 @@ public abstract class ToolBarMenuDock {
if (!BaseUtils.isAuthorityEditing()) { if (!BaseUtils.isAuthorityEditing()) {
menuDef.addShortCut( menuDef.addShortCut(
new ConnectionListAction(), new ConnectionListAction(),
new GlobalTableDataAction() createGlobalTDAction()
); );
} }
@ -288,6 +289,11 @@ public abstract class ToolBarMenuDock {
return menuDef; return menuDef;
} }
private ShortCut createGlobalTDAction() {
TableDataPaneProcessor processor = ExtraDesignClassManager.getInstance().getTableDataPaneProcessor();
return processor == null ? new GlobalTableDataAction() : processor.createServerTDAction();
}
private boolean shouldShowPlugin() { private boolean shouldShowPlugin() {
return FRContext.isChineseEnv() || ComparatorUtils.equals(GeneralContext.getLocale(), Locale.TAIWAN); return FRContext.isChineseEnv() || ComparatorUtils.equals(GeneralContext.getLocale(), Locale.TAIWAN);
} }

6
designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldNamePane.java

@ -224,6 +224,10 @@ public class SeriesNameUseFieldNamePane extends FurtherBasicBeanPane<ChartCollec
return CalculateComboBox.CALCULATE_ARRAY[0]; return CalculateComboBox.CALCULATE_ARRAY[0];
} }
protected MoreNameCDDefinition createMoreNameCDDefinition() {
return new MoreNameCDDefinition();
}
/** /**
* 保存界面属性到ChartCollection * 保存界面属性到ChartCollection
*/ */
@ -233,7 +237,7 @@ public class SeriesNameUseFieldNamePane extends FurtherBasicBeanPane<ChartCollec
if (normalDefinition instanceof MoreNameCDDefinition) { if (normalDefinition instanceof MoreNameCDDefinition) {
moreDefinition = (MoreNameCDDefinition) normalDefinition; moreDefinition = (MoreNameCDDefinition) normalDefinition;
} else { } else {
moreDefinition = new MoreNameCDDefinition(); moreDefinition = createMoreNameCDDefinition();
} }
List<Object[]> data = seriesDataPane.updateBean(); List<Object[]> data = seriesDataPane.updateBean();

6
designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldValuePane.java

@ -278,7 +278,7 @@ public class SeriesNameUseFieldValuePane extends FurtherBasicBeanPane<ChartColle
* 保存界面内容 字段值 * 保存界面内容 字段值
*/ */
public void updateBean(ChartCollection collection) { public void updateBean(ChartCollection collection) {
OneValueCDDefinition oneDefinition = new OneValueCDDefinition(); OneValueCDDefinition oneDefinition = createOneValueCDDefinition();
String seriesName = (String) this.seriesName.getSelectedItem(); String seriesName = (String) this.seriesName.getSelectedItem();
oneDefinition.setSeriesColumnName(seriesName); oneDefinition.setSeriesColumnName(seriesName);
@ -292,6 +292,10 @@ public class SeriesNameUseFieldValuePane extends FurtherBasicBeanPane<ChartColle
collection.getSelectedChart().setFilterDefinition(oneDefinition); collection.getSelectedChart().setFilterDefinition(oneDefinition);
} }
protected OneValueCDDefinition createOneValueCDDefinition(){
return new OneValueCDDefinition();
}
/** /**
* 保存界面属性 新的ChartCollection * 保存界面属性 新的ChartCollection
*/ */

Loading…
Cancel
Save