本文整理汇总了Java中org.openide.nodes.Sheet.get方法的典型用法代码示例。如果您正苦于以下问题:Java Sheet.get方法的具体用法?Java Sheet.get怎么用?Java Sheet.get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.openide.nodes.Sheet
的用法示例。
在下文中一共展示了Sheet.get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createSheet
import org.openide.nodes.Sheet; //导入方法依赖的package包/类
@Override
protected Sheet createSheet() {
Sheet sheet = super.createSheet ();
Sheet.Set props = sheet.get (Sheet.PROPERTIES);
if (props == null) {
props = Sheet.createPropertiesSet();
sheet.put(props);
}
String[] attrs = new String[] {"name", "description", "depends"}; // NOI18N
for (String attr : attrs) {
org.openide.nodes.Node.Property<?> prop = new AntProperty(target.getElement(), attr);
prop.setDisplayName (NbBundle.getMessage (AntTargetNode.class, "PROP_target_" + attr));
prop.setShortDescription (NbBundle.getMessage (AntTargetNode.class, "HINT_target_" + attr));
props.put (prop);
}
/*XXX
props.put (new BuildSequenceProperty());
*/
return sheet;
}
示例2: createSheet
import org.openide.nodes.Sheet; //导入方法依赖的package包/类
/**
* Update to this class
* @return
*/
@Override
protected Sheet createSheet() {
Sheet sheet = super.createSheet();
Sheet.Set props = sheet.get(Sheet.PROPERTIES);
if (props == null) {
props = Sheet.createPropertiesSet();
sheet.put(props);
}
for (TLProperty property : folder.getProperties()) {
TLProperyAdapter adapter = new TLProperyAdapter(property);
props.put(adapter);
propertyAdapters.add(adapter);
}
return sheet;
}
示例3: createSheet
import org.openide.nodes.Sheet; //导入方法依赖的package包/类
/** Create properties sheet */
protected Sheet createSheet() {
Sheet sheet = super.createSheet();
Sheet.Set ps = sheet.get (Sheet.PROPERTIES);
if (ps == null) {
ps = Sheet.createPropertiesSet ();
}
ps.put(createProperty(AnnotationTypes.PROP_BACKGROUND_DRAWING, boolean.class)); //NOI18N
ps.put(createProperty(AnnotationTypes.PROP_BACKGROUND_GLYPH_ALPHA, int.class)); //NOI18N
ps.put(createProperty(AnnotationTypes.PROP_COMBINE_GLYPHS, boolean.class)); //NOI18N
ps.put(createProperty(AnnotationTypes.PROP_GLYPHS_OVER_LINE_NUMBERS, boolean.class)); //NOI18N
ps.put(createProperty(AnnotationTypes.PROP_SHOW_GLYPH_GUTTER, boolean.class)); //NOI18N
sheet.put(ps);
return sheet;
}
示例4: 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;
}
示例5: createSheet
import org.openide.nodes.Sheet; //导入方法依赖的package包/类
@Override
protected Sheet createSheet() {
Sheet sheet = super.createSheet();
Sheet.Set props = sheet.get(Sheet.PROPERTIES);
if (props == null) {
props = Sheet.createPropertiesSet();
sheet.put(props);
}
try {
PropertySupport.Reflection prop = new ReflProp(serverDef, URI.class, "uri", "URI");
prop.setPropertyEditorClass(getURIPropEditorClass());
props.put(new Property[]{
new ReflProp(serverDef, String.class, "serverName", "Server name"), // TODO not working
prop,});
} catch (NoSuchMethodException ex) {
ex.printStackTrace();
}
return sheet;
}
示例6: createSheet
import org.openide.nodes.Sheet; //导入方法依赖的package包/类
protected Sheet createSheet() {
Sheet s = super.createSheet();
Sheet.Set ss = s.get(Sheet.PROPERTIES);
if (ss == null) {
ss = Sheet.createPropertiesSet();
s.put(ss);
}
// TODO add some relevant properties: ss.put(...)
return s;
}
示例7: createSheet
import org.openide.nodes.Sheet; //导入方法依赖的package包/类
@Override
protected Sheet createSheet () {
Sheet s = super.createSheet ();
Sheet.Set ss = s.get (Sheet.PROPERTIES);
if (ss == null) {
ss = Sheet.createPropertiesSet ();
s.put (ss);
}
ss.put (new DummyProperty (getName ()));
return s;
}
示例8: createSheet
import org.openide.nodes.Sheet; //导入方法依赖的package包/类
@Override
protected Sheet createSheet() {
Sheet sheet = super.createSheet();
Sheet.Set props = sheet.get(Sheet.PROPERTIES);
if (props == null) {
props = Sheet.createPropertiesSet();
sheet.put(props);
}
//props.put(new Property[]{new ReflProp(serverDef, String.class, "unrealHome", "Unreal home")});
props.put(new FlagProp(serverDef.getServerHomePathFlag(), "Server home dir", "Path to the directory with server executable."));
props.put(new FlagProp(serverDef.getServerExecFlag(), "Server options", "Options used to start the server."));
return sheet;
}
示例9: changeSheet
import org.openide.nodes.Sheet; //导入方法依赖的package包/类
private void changeSheet(Sheet orig, SerialDataNode task) {
Sheet.Set props = orig.get (Sheet.PROPERTIES);
if (props != null) {
convertProps (props, props.getProperties(), task);
}
props = orig.get(Sheet.EXPERT);
if (props != null) {
convertProps (props, props.getProperties(), task);
}
}
示例10: createSheet
import org.openide.nodes.Sheet; //导入方法依赖的package包/类
protected Sheet createSheet() {
Sheet sheet = super.createSheet();
// Make sure there is a "Properties" set:
Sheet.Set props = sheet.get(Sheet.PROPERTIES);
if (props == null) {
props = Sheet.createPropertiesSet();
sheet.put(props);
}
props.put(new TProperty("before", true));
return sheet;
}
示例11: createSheet
import org.openide.nodes.Sheet; //导入方法依赖的package包/类
protected Sheet createSheet() {
Sheet sheet = super.createSheet();
// Make sure there is a "Properties" set:
Sheet.Set props = sheet.get(Sheet.PROPERTIES);
if (props == null) {
props = Sheet.createPropertiesSet();
sheet.put(props);
}
for (int i=0; i < ed.length; i++) {
props.put(new TProperty(this, ed[i], true));
}
return sheet;
}
示例12: createSheet
import org.openide.nodes.Sheet; //导入方法依赖的package包/类
protected Sheet createSheet() {
Sheet sheet = super.createSheet();
// Make sure there is a "Properties" set:
Sheet.Set props = sheet.get(Sheet.PROPERTIES);
if (props == null) {
props = Sheet.createPropertiesSet();
sheet.put(props);
}
props.put(plain);
props.put(fancy);
return sheet;
}
示例13: createSheet
import org.openide.nodes.Sheet; //导入方法依赖的package包/类
protected Sheet createSheet() {
Sheet s = Sheet.createDefault();
Sheet.Set ss = s.get(Sheet.PROPERTIES);
try {
PropertySupport.Reflection p;
p = new Reflection(this, String.class, "getTableName", null); // NOI18N
p.setName("tableName"); // NOI18N
String tableDisplayName = NbBundle.getMessage(TableNode.class, "TABLE_DISPLAY_NAME"); // NOI18N
// p.setDisplayName("Table Name"); // NOI18N
p.setDisplayName(tableDisplayName);
String tableShortDescription = NbBundle.getMessage(TableNode.class, "TABLE_SHORT_DESCRIPTION"); // NOI18N
// p.setShortDescription("Table name"); // NOI18N
p.setShortDescription(tableShortDescription);
ss.put(p);
p = new Reflection(this, String.class, "getCorrName", "setCorrName"); // NOI18N
p.setName("aliasName"); // NOI18N
String aliasDisplayName = NbBundle.getMessage(TableNode.class, "ALIAS_DISPLAY_NAME"); // NOI18N
// p.setDisplayName("Table Alias"); // NOI18N
p.setDisplayName(aliasDisplayName);
String aliasShortDescription = NbBundle.getMessage(TableNode.class, "ALIAS_SHORT_DESCRIPTION"); // NOI18N
// p.setShortDescription("Alias name for the table"); // NOI18N
p.setShortDescription(aliasShortDescription);
ss.put(p);
} catch (NoSuchMethodException nsme) {
Exceptions.printStackTrace(nsme);
}
return s;
}
示例14: createSheet
import org.openide.nodes.Sheet; //导入方法依赖的package包/类
protected Sheet createSheet() {
Sheet sheet = super.createSheet();
// Make sure there is a "Properties" set:
Sheet.Set props = sheet.get(Sheet.PROPERTIES);
if (props == null) {
props = Sheet.createPropertiesSet();
sheet.put(props);
}
props.put(myprop);
myprop.setFiringNode(this);
return sheet;
}
示例15: createSheet
import org.openide.nodes.Sheet; //导入方法依赖的package包/类
@Messages({
"LBL_Id=ID",
"LBL_Name=Name",
"LBL_Local=Local",
"LBL_Local_repository_path=Local repository path",
"LBL_Remote_Index=Remote Index Downloadable",
"LBL_Remote_URL=Remote Repository URL",
"LBL_Remote_Index_URL=Remote Index URL",
"LBL_last_indexed=Last Indexed"
})
@Override protected Sheet createSheet() {
Sheet sheet = Sheet.createDefault();
Sheet.Set basicProps = sheet.get(Sheet.PROPERTIES);
try {
Node.Property<?> id = new PropertySupport.Reflection<String>(info, String.class, "getId", null); //NOI18N
id.setDisplayName(LBL_Id());
id.setShortDescription(""); //NOI18N
Node.Property<?> name = new PropertySupport.Reflection<String>(info, String.class, "getName", null); //NOI18N
name.setDisplayName(LBL_Name());
name.setShortDescription(""); //NOI18N
Node.Property<?> local = new PropertySupport.Reflection<Boolean>(info, Boolean.TYPE, "isLocal", null); //NOI18N
local.setName("local"); //NOI18N
local.setDisplayName(LBL_Local());
local.setShortDescription("");
Node.Property<?> localRepoLocation = new PropertySupport.Reflection<String>(info, String.class, "getRepositoryPath", null); //NOI18N
localRepoLocation.setDisplayName(LBL_Local_repository_path());
Node.Property<?> remoteDownloadable = new PropertySupport.Reflection<Boolean>(info, Boolean.TYPE, "isRemoteDownloadable", null); //NOI18N
remoteDownloadable.setDisplayName(LBL_Remote_Index());
Node.Property<?> repoURL = new PropertySupport.Reflection<String>(info, String.class, "getRepositoryUrl", null); //NOI18N
repoURL.setDisplayName(LBL_Remote_URL());
Node.Property<?> indexURL = new PropertySupport.Reflection<String>(info, String.class, "getIndexUpdateUrl", null); //NOI18N
indexURL.setDisplayName(LBL_Remote_Index_URL());
Node.Property<?> lastIndexed = new PropertySupport.ReadOnly<Date>("lastIndexed", Date.class, LBL_last_indexed(), null) {
@Override public Date getValue() throws IllegalAccessException, InvocationTargetException {
return RepositoryPreferences.getLastIndexUpdate(info.getId());
}
};
basicProps.put(new Node.Property<?>[] {
id, name, local, localRepoLocation, remoteDownloadable, repoURL, indexURL, lastIndexed
});
} catch (NoSuchMethodException exc) {
exc.printStackTrace();
}
return sheet;
}