• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java PackageView类代码示例

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

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



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

示例1: updatePackages

import org.netbeans.spi.java.project.support.ui.PackageView; //导入依赖的package包/类
private void updatePackages() {
    final Object item = rootComboBox.getSelectedItem();
    if (! (item instanceof SourceGroup)) {
        return;
    }
    WAIT_MODEL.setSelectedItem( packageComboBox.getEditor().getItem() );
    packageComboBox.setModel( WAIT_MODEL );
    
    if ( updatePackagesTask != null ) {
        updatePackagesTask.cancel();
    }
    
    updatePackagesTask = new RequestProcessor( "ComboUpdatePackages" ).post(new Runnable() {                               
        @Override
        public void run() {
            final ComboBoxModel model = PackageView.createListView((SourceGroup)item);
            SwingUtilities.invokeLater(new Runnable() {
                @Override
                public void run () {
                    model.setSelectedItem(packageComboBox.getEditor().getItem());
                    packageComboBox.setModel( model );
                }
            });
        }
    });                
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:27,代码来源:JavaTargetChooserPanelGUI.java


示例2: initialize

import org.netbeans.spi.java.project.support.ui.PackageView; //导入依赖的package包/类
public void initialize(Project project, FileObject targetFolder) {
    this.project = project;
    
    projectTextField.setText(ProjectUtils.getInformation(project).getDisplayName());
    
    SourceGroup[] sourceGroups = SourceGroups.getJavaSourceGroups(project);
    SourceGroupUISupport.connect(locationComboBox, sourceGroups);
    
    packageComboBox.setRenderer(PackageView.listRenderer());
    
    updatePackageComboBox();
    
    if (targetFolder != null) {
        // set default source group and package cf. targetFolder
        SourceGroup targetSourceGroup = SourceGroups.getFolderSourceGroup(sourceGroups, targetFolder);
        if (targetSourceGroup != null) {
            locationComboBox.setSelectedItem(targetSourceGroup);
            String targetPackage = SourceGroups.getPackageForFolder(targetSourceGroup, targetFolder);
            if (targetPackage != null) {
                packageComboBoxEditor.setText(targetPackage);
            }
        }
    }
    createDropScriptCheckbox.setVisible(false);//isn't supported yet
    uniqueName();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:27,代码来源:DBScriptPanel.java


示例3: updatePackageComboBox

import org.netbeans.spi.java.project.support.ui.PackageView; //导入依赖的package包/类
private void updatePackageComboBox() {
    SourceGroup sourceGroup = (SourceGroup) locationComboBox.getSelectedItem();
    if (sourceGroup != null) {
        ComboBoxModel model = PackageView.createListView(sourceGroup);
        if (model.getSelectedItem() != null && model.getSelectedItem().toString().startsWith("META-INF")
                && model.getSize() > 1) { // NOI18N
            model.setSelectedItem(model.getElementAt(1));
        }
        packageComboBox.setModel(model);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:12,代码来源:DBScriptPanel.java


示例4: node

import org.netbeans.spi.java.project.support.ui.PackageView; //导入依赖的package包/类
@Messages({"# {0} - label of source group", "# {1} - project name", "ERR_WrongSG={0} is owned by project {1}, cannot be used here, see issue #138310 for details."})
@Override
public Node node(SourceGroup group) {
    Project owner = FileOwnerQuery.getOwner(group.getRootFolder());
    if (owner != project) {
        if (owner == null) {
            //#152418 if project for folder is not found, just look the other way..
            Logger.getLogger(SourcesNodeFactory.class.getName()).log(Level.INFO, "Cannot find a project owner for folder {0}", group.getRootFolder()); //NOI18N
            return null;
        }
        AbstractNode erroNode = new AbstractNode(Children.LEAF);
        String prjText = ProjectUtils.getInformation(owner).getDisplayName();
        erroNode.setDisplayName(ERR_WrongSG(group.getDisplayName(), prjText));
        return erroNode;
    }
    return PackageView.createPackageView(group);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:18,代码来源:SourcesNodeFactory.java


示例5: findPath

import org.netbeans.spi.java.project.support.ui.PackageView; //导入依赖的package包/类
@Override
public Node findPath(Node root, Object target) {
    Project prj = root.getLookup().lookup(Project.class);
    if (prj == null) {
        return null;
    }

    if (target instanceof FileObject) {
        FileObject fo = (FileObject) target;
        if (isOtherProjectSource(fo, prj)) {
            return null; // Don't waste time if project does not own the fo among sources
        }

        for (Node n : root.getChildren().getNodes(true)) {
            Node result = PackageView.findPath(n, target);
            if (result != null) {
                return result;
            }
        }
    }

    return null;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:24,代码来源:LogicalViewProviders.java


示例6: MoveClassPanel

import org.netbeans.spi.java.project.support.ui.PackageView; //导入依赖的package包/类
public MoveClassPanel(final ChangeListener parent, String startPackage, String headLine, String bypassLine, FileObject f, String newName, boolean toType) {
    this.fo = f;
    this.parent = parent;
    this.newName = newName;
    this.bypassLine = bypassLine;
    initComponents();
    setCombosEnabled(true);
    
    labelHeadLine.setText(headLine);
    
    rootComboBox.setRenderer(GROUP_CELL_RENDERER);
    packageComboBox.setRenderer(PackageView.listRenderer());
    projectsComboBox.setRenderer(PROJECT_CELL_RENDERER);
    typeCombobox.setRenderer(CLASS_CELL_RENDERER);
    Project fileOwner = fo != null ? FileOwnerQuery.getOwner(fo) : null;
    project = fileOwner != null ? fileOwner : OpenProjects.getDefault().getOpenProjects()[0];
    this.startPackage = startPackage;
    
    if(newName != null) {
        labelHeadLine.setVisible(false);
    } else {
        labelNewName.setVisible(false);
        newNameField.setVisible(false);
    }
    this.toType = toType;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:27,代码来源:MoveClassPanel.java


示例7: IntroduceLocalExtensionPanel

import org.netbeans.spi.java.project.support.ui.PackageView; //导入依赖的package包/类
/**
 * Creates new form IntroduceLocalExtensionPanel
 */
public IntroduceLocalExtensionPanel(String typeName, Icon icon, String newName, String startPackage, TreePathHandle tph, ChangeListener parent) {
    this.startPackage = startPackage;
    this.typeName = typeName;
    this.icon = icon;
    this.newName = newName;
    this.tph = tph;
    this.parent = parent;
    
    initComponents();
    
    rootComboBox.setRenderer(GROUP_CELL_RENDERER);
    packageComboBox.setRenderer(PackageView.listRenderer());
    projectsComboBox.setRenderer(PROJECT_CELL_RENDERER);
    
    enableEqualityRadioButtons();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:20,代码来源:IntroduceLocalExtensionPanel.java


示例8: MoveMappingFilePanel

import org.netbeans.spi.java.project.support.ui.PackageView; //导入依赖的package包/类
public MoveMappingFilePanel(final ChangeListener parent, String startPackage, String headLine, FileObject f) {
    this.fo = f;
    this.parent = parent;
    initComponents();
    setCombosEnabled(true);
    labelHeadLine.setText(headLine);
    rootComboBox.setRenderer(GROUP_CELL_RENDERER);
    packageComboBox.setRenderer(PackageView.listRenderer());
    
    project = FileOwnerQuery.getOwner(f);
    projectTextField.setText(ProjectUtils.getInformation(project).getDisplayName());
            
    rootComboBox.addActionListener( this );
    packageComboBox.addActionListener( this );
    
    Object textField = packageComboBox.getEditor().getEditorComponent();
    if (textField instanceof JTextField) {
        ((JTextField) textField).getDocument().addDocumentListener(this); 
    }
    
    this.startPackage = startPackage;
    
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:24,代码来源:MoveMappingFilePanel.java


示例9: read

import org.netbeans.spi.java.project.support.ui.PackageView; //导入依赖的package包/类
void read(WizardDescriptor settings) {
    FileObject targetFolder = Templates.getTargetFolder(settings);
    projectTextField.setText(ProjectUtils.getInformation(project).getDisplayName());
    SourceGroup[] sourceGroups = SourceGroupSupport.getJavaSourceGroups(project);
    SourceGroupUISupport.connect(locationComboBox, sourceGroups);
    packageComboBox.setRenderer(PackageView.listRenderer());
    updateSourceGroupPackages();

    // set default source group and package cf. targetFolder
    if (targetFolder != null) {
        SourceGroup targetSourceGroup = getFolderSourceGroup(sourceGroups, targetFolder);
        if (targetSourceGroup != null) {
            locationComboBox.setSelectedItem(targetSourceGroup);
            String targetPackage = SourceGroupSupport.getPackageForFolder(targetSourceGroup, targetFolder);
            if (targetPackage != null) {
                packageComboBoxEditor.setText(targetPackage);
            }
        }
    }
}
 
开发者ID:jeddict,项目名称:jeddict,代码行数:21,代码来源:JPAModelSetupPanelVisual.java


示例10: MovePanel

import org.netbeans.spi.java.project.support.ui.PackageView; //导入依赖的package包/类
MovePanel( String name, Project project, FileObject pkg,
        ChangeListener listener, boolean copy, String panelName )
{
    setName(panelName);
    initComponents();

    myNewName.setVisible(copy);
    labelNewName.setVisible(copy);
    if (copy) {
        myNewName.setText(name);
    }

    myLocation.setRenderer(new GroupCellRenderer());
    myPackage.setRenderer(PackageView.listRenderer());
    myProject.setRenderer(new ProjectCellRenderer());

    myCurrentProject = project;
    myListener = listener;
    myTargetPackage = pkg;
}
 
开发者ID:vaadin,项目名称:netbeans-plugin,代码行数:21,代码来源:MovePanel.java


示例11: initComponents2

import org.netbeans.spi.java.project.support.ui.PackageView; //导入依赖的package包/类
private void initComponents2() {
    textFieldClassName.getDocument().addDocumentListener(this);
    comboBoxPackage.getEditor().addActionListener(this);
    Component packageEditor = comboBoxPackage.getEditor().getEditorComponent();
    if (packageEditor instanceof JTextField) {
        ((JTextField) packageEditor).getDocument().addDocumentListener(this);
    }

    comboBoxSourceRoot.setRenderer(new SourceGroupSupport.GroupListCellRenderer());
    comboBoxPackage.setRenderer(PackageView.listRenderer());
    comboBoxSourceRoot.addActionListener(this);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:JSEApplicationClassChooser.java


示例12: initComponents2

import org.netbeans.spi.java.project.support.ui.PackageView; //导入依赖的package包/类
private void initComponents2() {
    fxmlNameTextField.getDocument().addDocumentListener(this);
    
    packageComboBox.getEditor().addActionListener(this);
    Component packageEditor = packageComboBox.getEditor().getEditorComponent();
    if (packageEditor instanceof JTextField) {
        ((JTextField) packageEditor).getDocument().addDocumentListener(this);
    }

    locationComboBox.setRenderer(new SourceGroupSupport.GroupListCellRenderer());
    packageComboBox.setRenderer(PackageView.listRenderer());
    locationComboBox.addActionListener(this);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:ConfigureFXMLPanelVisual.java


示例13: getPackagesComboBoxModel

import org.netbeans.spi.java.project.support.ui.PackageView; //导入依赖的package包/类
public ComboBoxModel getPackagesComboBoxModel() {
    if(sourceGroup != null) {
        return PackageView.createListView(sourceGroup);
    }
    if(packageProxy != null) {
        return new DefaultComboBoxModel(packageProxy.toArray(new String[0]));
    }
    return null;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:SourceGroupSupport.java


示例14: initComponents2

import org.netbeans.spi.java.project.support.ui.PackageView; //导入依赖的package包/类
private void initComponents2() {
    createdNameTextField.getDocument().addDocumentListener(this);
    existingNameTextField.getDocument().addDocumentListener(this);
    createdPackageComboBox.getEditor().addActionListener(this);
    Component packageEditor = createdPackageComboBox.getEditor().getEditorComponent();
    if (packageEditor instanceof JTextField) {
        ((JTextField) packageEditor).getDocument().addDocumentListener(this);
    }

    createdLocationComboBox.setRenderer(new SourceGroupSupport.GroupListCellRenderer());
    createdPackageComboBox.setRenderer(PackageView.listRenderer());
    createdLocationComboBox.addActionListener(this);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:ConfigureFXMLControllerPanelVisual.java


示例15: updatePackageComboBox

import org.netbeans.spi.java.project.support.ui.PackageView; //导入依赖的package包/类
private void updatePackageComboBox() {
    SourceGroup sourceGroup = (SourceGroup)locationComboBox.getSelectedItem();
    if (sourceGroup != null) {
        ComboBoxModel model = PackageView.createListView(sourceGroup);
        if (model.getSelectedItem()!= null && model.getSelectedItem().toString().startsWith("META-INF")
                && model.getSize() > 1) { // NOI18N
            model.setSelectedItem(model.getElementAt(1));
        }
        packageComboBox.setModel(model);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:12,代码来源:EntityClassesPanel.java


示例16: read

import org.netbeans.spi.java.project.support.ui.PackageView; //导入依赖的package包/类
void read(WizardDescriptor settings) {
//        jsfFolder.setText((String) settings.getProperty(WizardProperties.JSF_FOLDER));
        
        project = Templates.getProject(settings);
        FileObject targetFolder = Templates.getTargetFolder(settings);
        
        projectTextField.setText(ProjectUtils.getInformation(project).getDisplayName());

         SourceGroup[] sourceGroups = SourceGroups.getJavaSourceGroups(project);      
         SourceGroupUISupport.connect(locationComboBox, sourceGroups);

        packageComboBox.setRenderer(PackageView.listRenderer());

        updateSourceGroupPackages();

        // set default source group and package cf. targetFolder
//        if (targetFolder != null) {
//            SourceGroup targetSourceGroup = SourceGroupSupport.getFolderSourceGroup(sourceGroups, targetFolder);
//            if (targetSourceGroup != null) {
//                locationComboBox.setSelectedItem(targetSourceGroup);
//                String targetPackage = SourceGroupSupport.getPackageForFolder(targetSourceGroup, targetFolder);
//                if (targetPackage != null) {
//                    packageComboBoxEditor.setText(targetPackage);
//                }
//            }
//            if (FileUtil.isParentOf(WebModule.getWebModule(
//                    targetFolder).getDocumentBase(), targetFolder)) {
//                Sources s = (Sources) Templates.getProject(wizard).getLookup().lookup(Sources.class);
//                SourceGroup[] groups = s.getSourceGroups(WebProjectConstants.TYPE_DOC_ROOT);
//                jsfFolder.setText("/"+JSFConfigUtilities.getResourcePath(groups,targetFolder,'/',true));
//            }
//        }
    }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:34,代码来源:JpaControllerSetupPanelVisual.java


示例17: updateSourceGroupPackages

import org.netbeans.spi.java.project.support.ui.PackageView; //导入依赖的package包/类
private void updateSourceGroupPackages() {
    SourceGroup sourceGroup = (SourceGroup)locationComboBox.getSelectedItem();
    ComboBoxModel model = PackageView.createListView(sourceGroup);
    if (model.getSelectedItem()!= null && model.getSelectedItem().toString().startsWith("META-INF")
            && model.getSize() > 1) { // NOI18N
        model.setSelectedItem(model.getElementAt(1));
    }
    packageComboBox.setModel(model);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:JpaControllerSetupPanelVisual.java


示例18: createLibraryPackageViewNode

import org.netbeans.spi.java.project.support.ui.PackageView; //导入依赖的package包/类
private Node createLibraryPackageViewNode(FileObject jfo) {
    Icon icon = getLibrariesIcon();
    FileObject root = FileUtil.getArchiveRoot(jfo);
    if (root == null) {
        return Node.EMPTY;
    }
    String name = String.format(getMessage("LBL_WrappedLibraryFmt"), FileUtil.toFile(jfo).getName());
    return ActionFilterNode.create(PackageView.createPackageView(new LibrariesSourceGroup(root, name, icon, icon)));
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:LibrariesNode.java


示例19: createNodeDelegate

import org.netbeans.spi.java.project.support.ui.PackageView; //导入依赖的package包/类
@CheckForNull
static Node createNodeDelegate(@NonNull final Artifact art, FileObject fo, final boolean longLiving) {
    if (!longLiving) {
        return null;
    }
    //artifact.getFile() should be eagerly normalized
    if (fo != null && FileUtil.isArchiveFile(fo)) {
        return PackageView.createPackageView(new ArtifactSourceGroup(art));
    }
    return null;        
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:12,代码来源:DependencyNode.java


示例20: createSourceFolderView

import org.netbeans.spi.java.project.support.ui.PackageView; //导入依赖的package包/类
public org.openide.nodes.Node createSourceFolderView(Project project, final FileObject folder, final String includes,
        final String excludes, String style, final String name, final String displayName) throws IllegalArgumentException {
    if (style.equals(STYLE_PACKAGES)) {
        return PackageView.createPackageView(new SourceGroupImpl(name, displayName, folder, includes, excludes));
    } else {
        throw new IllegalArgumentException();
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:JavaProjectNature.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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