- Timestamp:
- 09/10/13 21:11:41 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
java/main/src/main/java/com/framsticks/gui/tree/TreeNode.java
r101 r105 8 8 import org.apache.logging.log4j.Logger; 9 9 10 import com.framsticks.core.Node;11 import com.framsticks.core.Path;12 import com.framsticks.core.SideNoteKey;13 import com.framsticks.core.Tree;14 10 import com.framsticks.gui.Frame; 15 11 import com.framsticks.gui.ImageProvider; … … 19 15 import com.framsticks.params.CompositeParam; 20 16 import com.framsticks.params.EventListener; 21 import com.framsticks.params.FramsClass;22 17 import com.framsticks.params.ValueParam; 23 18 import com.framsticks.params.types.EventParam; 24 19 import com.framsticks.params.types.ObjectParam; 25 20 import com.framsticks.params.types.StringParam; 21 import com.framsticks.structure.Node; 22 import com.framsticks.structure.Path; 23 import com.framsticks.structure.SideNoteKey; 24 import com.framsticks.structure.Tree; 26 25 import com.framsticks.util.FramsticksException; 27 import com.framsticks.util.dispatching.Future Handler;26 import com.framsticks.util.dispatching.Future; 28 27 import com.framsticks.util.lang.Casting; 29 28 import com.framsticks.util.lang.Containers; 30 29 import com.framsticks.util.swing.TooltipConstructor; 31 30 32 import static com.framsticks. core.TreeOperations.*;31 import static com.framsticks.structure.TreeOperations.*; 33 32 34 33 public class TreeNode extends AbstractNode { … … 69 68 if (path.getTop().getParam() instanceof ObjectParam) { 70 69 Access access = bindAccess(path); 71 FramsClass framsClass = access.getFramsClass(); 72 for (EventParam eventParam : Containers.filterInstanceof(framsClass.getParamEntries(), EventParam.class)) { 70 for (EventParam eventParam : Containers.filterInstanceof(access.getParams(), EventParam.class)) { 73 71 if (!eventParam.getId().endsWith("_changed")) { 74 72 continue; 75 73 } 76 74 String valueId = eventParam.getId().substring(0, eventParam.getId().length() - 8); 77 final ValueParam valueParam = Casting.tryCast(ValueParam.class, framsClass.getParam(valueId));75 final ValueParam valueParam = Casting.tryCast(ValueParam.class, access.getParam(valueId)); 78 76 if (valueParam == null) { 79 77 continue; … … 249 247 250 248 renderer.setToolTipText(new TooltipConstructor() 251 .append("frams", access.get Id())249 .append("frams", access.getTypeId()) 252 250 .append("java", child.getClass().getCanonicalName()) 253 251 .append("access", access.getClass().getSimpleName()) … … 271 269 272 270 protected <A> void tryAddListener(final Path path, final EventParam eventParam, Class<A> argumentType, final EventListener<A> listener) { 273 getTree().addListener(path, eventParam, listener, argumentType, new FutureHandler<Void>(getFrame()) {271 addListener(path, eventParam, listener, argumentType, new Future<Void>(getFrame()) { 274 272 @SuppressWarnings("unchecked") 275 273 @Override
Note: See TracChangeset
for help on using the changeset viewer.