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


Java Sheet类代码示例

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


Sheet类属于org.openide.nodes包,在下文中一共展示了Sheet类的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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:21,代码来源:AntTargetNode.java

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

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

示例4: replaceSets

import org.openide.nodes.Sheet; //导入依赖的package包/类
public void replaceSets() {
    Sheet sheet = new Sheet();
    Sheet.Set props = sheet.get(Sheet.PROPERTIES);
    if (props == null) {
        props = Sheet.createPropertiesSet();
    }
    props.put(new TProperty("after - first", true));
    sheet.put(props);
    props = sheet.get(Sheet.EXPERT);
    if (props == null) {
        props = Sheet.createExpertSet();
    }
    props.put(new TProperty("after - second", true));
    sheet.put(props);
    setSheet(sheet);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:17,代码来源:PropertiesFlushTest.java

示例5: 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,代码来源:RendererDisplayerTest.java

示例6: 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(tp);
    props.put(tp1);
    props.put(tp2);
    props.put(tp3);
    props.put(tp4);
    //            props.put(tp5);
    return sheet;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:17,代码来源:SheetTableTest.java

示例7: createSheet

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

示例8: createSheet

import org.openide.nodes.Sheet; //导入依赖的package包/类
@Override
protected Sheet createSheet() {
    Sheet sheet = new Sheet();

    for (Map.Entry<File, Map<String, String>> e : properties.entrySet()) {
        Map<String, String> fileProps = e.getValue();
        Sheet.Set ps = new Sheet.Set();
        ps.setName(e.getKey().getAbsolutePath());
        ps.setDisplayName(e.getKey().getName());
        ps.setShortDescription(e.getKey().getAbsolutePath());
        Property[] props = new Property[fileProps.size()];
        int i = 0;
        for (Map.Entry<String, String> prop : fileProps.entrySet()) {
            String value = prop.getValue();
            if (value == null) {
                Logger.getLogger(VersioningInfo.class.getName()).log(Level.INFO, "null value for property {0}", prop.getKey()); //NOI18N
                value = NbBundle.getMessage(VersioningInfo.class, "MSG_VersioningInfoNode_unknownvalue"); //NOI18N
            }
            props[i++] = new VersioningInfoProperty(prop.getKey(), value);
        }
        ps.put(props);
        sheet.put(ps);
    }
    return sheet;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:26,代码来源:VersioningInfo.java

示例9: addIncludedProperty

import org.openide.nodes.Sheet; //导入依赖的package包/类
protected void addIncludedProperty( Sheet.Set ps ) {    
    ps.put(new PropertySupport.ReadWrite<Boolean> (
               PROP_INCLUDED,
               Boolean.TYPE,
               GenerateBeanInfoAction.getString ("PROP_Bi_" + PROP_INCLUDED ),
               GenerateBeanInfoAction.getString ("HINT_Bi_" + PROP_INCLUDED )
           ) {
               public Boolean getValue () {
                   return biFeature.isIncluded ();
               }
               public void setValue (Boolean val) throws
                   IllegalAccessException, IllegalArgumentException, InvocationTargetException {
                   try {
                       biFeature.setIncluded ( val );
                       setIconBaseWithExtension( biFeature.getIconBase(false) + ".gif" );
                   } catch (ClassCastException e) {
                       throw new IllegalArgumentException ();
                   }
               }
           });
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:22,代码来源:BiFeatureNode.java

示例10: addExpertEventSet

import org.openide.nodes.Sheet; //导入依赖的package包/类
void addExpertEventSet ( Sheet sheet ) {
    Sheet.Set ps = Sheet.createExpertSet();

    ps.put( BiNode.createProperty ( (BiFeature.EventSet)biFeature, Boolean.TYPE,
                                    PROP_UNICAST, 
                                    GenerateBeanInfoAction.getString ("PROP_Bi_" + PROP_UNICAST ),
                                    GenerateBeanInfoAction.getString ("HINT_Bi_" + PROP_UNICAST ),
                                    "isUnicast", null )); // NOI18N

    ps.put( BiNode.createProperty ( (BiFeature.EventSet)biFeature, Boolean.TYPE,
                                    PROP_IN_DEFAULT_EVENTSET, 
                                    GenerateBeanInfoAction.getString ("PROP_Bi_" + PROP_IN_DEFAULT_EVENTSET ),
                                    GenerateBeanInfoAction.getString ("HINT_Bi_" + PROP_IN_DEFAULT_EVENTSET ),
                                    "isInDefaultEventSet", "setInDefaultEventSet" )); // NOI18N

    sheet.put( ps );

}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:19,代码来源:BiFeatureNode.java

示例11: cloneSheet

import org.openide.nodes.Sheet; //导入依赖的package包/类
/** Clones the property sheet of original node.
*/
private Sheet cloneSheet () {
    PropertySet[] sets = super.getPropertySets ();

    Sheet s = new Sheet ();
    for (int i = 0; i < sets.length; i++) {
        Sheet.Set ss = new Sheet.Set ();
        ss.put (sets[i].getProperties ());
        ss.setName (sets[i].getName ());
        ss.setDisplayName (sets[i].getDisplayName ());
        ss.setShortDescription (sets[i].getShortDescription ());

        // modifies the set if it contains name of object property
        modifySheetSet (ss);
        
        s.put (ss);
    }

    return s;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:22,代码来源:BrokenDataShadow.java

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

示例13: 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

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

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


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