本文整理汇总了Java中org.openide.nodes.Node.Property.setDisplayName方法的典型用法代码示例。如果您正苦于以下问题:Java Property.setDisplayName方法的具体用法?Java Property.setDisplayName怎么用?Java Property.setDisplayName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.openide.nodes.Node.Property
的用法示例。
在下文中一共展示了Property.setDisplayName方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createProperty
import org.openide.nodes.Node.Property; //导入方法依赖的package包/类
/**
* Creates a node property of the given key (same as the column keys)
* and specific getter/setter methods on the given object.
*
* @param key property name (same as matching column).
* @param type Class of the property (e.g. String.class).
* @param inst object on which to reflect.
* @param getter name of getter method for property value.
* @param setter name of setter method for property value (may be null).
* @return new property.
*/
private Node.Property createProperty(String key, Class type, Object inst,
String getter, String setter) {
Property prop = null;
try {
prop = new Reflection(inst, type, getter, setter);
prop.setName(key);
prop.setDisplayName(NbBundle.getMessage(
ExternalReferenceDataNode.class,
"CTL_SchemaPanel_Column_Name_" + key));
prop.setShortDescription(NbBundle.getMessage(
ExternalReferenceDataNode.class,
"CTL_SchemaPanel_Column_Desc_" + key));
} catch (NoSuchMethodException nsme) {
ErrorManager.getDefault().notify(nsme);
}
return prop;
}
示例2: createSheet
import org.openide.nodes.Node.Property; //导入方法依赖的package包/类
@Override
protected Sheet createSheet() {
Sheet sheet = Sheet.createDefault();
Sheet.Set set = Sheet.createPropertiesSet();
sheet.put(set);
try {
Property nameProp = new PropertySupport.Reflection<String>(getDataNode(), String.class, "getActionName", "setActionName");
nameProp.setName(TriggeredAction.taName);
nameProp.setDisplayName("Name of the action");
set.put(nameProp);
} catch (NoSuchMethodException ex) {
Exceptions.printStackTrace(ex);
}
return sheet;
}
示例3: createSheet
import org.openide.nodes.Node.Property; //导入方法依赖的package包/类
@Override
protected Sheet createSheet() {
Sheet sheet = Sheet.createDefault();
Sheet.Set set = Sheet.createPropertiesSet();
sheet.put(set);
try {
Property collectionNameProp = new PropertySupport.Reflection<String>(getDataNode(), String.class, "getDriveCollectionName", "setDriveCollectionName");
collectionNameProp.setName(DriveCollection.dcName);
collectionNameProp.setDisplayName("Name of drive collection");
set.put(collectionNameProp);
} catch (NoSuchMethodException ex) {
Exceptions.printStackTrace(ex);
}
return sheet;
}
示例4: createSheet
import org.openide.nodes.Node.Property; //导入方法依赖的package包/类
@Override
protected Sheet createSheet() {
Sheet sheet = Sheet.createDefault();
Sheet.Set set = Sheet.createPropertiesSet();
sheet.put(set);
try {
Property nameProp = new PropertySupport.Reflection<String>(compNode, String.class, "getNodeName", "setNodeName");
nameProp.setName(Competence.cnName);
nameProp.setDisplayName("Name of competence node");
set.put(new Property[]{nameProp});
} catch (NoSuchMethodException ex) {
Exceptions.printStackTrace(ex);
}
return sheet;
}
示例5: createSheet
import org.openide.nodes.Node.Property; //导入方法依赖的package包/类
@Override
protected Sheet createSheet() {
Sheet sheet = Sheet.createDefault();
Sheet.Set set = Sheet.createPropertiesSet();
sheet.put(set);
try {
Property nameProp = new PropertySupport.Reflection<String>(getDataNode(), String.class, "getName", "setName");
nameProp.setName(CompetenceElement.caName);
nameProp.setDisplayName("Name of competence atom");
Property retriesProp = new PropertySupport.Reflection<Integer>(getDataNode(), Integer.class, "getRetries", "setRetries");
retriesProp.setName(CompetenceElement.caRetries);
retriesProp.setDisplayName("Number of retries");
Property commentProp = new PropertySupport.Reflection<String>(getDataNode(), String.class, "getComment", "setComment");
commentProp.setName(CompetenceElement.caComment);
commentProp.setDisplayName("Comment");
set.put(new Property[]{nameProp, retriesProp, commentProp});
} catch (NoSuchMethodException ex) {
Exceptions.printStackTrace(ex);
}
return sheet;
}
示例6: createSheet
import org.openide.nodes.Node.Property; //导入方法依赖的package包/类
@Override
protected Sheet createSheet() {
Sheet sheet = Sheet.createDefault();
Sheet.Set set = Sheet.createPropertiesSet();
sheet.put(set);
try {
Property nameProp = new PropertySupport.Reflection<String>(apNode, String.class, "getNodeName", "setNodeName");
nameProp.setName(ActionPattern.apName);
nameProp.setDisplayName("Name of action pattern");
Property commentProp = new PropertySupport.Reflection<String>(apNode, String.class, "getNodeComment", "setNodeComment");
commentProp.setName(ActionPattern.apComment);
commentProp.setDisplayName("Comment about node");
commentProp.setShortDescription("It is difficult to keep track about what part of POSH plan does what and that is where comments come in.");
set.put(new Property[]{nameProp, commentProp});
} catch (NoSuchMethodException ex) {
Exceptions.printStackTrace(ex);
}
return sheet;
}