1 18 19 package org.objectweb.jac.aspects.gui; 20 21 import org.objectweb.jac.core.rtti.ClassItem; 22 import org.objectweb.jac.core.rtti.FieldItem; 23 import org.objectweb.jac.core.rtti.MemberItem; 24 import org.objectweb.jac.core.rtti.MethodItem; 25 26 29 public class ObjectView { 30 ClassItem cl; 31 String name; 32 ObjectView parent; 33 34 public ObjectView(ClassItem cl, String name) { 35 this.cl = cl; 36 this.name = name; 37 } 38 39 public ObjectView(ClassItem cl, String name, ObjectView parent) { 40 this.cl = cl; 41 this.parent = parent; 42 this.name = name; 43 } 44 45 public String getName() { 46 return name; 47 } 48 49 FieldItem[] attributesOrder; 50 public void setAttributesOrder(FieldItem[] attributesOrder) { 51 this.attributesOrder = attributesOrder; 52 } 53 57 public FieldItem[] getAttributesOrder() { 58 if (attributesOrder!=null) { 59 return attributesOrder; 60 } else { 61 if (parent!=null) 62 return parent.getAttributesOrder(); 63 else { 64 ClassItem superClass = cl.getSuperclass(); 65 if (superClass!=null) 66 return GuiAC.getView(superClass,name).getAttributesOrder(); 67 else 68 return null; 69 } 70 } 71 } 72 73 MethodItem[] methodsOrder; 74 public void setMethodsOrder(MethodItem[] methods) { 75 this.methodsOrder = methods; 76 } 77 81 public MethodItem[] getMethodsOrder() { 82 if (methodsOrder!=null) { 83 return methodsOrder; 84 } else { 85 if (parent!=null) 86 return parent.getMethodsOrder(); 87 else { 88 ClassItem superClass = cl.getSuperclass(); 89 if (superClass!=null) 90 return GuiAC.getView(superClass,name).getMethodsOrder(); 91 else 92 return null; 93 } 94 } 95 } 96 97 MemberItem[] tableMembersOrder; 98 public void setTableMembersOrder(MemberItem[] members) { 99 this.tableMembersOrder = members; 100 } 101 105 public MemberItem[] getTableMembersOrder() { 106 if (tableMembersOrder!=null) { 107 return tableMembersOrder; 108 } else { 109 if (parent!=null) 110 return parent.getTableMembersOrder(); 111 else 112 return null; 113 } 114 } 115 116 String [] categories; 117 public void setCategories(String [] categories) { 118 this.categories = categories; 119 } 120 public String [] getCategories() { 121 if (categories!=null) { 122 return categories; 123 } else { 124 if (parent!=null) 125 return parent.getCategories(); 126 else 127 return null; 128 } 129 } 130 131 132 boolean readOnly; 133 public boolean isReadOnly() { 134 return readOnly; 135 } 136 public void setReadOnly(boolean newReadOnly) { 137 this.readOnly = newReadOnly; 138 } 139 140 boolean enableLinks = true; 141 public void setEnableLinks(boolean enable) { 142 this.enableLinks = enable; 143 } 144 public boolean areLinksEnabled() { 145 return enableLinks; 146 } 147 } 148 | Popular Tags |