Browse Source

Merge pull request #102 in BA/design from ~ZACK/design:dev to dev

* commit 'e3a8cdd999aa1cf05db368c9c02deea0db3f23d8':
  分组插件需要把action开出去
master
superman 9 years ago
parent
commit
0af39c19f7
  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. 6
      designer_base/src/com/fr/design/fun/TableDataPaneProcessor.java
  4. 8
      designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.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) {

6
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;
/** /**
@ -27,4 +28,9 @@ public interface TableDataPaneProcessor extends Level {
*/ */
TableDataPaneController createServerTableDataPane(DesignModelAdapter<?, ?> tc); 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);
} }

Loading…
Cancel
Save