本文整理汇总了Java中org.openide.nodes.Sheet.put方法的典型用法代码示例。如果您正苦于以下问题:Java Sheet.put方法的具体用法?Java Sheet.put怎么用?Java Sheet.put使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.openide.nodes.Sheet
的用法示例。
在下文中一共展示了Sheet.put方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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;
}
示例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 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;
}
示例3: createSheet
import org.openide.nodes.Sheet; //导入方法依赖的package包/类
@Override
protected Sheet createSheet() {
Sheet sheet = super.createSheet();
Sheet.Set props = new Sheet.Set();
props.setDisplayName("Agent3D");
props.setName("Agent3D");
sheet.put(props);
try {
Property[] propArr = new Property[]{
new PeriodicalyUpdatedProperty(agent, "Location", Location.class, "Location", "Location of the agent."),
new PeriodicalyUpdatedProperty(agent, "Rotation", Rotation.class, "Rotation", "Rotation of the agent."),
new PeriodicalyUpdatedProperty(agent, "Velocity", Velocity.class, "Velocity", "Velocity of the agent."),};
updatableProps.addAll(Arrays.asList(propArr));
props.put(propArr);
} catch (NoSuchMethodException ex) {
Exceptions.printStackTrace(ex);
}
return sheet;
}
示例4: 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]);
}
示例5: 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);
}
示例6: createSheet
import org.openide.nodes.Sheet; //导入方法依赖的package包/类
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 PropertySupport.Name(this));
class ValueProp extends PropertySupport.ReadWrite {
public ValueProp() {
super("value", String.class,
bundle.getString("PROP_value"), bundle.getString("HINT_value"));
}
public Object getValue() {
return System.getProperty(key);
}
public void setValue(Object nue) {
System.setProperty(key, (String) nue);
PropertiesNotifier.changed();
}
}
props.put(new ValueProp());
PropertiesNotifier.addChangeListener(listener = new
ChangeListener() {
public void stateChanged(ChangeEvent ev) {
firePropertyChange("value", null, null);
}
});
return sheet;
}
示例7: 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);
}
tp = new TProperty("property", true);
props.put(tp);
return sheet;
}
示例8: initializeSheet
import org.openide.nodes.Sheet; //导入方法依赖的package包/类
public static void initializeSheet(final Properties properties, Sheet s) {
Sheet.Set set1 = Sheet.createPropertiesSet();
set1.setDisplayName("Properties");
for (final Property p : properties) {
Node.Property<String> prop = new Node.Property<String>(String.class) {
@Override
public boolean canRead() {
return true;
}
@Override
public String getValue() throws IllegalAccessException, InvocationTargetException {
return p.getValue();
}
@Override
public boolean canWrite() {
return false;
}
@Override
public void setValue(String arg0) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException {
properties.setProperty(p.getName(), arg0);
}
};
prop.setName(p.getName());
set1.put(prop);
}
s.put(set1);
}
示例9: initProperties
import org.openide.nodes.Sheet; //导入方法依赖的package包/类
private void initProperties() {
Sheet sheet = Sheet.createDefault();
Sheet.Set ps = Sheet.createPropertiesSet();
ps.put(new RevisionProperty());
ps.put(new DateProperty());
ps.put(new AuthorProperty());
ps.put(new HistoryProperty());
sheet.put(ps);
setSheet(sheet);
}
示例10: createSheet
import org.openide.nodes.Sheet; //导入方法依赖的package包/类
@Override
protected Sheet createSheet() {
Sheet sheet = super.createSheet();
Sheet.Set set = new Sheet.Set();
set.setName("encoding"); //NOI18N
set.setDisplayName(NbBundle.getMessage(PropertiesDataNode.class, "ENCODING_SET_Name"));
if (set == null) {
set = Sheet.createPropertiesSet();
sheet.put(set);
}
set.put(new ProjectEncodingProperty());
sheet.put(set);
return sheet;
}
示例11: 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 );
}
示例12: 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;
}
示例13: addCustomizerProperty
import org.openide.nodes.Sheet; //导入方法依赖的package包/类
protected void addCustomizerProperty( Sheet sheet ) {
Sheet.Set ps = Sheet.createExpertSet();
ps.put(new CodePropertySupportRW<String>(//PropertySupport.ReadWrite (
//ps.put(new PropertySupport.ReadWrite (
PROP_DISPLAY_NAME,
String.class,
GenerateBeanInfoAction.getString ("PROP_Bi_" + PROP_CUSTOMIZER ),
GenerateBeanInfoAction.getString ("HINT_Bi_" + PROP_CUSTOMIZER )
) {
public String getValue () {
String toRet = ((BiFeature.Descriptor)biFeature).getCustomizer() != null ? ((BiFeature.Descriptor)biFeature).getCustomizer() : "null"; // NOI18N
return toRet;
}
public void setValue (String val) throws
IllegalAccessException, IllegalArgumentException, InvocationTargetException {
try {
if( "null".equals(val) ) // NOI18N
val = null;
((BiFeature.Descriptor)biFeature).setCustomizer( val );
} catch (ClassCastException e) {
throw new IllegalArgumentException ();
}
}
});
sheet.put( ps );
}
示例14: createSheet
import org.openide.nodes.Sheet; //导入方法依赖的package包/类
@Override
protected Sheet createSheet() {
Sheet sheet = super.createSheet();
unrealProps = createPropSet();
sheet.put(unrealProps);
// TODO game type property
return sheet;
}
示例15: 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;
}