4015 * each key/value pair is added in the order that
4016 * <code>Enumeration</code> returns the keys.
4017 */
4018 protected void loadChildren() {
4019 loadedChildren = true;
4020 createChildren(this, childValue);
4021 }
4022
4023 /**
4024 * Subclassed to load the children, if necessary.
4025 */
4026 public TreeNode getChildAt(int index) {
4027 if(!loadedChildren)
4028 loadChildren();
4029 return super.getChildAt(index);
4030 }
4031
4032 /**
4033 * Subclassed to load the children, if necessary.
4034 */
4035 public Enumeration children() {
4036 if(!loadedChildren)
4037 loadChildren();
4038 return super.children();
4039 }
4040 }
4041
4042 void setUIProperty(String propertyName, Object value) {
4043 if (propertyName == "rowHeight") {
4044 if (!rowHeightSet) {
4045 setRowHeight(((Number)value).intValue());
4046 rowHeightSet = false;
4047 }
4048 } else if (propertyName == "scrollsOnExpand") {
4049 if (!scrollsOnExpandSet) {
4050 setScrollsOnExpand(((Boolean)value).booleanValue());
4051 scrollsOnExpandSet = false;
4052 }
4053 } else if (propertyName == "showsRootHandles") {
4054 if (!showsRootHandlesSet) {
4055 setShowsRootHandles(((Boolean)value).booleanValue());
|
4015 * each key/value pair is added in the order that
4016 * <code>Enumeration</code> returns the keys.
4017 */
4018 protected void loadChildren() {
4019 loadedChildren = true;
4020 createChildren(this, childValue);
4021 }
4022
4023 /**
4024 * Subclassed to load the children, if necessary.
4025 */
4026 public TreeNode getChildAt(int index) {
4027 if(!loadedChildren)
4028 loadChildren();
4029 return super.getChildAt(index);
4030 }
4031
4032 /**
4033 * Subclassed to load the children, if necessary.
4034 */
4035 public Enumeration<TreeNode> children() {
4036 if(!loadedChildren)
4037 loadChildren();
4038 return super.children();
4039 }
4040 }
4041
4042 void setUIProperty(String propertyName, Object value) {
4043 if (propertyName == "rowHeight") {
4044 if (!rowHeightSet) {
4045 setRowHeight(((Number)value).intValue());
4046 rowHeightSet = false;
4047 }
4048 } else if (propertyName == "scrollsOnExpand") {
4049 if (!scrollsOnExpandSet) {
4050 setScrollsOnExpand(((Boolean)value).booleanValue());
4051 scrollsOnExpandSet = false;
4052 }
4053 } else if (propertyName == "showsRootHandles") {
4054 if (!showsRootHandlesSet) {
4055 setShowsRootHandles(((Boolean)value).booleanValue());
|