一年精通帆软报表之设计器的中间部分的源码分析

楼主
插件开发者

 CenterRegionContainerPane管理的区域就是上图的区域。

1 他的构造函数

        

    public CenterRegionContainerPane() {
        this.toolbarPane.setLayout(FRGUIPaneFactory.createBorderLayout());
        this.eastPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
        this.eastPane.add(this.largeToolbar = this.getToolBarMenuDock().createLargeToolbar(), "West");
        this.eastCenterPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
        this.combineUpTooBar();
        this.eastCenterPane.add(this.combineUp, "North");
        this.templateTabPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
        this.templateTabPane.add(this.newWorkBookPane = this.getToolBarMenuDock().getNewTemplatePane(), "West");
        this.templateTabPane.add(MutilTempalteTabPane.getInstance(), "Center");
        this.eastCenterPane.add(this.templateTabPane, "Center");
        this.eastPane.add(this.eastCenterPane, "Center");
        this.toolbarPane.add(this.eastPane, "North");
        this.toolbarPane.add(new UIMenuHighLight(), "South");
        this.setLayout(new BorderLayout());
        this.add(this.centerTemplateCardPane = new DesktopCardPane(), "Center");
        this.add(this.toolbarPane, "North");
    }

        1.1 可以看出它使用BorderLayout布局,

 North放的是toolbarPane,Center放的是DesktopCardPane。

        1.2 toolbarPane也是BorderLayout布局,它的North放的是eastPane,South放的是UIMenuHighLight。

        1.3 eastPane也是BorderLayout布局,它的West放的是largeToolbar,Center放的是eastCenterPane,largeToolbar应该就是

 

        1.4 eastCenterPane也是BorderLayout布局,它的North放的是combineUp,Center放的是

templateTabPane,combineUp应该就是combineUp的创建过程中有一个插件扩展Set providers = ExtraDesignClassManager.getInstance().getArray("DesignerFrameUpButtonProvider");combineUp就是

 

 

templateTabPane也是BorderLayout布局,它的West放的是newWorkBookPane,他应该是Center放的是MutilTempalteTabPane,MutilTempalteTabPane就是

这个部分。

       

com.fr.design.mainframe.DesktopCardPane就是中间表格的部分。重点介绍下

        

 private JTemplate<?, ?> component;
    private TransparentPane transparentPane = new TransparentPane();
    private OpenLoadingPane loadingPane = new OpenLoadingPane();
    private OpenFailedPane failedPane = new OpenFailedPane();
    private JLayeredPane layeredPane = new JLayeredPane() 

        2.1 component就是具体展现每张报表内容的组件,transparentPane,loadingPane,failedPane都是辅助层。

        2.2 JTemplate代表某张报表

protected void showJTemplate(JTemplate<?, ?> jt) {
        if (((BaseBook)jt.getTarget()).getAttrMark("DesignCopyBanAttrMark") != null) {
            DesignModeContext.switchTo(DesignerMode.BAN_COPY_AND_CUT);
        } else if (!DesignModeContext.isVcsMode() && !DesignModeContext.isAuthorityEditing() && !DesignModeContext.isDuchampMode()) {
            DesignModeContext.switchTo(DesignerMode.NORMAL);
        }

        if (this.component != null) {
            this.component.fireTabChange();
        }

        DesignerFrameFileDealerPane.getInstance().setCurrentEditingTemplate(jt);
        this.refresh(jt);
    }

        显示某张报表内容。

分享扩散:

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

0回帖数 1关注人数 2433浏览人数
最后回复于:2021-9-12 19:05

返回顶部 返回列表