| 137 | === Methods To Use === |
| 138 | These are methods of the ProBean class. |
| 139 | * Creates a read-write value prop by given property class. |
| 140 | {{{ |
| 141 | public <T> RwProp<T> makeRwProp(Class<? extends ObjectProperty<T>> cl) { |
| 142 | return makeProp(cl); |
| 143 | } |
| 144 | }}} |
| 145 | |
| 146 | * Creates a read-only prop by given property class. |
| 147 | {{{ |
| 148 | public <T> Prop<T> makeReadProp(Class<? extends Property<T>> cl) { |
| 149 | // XXX access exposure |
| 150 | return makeProp(cl); |
| 151 | } |
| 152 | }}} |
| 153 | |
| 154 | * Makes (or returns if already made) a simple value property by the given information. |
| 155 | {{{ |
| 156 | public <T> RwProp<T> makeValueProp(String id, Class<T> valueClass) { |
| 157 | return getData().makeValueProp(id, valueClass); |
| 158 | } |
| 159 | }}} |
| 160 | |
| 161 | or |
| 162 | |
| 163 | {{{ |
| 164 | public <T> RwProp<T> makeValueProp(String id, Class<T> valueClass, |
| 165 | T initValue) { |
| 166 | return getData().makeValueProp(id, valueClass, initValue); |
| 167 | } |
| 168 | }}} |
| 169 | |
| 170 | * Creates a children property. |
| 171 | {{{ |
| 172 | public <T extends ProObject> ChildrenProperty<T> makeChildProp(String id, |
| 173 | Class<T> childClass) { |
| 174 | |
| 175 | return getData().makeChildProp(id, childClass); |
| 176 | } |
| 177 | }}} |
| 178 | |
| 179 | * Creates a parent property. |
| 180 | {{{ |
| 181 | public <T extends ProObject> ParentProperty<T> makeParentProp( |
| 182 | Class<T> parentClass, String childPropId) { |
| 183 | return getData().makeParentProp(parentClass, childPropId); |
| 184 | } |
| 185 | }}} |
| 186 | |
| 187 | * Creates a list property. |
| 188 | {{{ |
| 189 | public <T> RwListProp<T> makeListProp(String id, Class<T> elementClass) { |
| 190 | return getData().makeListProp(id, elementClass); |
| 191 | } |
| 192 | }}} |
| 193 | |
| 194 | or |
| 195 | |
| 196 | {{{ |
| 197 | public <T> RwListProp<T> makeListProp( |
| 198 | Class<? extends ListProperty<T>> propClass) { |
| 199 | return makeProp(propClass); |
| 200 | } |
| 201 | }}} |
| 202 | |
| 203 | * Makes (or returns if already created) a final property (whose value may be written only once). |
| 204 | {{{ |
| 205 | public <T> Prop<T> makeFinalProp(String id, Class<T> valueClass) { |
| 206 | return getData().makeFinalProp(id, valueClass); |
| 207 | } |
| 208 | }}} |
| 209 | |
| 210 | * Creates (or returns if already have) an undo manager of this bean. |
| 211 | {{{ |
| 212 | public UndoProperty makeUndoProperty() { |
| 213 | return getData().makeUndoProperty(); |
| 214 | } |
| 215 | }}} |
| 216 | |