| 113 | |
| 114 | static public final Dict.Prop<FunctionOfBoxValued<Infoer>> info = new Dict.Prop<Info>("info").type().toCanon().doc("returns an object that lets you set sidecar properties of properties, such as max, min, accessors etc. A property with a sidecar Dict is a 'channel'"); |
| 115 | |
| 116 | public Channels(Box root) |
| 117 | { |
| 118 | properties.put(info, x -> new Infoer(x)); |
| 119 | properties.put(channels, x -> { |
| 120 | |
| 121 | ArrayList<String> a = new ArrayList<>(); |
| 122 | |
| 123 | // any property of this box that there's a channel info for anywhere above it |
| 124 | Map<Dict.Prop, Object> m = x.properties.getMap(); |
| 125 | m.entrySet().forEach(e -> { |
| 126 | Object i = x.asMap_get("_" + e.getKey() |
| 127 | .getName() + "_info"); |
| 128 | if (i instanceof Info) { |
| 129 | a.add(e.getKey() |
| 130 | .getName()); |
| 131 | } |
| 132 | }); |
| 133 | |
| 134 | |
| 135 | return a; |
| 136 | |
| 137 | }); |
| 138 | } |
| 139 | |
| 140 | |