请选择 进入手机版 | 继续访问电脑版
  • 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java LayerConfigPanel类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.netbeans.jcode.stack.config.panel.LayerConfigPanel的典型用法代码示例。如果您正苦于以下问题:Java LayerConfigPanel类的具体用法?Java LayerConfigPanel怎么用?Java LayerConfigPanel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



LayerConfigPanel类属于org.netbeans.jcode.stack.config.panel包,在下文中一共展示了LayerConfigPanel类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: addLayerTab

import org.netbeans.jcode.stack.config.panel.LayerConfigPanel; //导入依赖的package包/类
private void addLayerTab(TechContext techContext) {
    Technology tech = techContext.getTechnology();
    if (tech.panel() != LayerConfigPanel.class) {
        String title = tech.label();
        int index = tech.tabIndex() - 1;
        if (index < 0) {
            configPane.addTab(title, null, techContext.getPanel(), tech.description());
        } else {
            configPane.insertTab(title, null, techContext.getPanel(), tech.description(), index);
        }
        techContext.getSiblingTechContext()
                .stream()
                .filter(tc -> isCompleteApplication() ? true : tc.getTechnology().entityGenerator())
                .forEach(context -> this.addLayerTab(context));
    }
}
 
开发者ID:jeddict,项目名称:jeddict,代码行数:17,代码来源:GenerateCodeDialog.java


示例2: createPanel

import org.netbeans.jcode.stack.config.panel.LayerConfigPanel; //导入依赖的package包/类
public LayerConfigPanel createPanel(Project project, SourceGroup sourceGroup, String _package) {
    if (panel == null) {
        if (isValid()) {
            try {
                panel = getTechnology().panel().newInstance();
            } catch (InstantiationException | IllegalAccessException ex) {
                Exceptions.printStackTrace(ex);
            }
        } else {
            panel = new DefaultConfigPanel();
        }
        
        Class<LayerConfigData> configDataClass = panel.getConfigDataClass();
        panel.setConfigData(PreferenceUtils.get(project, configDataClass));
        
        Map<Class<? extends LayerConfigPanel>, LayerConfigPanel> siblingData = new HashMap<>();
        Map<Class<? extends LayerConfigPanel>, LayerConfigPanel> cacheSiblingData = new HashMap<>();
        for(TechContext siblingContext : getSiblingTechContext()){
           LayerConfigPanel siblingPanel = siblingContext.createPanel(project, sourceGroup, _package);
           siblingData.put(siblingPanel.getClass(), siblingPanel);
        }
        
        cacheSiblingData.putAll(siblingData);
        cacheSiblingData.put(panel.getClass(), panel);
        Iterator<Entry<Class<? extends LayerConfigPanel>, LayerConfigPanel>> iterator = siblingData.entrySet().iterator();
        while(iterator.hasNext()){
            Entry<Class<? extends LayerConfigPanel>, LayerConfigPanel> entry = iterator.next();
            LayerConfigPanel instance = entry.getValue();
            List<Field> fields = Arrays.asList(instance.getClass().getDeclaredFields());
            for (Field field : fields) {
                if (field.isAnnotationPresent(ConfigData.class)) {
                    field.setAccessible(true);
                    try {
                        if (LayerConfigPanel.class.isAssignableFrom(field.getType())) {
                            field.set(instance, cacheSiblingData.get(field.getType()));
                        }
                    } catch (IllegalArgumentException | IllegalAccessException e) {
                        e.printStackTrace();
                    }
                }
            }
            instance.init(_package, project, sourceGroup);
            instance.read();
        }
           
        if (parentTechContext == null) { //if sibling context then first inject field and then init
            panel.init(_package, project, sourceGroup);
            panel.read();
        }
    }
    return panel;
}
 
开发者ID:jeddict,项目名称:jCode,代码行数:53,代码来源:TechContext.java


示例3: getPanel

import org.netbeans.jcode.stack.config.panel.LayerConfigPanel; //导入依赖的package包/类
public LayerConfigPanel getPanel() {
    return panel;
}
 
开发者ID:jeddict,项目名称:jCode,代码行数:4,代码来源:TechContext.java


示例4: isValid

import org.netbeans.jcode.stack.config.panel.LayerConfigPanel; //导入依赖的package包/类
public boolean isValid() {
    return getTechnology().panel() != null && getTechnology().panel() != LayerConfigPanel.class;
}
 
开发者ID:jeddict,项目名称:jCode,代码行数:4,代码来源:TechContext.java


示例5: setTechPanel

import org.netbeans.jcode.stack.config.panel.LayerConfigPanel; //导入依赖的package包/类
private void setTechPanel(TechContext techContext) {
    if ((isMicroservice() || isGateway())
            && techContext.getTechnology().type() == VIEWER
            && techContext.getTechnology().microservice()) {
        techContext.createPanel(gatewayProjectInfo.getProject(), gatewayProjectInfo.getSourceGroup(), getGatewayPackage());
    } else {
        techContext.createPanel(targetProjectInfo.getProject(), targetProjectInfo.getSourceGroup(), getTargetPackage());
    }
    configPane.removeAll();
    configPane.setVisible(false);
    boolean nonePanel = techContext.getTechnology().panel() == LayerConfigPanel.class;
    switch (techContext.getTechnology().type()) {
        case BUSINESS:
            getConfigData().setBussinesTechContext(techContext);
            addLayerTab(getConfigData().getBussinesTechContext());
            getConfigData().setControllerTechContext(null);
            getConfigData().setViewerTechContext(null);
            if (nonePanel) {
                getConfigData().setBussinesTechContext(null);
            }
            break;
        case CONTROLLER:
            getConfigData().setControllerTechContext(techContext);
            addLayerTab(getConfigData().getBussinesTechContext());
            addLayerTab(getConfigData().getControllerTechContext());
            getConfigData().setViewerTechContext(null);
            if (nonePanel) {
                getConfigData().setControllerTechContext(null);
            }
            break;
        case VIEWER:
            getConfigData().setViewerTechContext(techContext);
            addLayerTab(getConfigData().getBussinesTechContext());
            addLayerTab(getConfigData().getControllerTechContext());
            addLayerTab(getConfigData().getViewerTechContext());
            if (nonePanel) {
                getConfigData().setViewerTechContext(null);
            }
            break;
        default:
            break;
    }

    if (configPane.getComponentCount() >= 1) {
        if (!nonePanel) {
            configPane.setSelectedComponent(techContext.getPanel());
        }
        configPane.setVisible(true);
    }
    this.pack();
    setVisible(true);
}
 
开发者ID:jeddict,项目名称:jeddict,代码行数:53,代码来源:GenerateCodeDialog.java


示例6: businessLayerComboItemStateChanged

import org.netbeans.jcode.stack.config.panel.LayerConfigPanel; //导入依赖的package包/类
private void businessLayerComboItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_businessLayerComboItemStateChanged
    if (evt.getStateChange() == ItemEvent.SELECTED) {
        setCompleteApplicationCompVisibility(getBusinessLayer().getTechnology().panel() != LayerConfigPanel.class);
        changeBusinessLayer(getBusinessLayer());
    }
}
 
开发者ID:jeddict,项目名称:jeddict,代码行数:7,代码来源:GenerateCodeDialog.java



注:本文中的org.netbeans.jcode.stack.config.panel.LayerConfigPanel类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java AnnotationElement类代码示例发布时间:2022-05-16
下一篇:
Java CreateHITRequest类代码示例发布时间:2022-05-16
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap