1 19 20 package org.netbeans.modules.xml.schema.abe.nodes.properties; 21 22 import java.lang.reflect.InvocationTargetException ; 23 import java.lang.reflect.Method ; 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 32 public class MinOccursProperty extends BaseABENodeProperty { 33 34 51 public MinOccursProperty(AXIComponent component, 52 Class valueType, 53 String property, 54 String propDispName, 55 String propDesc) 56 throws NoSuchMethodException { 57 super(component, valueType, property, propDispName, propDesc, null); 58 } 59 60 67 @Override 68 public boolean isDefaultValue () { 69 try { 70 return getValue()==DEFAULT_VALUE; 71 } catch (IllegalArgumentException ex) { 72 } catch (InvocationTargetException ex) { 73 } catch (IllegalAccessException ex) { 74 } 75 return false; 76 } 77 78 83 @Override 84 public boolean supportsDefaultValue () { 85 return true; 86 } 87 88 93 @Override 94 public void restoreDefaultValue () throws IllegalAccessException , InvocationTargetException { 95 setValue(DEFAULT_VALUE); 96 } 97 98 public static final String DEFAULT_VALUE = "1"; 99 } | Popular Tags |