当前位置: 首页>>代码示例>>Java>>正文


Java Sheet.toArray方法代码示例

本文整理汇总了Java中org.openide.nodes.Sheet.toArray方法的典型用法代码示例。如果您正苦于以下问题:Java Sheet.toArray方法的具体用法?Java Sheet.toArray怎么用?Java Sheet.toArray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.openide.nodes.Sheet的用法示例。


在下文中一共展示了Sheet.toArray方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getPropertySets

import org.openide.nodes.Sheet; //导入方法依赖的package包/类
public Node.PropertySet[] getPropertySets() {
    if (sets == null) {
        System.err.println("Create sheet");
        Sheet sheet = new Sheet();
        // Make sure there is a "Properties" set:
        Sheet.Set props = sheet.get(Sheet.PROPERTIES);
        props = Sheet.createPropertiesSet();
        sheet.put(props);
        TProperty tp = new TProperty("property", true);
        props.put(tp);
        if (firstTime) {
            props.put(new TProperty("second", true));
            System.err.println("first time");
            firstTime = false;
        } else {
            System.err.println("Second  time");
        }
        sets = sheet.toArray();
    }
    return sets;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:22,代码来源:PropertiesFlushTest.java

示例2: createSheet

import org.openide.nodes.Sheet; //导入方法依赖的package包/类
/** Create the property sheet.
 * @return the sheet
 */
@Override
protected final Sheet createSheet () {
    Sheet sheet = super.createSheet();
    
    //if there is any rename handler installed
    //push under our own property
    if (getRenameHandler() != null)
        sheet.get(Sheet.PROPERTIES).put(createNameProperty());
    
    // Add classpath-related properties.
    Sheet.Set ps = new Sheet.Set();
    ps.setName("classpaths"); // NOI18N
    ps.setDisplayName(getMessage(JavaNode.class, "LBL_JavaNode_sheet_classpaths"));
    ps.setShortDescription(getMessage(JavaNode.class, "HINT_JavaNode_sheet_classpaths"));
    ps.put(new Node.Property[] {
        new ClasspathProperty(ClassPath.COMPILE,
                getMessage(JavaNode.class, "PROP_JavaNode_compile_classpath"),
                getMessage(JavaNode.class, "HINT_JavaNode_compile_classpath")),
                new ClasspathProperty(ClassPath.EXECUTE,
                getMessage(JavaNode.class, "PROP_JavaNode_execute_classpath"),
                getMessage(JavaNode.class, "HINT_JavaNode_execute_classpath")),
                new ClasspathProperty(ClassPath.BOOT,
                getMessage(JavaNode.class, "PROP_JavaNode_boot_classpath"),
                getMessage(JavaNode.class, "HINT_JavaNode_boot_classpath")),
    });
    sheet.put(ps);
    
    @SuppressWarnings("LocalVariableHidesMemberVariable")
    PropertySet[] propertySets = sheet.toArray();
    
    synchronized (this) {
        this.propertySets = propertySets;
    }
    
    return sheet;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:40,代码来源:JavaNode.java

示例3: testSheetToArrayReturnsModifiableArray

import org.openide.nodes.Sheet; //导入方法依赖的package包/类
public void testSheetToArrayReturnsModifiableArray() {
    Sheet s = new Sheet();
    s.put(new Sheet.Set());
    PropertySet[] properties = s.toArray();
    properties[0] = null;
    assertNull(s.toArray()[0]);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:JavaNodeTest.java

示例4: getPropertySets

import org.openide.nodes.Sheet; //导入方法依赖的package包/类
public PropertySet[] getPropertySets() {
    Sheet s = getSheet();
    return s.toArray();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:ExternalReferenceDataNode.java


注:本文中的org.openide.nodes.Sheet.toArray方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。