本文整理汇总了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;
}
示例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;
}
示例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]);
}
示例4: getPropertySets
import org.openide.nodes.Sheet; //导入方法依赖的package包/类
public PropertySet[] getPropertySets() {
Sheet s = getSheet();
return s.toArray();
}