KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > xml > schema > abe > nodes > properties > NameProperty


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.xml.schema.abe.nodes.properties;
21
22 import java.lang.reflect.InvocationTargetException JavaDoc;
23 import java.lang.reflect.Method JavaDoc;
24 import org.netbeans.modules.xml.axi.AXIComponent;
25 import org.netbeans.modules.xml.schema.model.SchemaModel;
26 import org.openide.nodes.PropertySupport;
27
28 /**
29  *
30  * @author Ayub Khan
31  */

32 public class NameProperty extends BaseABENodeProperty {
33     
34     /**
35      * Creates a new instance of BaseABENodeProperty.
36      *
37      * @param component The schema component which property belongs to.
38      * @param valueType The class type of the property.
39      * @param property The property name.
40      * @param propDispName The display name of the property.
41      * @param propDesc Short description about the property.
42      * @param propEditorClass The property editor class
43      * if the property needs special property editor.
44      * If no property editor class is provided default editor
45      * (for type of property) will be used.
46      * The property editor class must provide a default constructor.
47      * Subclasses can also override
48      * getPropertyEditor method to provide property editor.
49      * @throws java.lang.NoSuchMethodException If no getter and setter for the property are found
50      */

51     public NameProperty(AXIComponent component,
52             Class JavaDoc valueType,
53             String JavaDoc property,
54             String JavaDoc propDispName,
55             String JavaDoc propDesc)
56             throws NoSuchMethodException JavaDoc {
57         super(component, valueType, property, propDispName, propDesc, null);
58     }
59     
60     
61     /**
62      * Creates a new instance of BaseABENodeProperty.
63      *
64      * @param component The schema component which property belongs to.
65      * @param valueType The class type of the property.
66      * @param property The property name.
67      * @param propDispName The display name of the property.
68      * @param propDesc Short description about the property.
69      * @param propEditorClass The property editor class
70      * if the property needs special property editor.
71      * If no property editor class is provided default editor
72      * (for type of property) will be used.
73      * The property editor class must provide a default constructor.
74      * Subclasses can also override
75      * getPropertyEditor method to provide property editor.
76      * @throws java.lang.NoSuchMethodException If no getter and setter for the property are found
77      */

78     public NameProperty(Object JavaDoc component,
79             Class JavaDoc valueType,
80             String JavaDoc property,
81             String JavaDoc propDispName,
82             String JavaDoc propDesc)
83             throws NoSuchMethodException JavaDoc {
84         super(component, valueType, property, propDispName, propDesc, null);
85     }
86     
87     /**
88      * This api determines if this property supports resetting default value.
89      * This returns true always.
90      * Subclasses can override if different behaviour expected.
91      */

92     @Override JavaDoc
93             public boolean supportsDefaultValue() {
94         return false;
95     }
96     
97 }
Popular Tags