Browse Source

分组插件需要把action开出去

master
zack 9 years ago
parent
commit
e3a8cdd999
  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;
import com.fr.data.TableDataSource;
import com.fr.design.DesignModelAdapter;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.fun.TableDataPaneProcessor;
import com.fr.design.gui.controlpane.NameableCreator;
@ -29,7 +30,8 @@ public class ReportTableDataPane extends LoadingBasicPane {
TableDataPaneProcessor paneProcessor = ExtraDesignClassManager.getInstance().getTableDataPaneProcessor();
TableDataPaneController pane = null;
if (paneProcessor != null) {
pane = paneProcessor.createServerTableDataPane();
pane = paneProcessor.createServerTableDataPane(DesignModelAdapter.getCurrentModelAdapter()
);
}
tdPane = pane == null ? new TableDataPaneListPane() {
@Override

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

@ -1,6 +1,7 @@
package com.fr.design.data.tabledata.tabledatapane;
import com.fr.base.FRContext;
import com.fr.design.DesignModelAdapter;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.data.datapane.TableDataPaneController;
import com.fr.design.data.datapane.TableDataPaneListPane;
@ -42,7 +43,8 @@ public class TableDataManagerPane extends LoadingBasicPane {
TableDataPaneProcessor paneProcessor = ExtraDesignClassManager.getInstance().getTableDataPaneProcessor();
TableDataPaneController pane = null;
if (paneProcessor != null) {
pane = paneProcessor.createServerTableDataPane();
pane = paneProcessor.createServerTableDataPane(DesignModelAdapter.getCurrentModelAdapter()
);
}
tableDataPane = pane == null ? new TableDataPaneListPane() {
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.data.BasicTableDataTreePane;
import com.fr.design.data.datapane.TableDataPaneController;
import com.fr.design.menu.ShortCut;
import com.fr.stable.fun.Level;
/**
@ -27,4 +28,9 @@ public interface TableDataPaneProcessor extends Level {
*/
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.file.NewTemplatePane;
import com.fr.design.fun.MenuHandler;
import com.fr.design.fun.TableDataPaneProcessor;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.imenu.UIMenu;
@ -263,7 +264,7 @@ public abstract class ToolBarMenuDock {
if (!BaseUtils.isAuthorityEditing()) {
menuDef.addShortCut(
new ConnectionListAction(),
new GlobalTableDataAction()
createGlobalTDAction()
);
}
@ -288,6 +289,11 @@ public abstract class ToolBarMenuDock {
return menuDef;
}
private ShortCut createGlobalTDAction() {
TableDataPaneProcessor processor = ExtraDesignClassManager.getInstance().getTableDataPaneProcessor();
return processor == null ? new GlobalTableDataAction() : processor.createServerTDAction();
}
private boolean shouldShowPlugin() {
return FRContext.isChineseEnv() || ComparatorUtils.equals(GeneralContext.getLocale(), Locale.TAIWAN);
}

Loading…
Cancel
Save