Package ca.nengo.ui.lib.world

Examples of ca.nengo.ui.lib.world.DroppableX


          goodTargets.add(target);
        }
      }

      if (node instanceof DroppableX) {
        DroppableX droppable = (DroppableX) node;
        droppable.droppedOnTargets(goodTargets);
      }
      if (node instanceof Droppable) {
        Droppable droppable = (Droppable) node;
        WorldObject target = null;
        for (WorldObject potentialTarget : goodTargets) {
          if (droppable.acceptTarget(potentialTarget)) {
            target = potentialTarget;
          }
        }
        if (target == null) {
          if (droppable.acceptTarget(worldLayer)) {
            target = worldLayer;
          }
        }
        if (target != null) {
          Point2D position = target.globalToLocal(node.localToGlobal(new Point2D.Double(
              0, 0)));

          node.setOffset(position);
          target.addChild(node);
          droppable.justDropped();
        }

      }
    }
  }
View Full Code Here

TOP

Related Classes of ca.nengo.ui.lib.world.DroppableX

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.