Java Code Examples for org.openide.nodes.BeanNode#computeProperties()

The following examples show how to use org.openide.nodes.BeanNode#computeProperties() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PersistenceManagerBeanDataNode.java    From netbeans with Apache License 2.0 5 votes vote down vote up
protected void createProperties(Object bean, java.beans.BeanInfo info) {
        BeanNode.Descriptor d = BeanNode.computeProperties(bean, info);
        Node.Property p = new PropertySupport.ReadWrite(
        "extraParams", PersistenceManagerBeanDataNode.class,  //NOI18N
        NbBundle.getMessage(PersistenceManagerBeanDataNode.class,"LBL_ExtParams"), //NOI18N
        NbBundle.getMessage(PersistenceManagerBeanDataNode.class,"DSC_ExtParams") //NOI18N
        ) {
            public Object getValue() {
                return resource.getExtraParams();
            }
            
            public void setValue(Object val){
                if (val instanceof Object[])
                    resource.setExtraParams((Object[])val);
            }
            
            public PropertyEditor getPropertyEditor(){
                return new NameValuePairsPropertyEditor(resource.getExtraParams());
            }
        };
        
        Sheet sets = getSheet();
        Sheet.Set pset = Sheet.createPropertiesSet();
        pset.put(d.property);
        pset.put(p);
//        pset.setValue("helpID", "AS_Res_PMF_Props"); //NOI18N
        sets.put(pset);
    }
 
Example 2
Source File: DataSourceBeanDataNode.java    From netbeans with Apache License 2.0 5 votes vote down vote up
protected void createProperties(Object bean, java.beans.BeanInfo info) {
    BeanNode.Descriptor d = BeanNode.computeProperties(bean, info);
    Node.Property p = new PropertySupport.ReadWrite(
            "extraParams", DataSourceBeanDataNode.class, //NOI18N
            NbBundle.getMessage(DataSourceBeanDataNode.class,"LBL_ExtParams"), //NOI18N
            NbBundle.getMessage(DataSourceBeanDataNode.class,"DSC_ExtParams") //NOI18N
            ) {
        public Object getValue() {
            return resource.getExtraParams();
        }
        
        public void setValue(Object val){
            if (val instanceof Object[])
                resource.setExtraParams((Object[])val);
        }
        
        public PropertyEditor getPropertyEditor(){
            return new NameValuePairsPropertyEditor(resource.getExtraParams());
        }
    };
    
    Sheet sets = getSheet();
    Sheet.Set pset = Sheet.createPropertiesSet();
    pset.put(d.property);
    pset.put(p);
    //pset.setValue("propertiesHelpID", "AS_Res_DataSource_Props"); //NOI18N
    sets.put(pset);
}
 
Example 3
Source File: JMSBeanDataNode.java    From netbeans with Apache License 2.0 5 votes vote down vote up
protected void createProperties(Object bean, java.beans.BeanInfo info) {
        BeanNode.Descriptor d = BeanNode.computeProperties(bean, info);
        Node.Property p = new PropertySupport.ReadWrite(
        "extraParams", JMSBeanDataNode.class, //NOI18N
        NbBundle.getMessage(JMSBeanDataNode.class,"LBL_ExtParams"), //NOI18N
        NbBundle.getMessage(JMSBeanDataNode.class,"DSC_ExtParams") //NOI18N
        ) {
            public Object getValue() {
                return resource.getExtraParams();
            }
            
            public void setValue(Object val){
                if (val instanceof Object[])
                    resource.setExtraParams((Object[])val);
            }
            
            public PropertyEditor getPropertyEditor(){
                return new NameValuePairsPropertyEditor(resource.getExtraParams());
            }
        };
        
        Sheet sets = getSheet();
        Sheet.Set pset = Sheet.createPropertiesSet();
        pset.put(d.property);
        pset.put(p);
//        pset.setValue("helpID", "AS_Res_JMS_Props"); //NOI18N
        sets.put(pset);
    }
 
Example 4
Source File: JavaMailSessionBeanDataNode.java    From netbeans with Apache License 2.0 5 votes vote down vote up
protected void createProperties(Object bean, java.beans.BeanInfo info) {
        BeanNode.Descriptor d = BeanNode.computeProperties(bean, info);
        Node.Property p = new PropertySupport.ReadWrite(
        "extraParams", JavaMailSessionBeanDataNode.class, //NOI18N
        NbBundle.getMessage(JavaMailSessionBeanDataNode.class,"LBL_ExtParams"), //NOI18N
        NbBundle.getMessage(JavaMailSessionBeanDataNode.class,"DSC_ExtParams") //NOI18N
        ) {
            public Object getValue() {
                return resource.getExtraParams();
            }
            
            public void setValue(Object val){
                if (val instanceof Object[])
                    resource.setExtraParams((Object[])val);
            }
            
            public PropertyEditor getPropertyEditor(){
                return new NameValuePairsPropertyEditor(resource.getExtraParams());
            }
        };
        
        Sheet sets = getSheet();
        Sheet.Set pset = Sheet.createPropertiesSet();
        pset.put(d.property);
        pset.put(p);
//        pset.setValue("helpID", "AS_Res_Mail_Props"); //NOI18N
        sets.put(pset);
    }
 
Example 5
Source File: ConnPoolBeanDataNode.java    From netbeans with Apache License 2.0 5 votes vote down vote up
protected void createProperties(Object bean, java.beans.BeanInfo info) {
        BeanNode.Descriptor d = BeanNode.computeProperties(bean, info);
        Node.Property p = new PropertySupport.ReadWrite(
        "extraParams", ConnPoolBeanDataNode.class, //NOI18N
        NbBundle.getMessage(ConnPoolBeanDataNode.class,"LBL_ExtParams"), //NOI18N
        NbBundle.getMessage(ConnPoolBeanDataNode.class,"DSC_ExtParams") //NOI18N
        ) {
            public Object getValue() {
                return resource.getExtraParams();
            }
            
            public void setValue(Object val){
                if (val instanceof Object[])
                    resource.setExtraParams((Object[])val);
            }
            
            public PropertyEditor getPropertyEditor(){
                return new NameValuePairsPropertyEditor(resource.getExtraParams());
            }
        };
        
        Sheet sets = getSheet();
        Sheet.Set pset = Sheet.createPropertiesSet();
        pset.put(d.property);
        pset.put(p);
//        pset.setValue("helpID", "AS_Res_ConnectionPool_Props"); //NOI18N
        sets.put(pset);
     }