當前位置: 首頁>>代碼示例>>Java>>正文


Java LayerConfigPanel類代碼示例

本文整理匯總了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;未經允許,請勿轉載。