Changeset 137:e5c9f9214d40
- Timestamp:
- 08/01/2008 10:39:05 AM
(4 months ago)
- Author:
- marc@f1.local
- branch:
- default
- Message:
missing file
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r99 |
r137 |
|
| 2 | 2 | |
|---|
| 3 | 3 | import java.util.Arrays; |
|---|
| | 4 | import java.util.HashMap; |
|---|
| 4 | 5 | import java.util.LinkedHashSet; |
|---|
| 5 | 6 | import java.util.List; |
|---|
| … | … | |
| 7 | 8 | |
|---|
| 8 | 9 | import org.python.core.Py; |
|---|
| 9 | | import org.python.util.PythonInterpreter; |
|---|
| 10 | 10 | |
|---|
| 11 | 11 | import field.core.StandardFluidSheet; |
|---|
| … | … | |
| 247 | 247 | return Py.None; |
|---|
| 248 | 248 | } |
|---|
| 249 | | |
|---|
| | 249 | |
|---|
| 250 | 250 | @Override |
|---|
| 251 | 251 | public String toString() { |
|---|
| … | … | |
| 285 | 285 | |
|---|
| 286 | 286 | public VisitCode getRoot(iVisualElement source, Ref t) { |
|---|
| 287 | | System.out.println(" -- get root pseudoprop -- : "+root); |
|---|
| 288 | 287 | t.set(root); |
|---|
| 289 | 288 | return VisitCode.stop; |
|---|
| … | … | |
| 291 | 290 | |
|---|
| 292 | 291 | public VisitCode getSubelements(iVisualElement source, Ref t) { |
|---|
| 293 | | t.set(source.getParents()); |
|---|
| | 292 | t.set(buildMap((List<iVisualElement>) source.getParents())); |
|---|
| 294 | 293 | return VisitCode.stop; |
|---|
| 295 | 294 | } |
|---|
| 296 | 295 | |
|---|
| 297 | 296 | public VisitCode getSuperelements(iVisualElement source, Ref t) { |
|---|
| 298 | | t.set(source.getChildren()); |
|---|
| 299 | | return VisitCode.stop; |
|---|
| | 297 | t.set(buildMap(source.getChildren())); |
|---|
| | 298 | return VisitCode.stop; |
|---|
| | 299 | } |
|---|
| | 300 | |
|---|
| | 301 | private Map<String, iVisualElement> buildMap(List<iVisualElement> children) { |
|---|
| | 302 | HashMap<String, iVisualElement> m = new HashMap<String, iVisualElement>(); |
|---|
| | 303 | for(iVisualElement v : children) |
|---|
| | 304 | { |
|---|
| | 305 | m.put(v.getProperty(iVisualElement.name), v); |
|---|
| | 306 | } |
|---|
| | 307 | return m; |
|---|
| 300 | 308 | } |
|---|
| 301 | 309 | |
|---|