本文整理汇总了Java中org.openide.nodes.Sheet.createDefault方法的典型用法代码示例。如果您正苦于以下问题:Java Sheet.createDefault方法的具体用法?Java Sheet.createDefault怎么用?Java Sheet.createDefault使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.openide.nodes.Sheet
的用法示例。
在下文中一共展示了Sheet.createDefault方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getPropertySets
import org.openide.nodes.Sheet; //导入方法依赖的package包/类
@Override
public PropertySet[] getPropertySets() {
if (sheet != null) {
return sheet.toArray();
}
try {
sheet = Sheet.createDefault();
Set ss = sheet.get(Sheet.PROPERTIES);
final Reflection<String> cnb = new PropertySupport.Reflection<String>(this, String.class, "getCodeName", null); // NOI18N
cnb.setDisplayName(NbBundle.getMessage(ClusterizeInfo.class, "MSG_ClusterizeCodeNameBase"));
cnb.setName("cnb"); // NOI18N
ss.put(cnb); // NOI18N
final Reflection<ClusterizeAction> act = new PropertySupport.Reflection<ClusterizeAction>(this, ClusterizeAction.class, "action"); // NOI18N
act.setDisplayName(NbBundle.getMessage(ClusterizeInfo.class, "MSG_ClusterizeActivateAs"));
act.setName("action"); // NOI18N
ss.put(act); // NOI18N
final Reflection<Integer> count = new PropertySupport.Reflection<Integer>(this, Integer.class, "getSelectedFilesCount", null); // NOI18N
count.setDisplayName(NbBundle.getMessage(ClusterizeInfo.class, "MSG_ClusterizeNumberOfModules"));
count.setName("selectedFilesCount"); // NOI18N
ss.put(act); // NOI18N
return sheet.toArray();
} catch (NoSuchMethodException ex) {
throw new IllegalStateException(ex);
}
}
示例2: createSheet
import org.openide.nodes.Sheet; //导入方法依赖的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;
}
示例3: createSheet
import org.openide.nodes.Sheet; //导入方法依赖的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;
}
示例4: createSheet
import org.openide.nodes.Sheet; //导入方法依赖的package包/类
protected Sheet createSheet() {
Sheet sheet = Sheet.createDefault();
Set set = sheet.get(Sheet.PROPERTIES);
set.put(createProperty(PROP_NAME, String.class, this,
"getHtmlDisplayName", null));
if (canSelect()) {
set.put(createProperty(PROP_SELECTED, Boolean.TYPE, this,
"isSelected", "setSelected"));
// Node.Property prop = createProperty(PROP_PREFIX, String.class,
// this, "getPrefix", "setPrefix");
// Suppress the [...] button because it is not needed.
// prop.setValue("suppressCustomEditor", Boolean.TRUE);
// set.put(prop);
} /*else {
// Do not include this property so the checkbox is not shown.
//set.put(createProperty(PROP_SELECTED, Boolean.TYPE, this,
// "isSelected", null));
Node.Property prop = createProperty(PROP_PREFIX, String.class,
this, "getPrefix", null);
// Suppress the [...] button because it is not needed.
prop.setValue("suppressCustomEditor", Boolean.TRUE);
set.put(prop);
}*/
return sheet;
}
示例5: createSheet
import org.openide.nodes.Sheet; //导入方法依赖的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;
}
示例6: createSheet
import org.openide.nodes.Sheet; //导入方法依赖的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;
}
示例7: Enabled
import org.openide.nodes.Sheet; //导入方法依赖的package包/类
Enabled(Children ch, boolean enabled) {
super(ch);
setState(enabled ? EnabledState.FULL_ENABLED : EnabledState.DISABLED, false);
Sheet s = Sheet.createDefault();
Sheet.Set ss = s.get(Sheet.PROPERTIES);
ss.put(new EnabledProp(this));
ss.put(new OriginProp(this));
setSheet(s);
setIconBaseWithExtension(
isLeaf() ? NbModuleProject.NB_PROJECT_ICON_PATH : SuiteProject.SUITE_ICON_PATH);
}
示例8: initProperties
import org.openide.nodes.Sheet; //导入方法依赖的package包/类
private void initProperties() {
Sheet sheet = Sheet.createDefault();
Sheet.Set ps = Sheet.createPropertiesSet();
ps.put(nameProperty);
ps.put(pathProperty);
ps.put(new GitStatusProperty(this));
sheet.put(ps);
setSheet(sheet);
}
示例9: initProperties
import org.openide.nodes.Sheet; //导入方法依赖的package包/类
private void initProperties() {
Sheet sheet = Sheet.createDefault();
Sheet.Set ps = Sheet.createPropertiesSet();
ps.put(new NameProperty());
ps.put(new LocationProperty());
ps.put(new StatusProperty());
if (setup.getPropertyName() != null) {
ps.put(new PropertyNameProperty());
}
sheet.put(ps);
setSheet(sheet);
}
示例10: setProperties
import org.openide.nodes.Sheet; //导入方法依赖的package包/类
private void setProperties () {
Sheet sheet = Sheet.createDefault();
Sheet.Set ps = Sheet.createPropertiesSet();
ps.put(new LocalPathProperty());
sheet.put(ps);
setSheet(sheet);
}
示例11: initProperties
import org.openide.nodes.Sheet; //导入方法依赖的package包/类
private void initProperties() {
Sheet sheet = Sheet.createDefault();
Sheet.Set ps = Sheet.createPropertiesSet();
ps.put(new RevisionProperty()); // XXX show only if VCS available
ps.put(new UserProperty());
ps.put(entry.canEdit() ? new EditableMessageProperty() : new MessageProperty());
sheet.put(ps);
setSheet(sheet);
}
示例12: SubNode
import org.openide.nodes.Sheet; //导入方法依赖的package包/类
SubNode ( BiAnalyser biAnalyser, Class<?>[] keys, String titleKey, String iconBase,
Node.Property[] properties, Node.Property[] expert ) {
super ( new BiChildren ( biAnalyser, keys ) );
setDisplayName (NbBundle.getBundle(BiNode.class).
getString (titleKey));
setIconBaseWithExtension ( iconBase );
this.biAnalyser = biAnalyser;
this.key = keys[0];
Sheet sheet = Sheet.createDefault();
Sheet.Set ps = sheet.get(Sheet.PROPERTIES);
for ( int i = 0; i < properties.length; i++ ) {
ps.put( properties[i] );
}
if( expert != null ){
Sheet.Set eps = Sheet.createExpertSet();
for ( int i = 0; i < expert.length; i++ ) {
eps.put( expert[i] );
}
sheet.put(eps);
}
setSheet(sheet);
getCookieSet().add ( this );
}
示例13: createSheet
import org.openide.nodes.Sheet; //导入方法依赖的package包/类
@Override
protected Sheet createSheet() {
Sheet sheet = Sheet.createDefault();
Sheet.Set ps = Sheet.createPropertiesSet ();
int i, k = columns.length;
for (i = 0; i < k; i++)
ps.put (new MyProperty (columns [i], treeModelRoot));
sheet.put (ps);
return sheet;
}
示例14: createSheet
import org.openide.nodes.Sheet; //导入方法依赖的package包/类
@Override
protected Sheet createSheet() {
Sheet sheet = Sheet.createDefault();
Sheet.Set set = Sheet.createPropertiesSet();
sheet.put(set);
try {
Node.Property senseNameProp = new PropertySupport.Reflection<String>(getDataNode(), String.class, "getSenseName", "setSenseName");
senseNameProp.setName(Sense.psSenseName);
senseNameProp.setDisplayName("Name of the sense");
senseNameProp.setShortDescription("In this field can be act, sense or competence node");
Node.Property predicateProp = new PropertySupport.Reflection<Integer>(getDataNode(), Integer.class, "getPredicateIndex", "setPredicateIndex");
predicateProp.setName(Sense.psPredicateIndex);
predicateProp.setDisplayName("Predicate(<, =, !=...)");
predicateProp.setShortDescription("One od the following: == | = | != | < | > | <= | >= \nBoth '==' and '=' test for equality");
int[] intValues = new int[Predicate.values().length];
String[] stringKeys = new String[Predicate.values().length];
for (int i = 0; i < Predicate.values().length; i++) {
intValues[i] = i;
stringKeys[i] = Predicate.values()[i].toString();
}
predicateProp.setValue("intValues", intValues);
predicateProp.setValue("stringKeys", stringKeys);
Node.Property valueProp = new PropertySupport.Reflection<String>(getDataNode(), String.class, "getValueString", "setValueString");
valueProp.setName(Sense.psValue);
valueProp.setDisplayName("Value");
valueProp.setShortDescription("Value is used together with predicate, it is compared to the value returned from the act using predicate and that is the result of the act.");
set.put(new Property[]{senseNameProp, predicateProp, valueProp});
} catch (NoSuchMethodException ex) {
Exceptions.printStackTrace(ex);
}
return sheet;
}
示例15: initProperties
import org.openide.nodes.Sheet; //导入方法依赖的package包/类
private void initProperties() {
Sheet sheet = Sheet.createDefault();
Sheet.Set ps = Sheet.createPropertiesSet();
ps.put(new NameProperty());
ps.put(new LocationProperty());
ps.put(new StatusProperty());
sheet.put(ps);
setSheet(sheet);
}