当前位置: 首页>>代码示例>>Java>>正文


Java Sheet.createPropertiesSet方法代码示例

本文整理汇总了Java中org.openide.nodes.Sheet.createPropertiesSet方法的典型用法代码示例。如果您正苦于以下问题:Java Sheet.createPropertiesSet方法的具体用法?Java Sheet.createPropertiesSet怎么用?Java Sheet.createPropertiesSet使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.openide.nodes.Sheet的用法示例。


在下文中一共展示了Sheet.createPropertiesSet方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createSheet

import org.openide.nodes.Sheet; //导入方法依赖的package包/类
protected Sheet createSheet() {
    sheet = super.createSheet();
    // Make sure there is a "Properties" set:
    props = sheet.get(Sheet.PROPERTIES);
    if (props == null) {
        props = Sheet.createPropertiesSet();
        sheet.put(props);
    }
    props.put(basicProp);
    props.put(tags1);
    props.put(tags2);
    props.put(tags3);
    props.put(booleanProp);
    props.put(customProp);
    
    return sheet;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:18,代码来源:EditableDisplayerTest.java

示例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>(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;
}
 
开发者ID:kefik,项目名称:Pogamut3,代码行数:19,代码来源:SimpleRoleActionWidget.java

示例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>(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;
}
 
开发者ID:kefik,项目名称:Pogamut3,代码行数:23,代码来源:SimpleRoleActionPatternWidget.java

示例4: 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 nameProp = new PropertySupport.Reflection<String>(getDataNode(), String.class, "getName", "setName");
        nameProp.setName(DriveElement.deName);
        nameProp.setDisplayName("Name of drive element");
        set.put(new Property[]{nameProp});
    } catch (NoSuchMethodException ex) {
        Exceptions.printStackTrace(ex);
    }
    return sheet;
}
 
开发者ID:kefik,项目名称:Pogamut3,代码行数:17,代码来源:SimpleDriveElementWidget.java

示例5: 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;
}
 
开发者ID:kefik,项目名称:Pogamut3,代码行数:23,代码来源:TLFolderNode.java

示例6: 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;
   }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:19,代码来源:AnnotationTypesNode.java

示例7: 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;
}
 
开发者ID:kefik,项目名称:Pogamut3,代码行数:19,代码来源:SimpleDriveCollectionWidget.java

示例8: getPropertySets

import org.openide.nodes.Sheet; //导入方法依赖的package包/类
@Override
public Node.PropertySet[] getPropertySets () {
    final Node.PropertySet[] properties = super.getPropertySets ();
    final List<Node.PropertySet> result = new ArrayList<PropertySet>(properties.length);
    for (Node.PropertySet set : properties) {
        if (set == null) {
            continue;
        }
        if (Sheet.PROPERTIES.equals(set.getName())) {
            //Replace the Sheet.PROPERTIES by the new one
            //having only the name property which does refactoring
            set = Sheet.createPropertiesSet();
            ((Sheet.Set)set).put(new PropertySupport.ReadWrite<String>(DataObject.PROP_NAME, String.class, PROP_name(), HINT_name()) {
                @Override
                public String getValue() {
                    return PackageViewChildren.PackageNode.this.getName();
                }
                @Override
                public void setValue(String n) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException {
                    if (!canRename()) {
                        throw new IllegalAccessException();
                    }
                    PackageViewChildren.PackageNode.this.setName(n);
                }
                @Override
                public boolean canWrite() {
                    return PackageViewChildren.PackageNode.this.canRename();
                }
            });
        }
        result.add(set);
    }
    return result.toArray(new Node.PropertySet[result.size()]);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:35,代码来源:PackageViewChildren.java

示例9: createSheet

import org.openide.nodes.Sheet; //导入方法依赖的package包/类
protected Sheet createSheet() {
    Sheet s = super.createSheet();
    Sheet.Set ss = Sheet.createPropertiesSet();
    ss.setValue("helpID", "properties-help");
    ss.put(new WithHelpProperty("prop1", "row-help-1"));
    ss.put(new WithHelpProperty("prop2", "row-help-2"));
    ss.put(new WithHelpProperty("prop3", null));
    s.put(ss);
    ss = Sheet.createExpertSet();
    ss.put(new WithHelpProperty("prop4", "row-help-4"));
    ss.put(new WithHelpProperty("prop5", null));
    s.put(ss);
    return s;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:15,代码来源:FindHelpTest.java

示例10: 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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:PUDataNode.java

示例11: 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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:33,代码来源:OnePropNode.java

示例12: 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);
    }
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:33,代码来源:PropertiesSheet.java

示例13: 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);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:12,代码来源:GitStatusNode.java

示例14: 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);        
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:12,代码来源:RevisionNode.java

示例15: 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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:RestoreDefaultValueTest.java


注:本文中的org.openide.nodes.Sheet.createPropertiesSet方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。