home *** CD-ROM | disk | FTP | other *** search
- package java.beans;
-
- import java.util.Enumeration;
- import java.util.Hashtable;
-
- public class FeatureDescriptor {
- private boolean expert;
- private boolean hidden;
- private String shortDescription;
- private String name;
- private String displayName;
- private Hashtable table;
-
- public FeatureDescriptor() {
- }
-
- public String getName() {
- return this.name;
- }
-
- public void setName(String var1) {
- this.name = var1;
- }
-
- public String getDisplayName() {
- return this.displayName == null ? this.getName() : this.displayName;
- }
-
- public void setDisplayName(String var1) {
- this.displayName = var1;
- }
-
- public boolean isExpert() {
- return this.expert;
- }
-
- public void setExpert(boolean var1) {
- this.expert = var1;
- }
-
- public boolean isHidden() {
- return this.hidden;
- }
-
- public void setHidden(boolean var1) {
- this.hidden = var1;
- }
-
- public String getShortDescription() {
- return this.shortDescription == null ? this.getDisplayName() : this.shortDescription;
- }
-
- public void setShortDescription(String var1) {
- this.shortDescription = var1;
- }
-
- public void setValue(String var1, Object var2) {
- if (this.table == null) {
- this.table = new Hashtable();
- }
-
- this.table.put(var1, var2);
- }
-
- public Object getValue(String var1) {
- return this.table == null ? null : this.table.get(var1);
- }
-
- public Enumeration attributeNames() {
- if (this.table == null) {
- this.table = new Hashtable();
- }
-
- return this.table.keys();
- }
-
- FeatureDescriptor(FeatureDescriptor var1, FeatureDescriptor var2) {
- this.expert = var1.expert | var2.expert;
- this.hidden = var1.hidden | var2.hidden;
- this.name = var2.name;
- this.shortDescription = var1.shortDescription;
- if (var2.shortDescription != null) {
- this.shortDescription = var2.shortDescription;
- }
-
- this.displayName = var1.displayName;
- if (var2.displayName != null) {
- this.displayName = var2.displayName;
- }
-
- this.addTable(var1.table);
- this.addTable(var2.table);
- }
-
- private void addTable(Hashtable var1) {
- if (var1 != null) {
- Enumeration var2 = var1.keys();
-
- while(var2.hasMoreElements()) {
- String var3 = (String)var2.nextElement();
- Object var4 = var1.get(var3);
- this.setValue(var3, var4);
- }
-
- }
- }
- }
-