Package ca.nengo.ui.models.nodes

Examples of ca.nengo.ui.models.nodes.UINetwork


    // into which we are pasting
    Stack<WorldObject> objStack = new Stack<WorldObject>();
    while (obj != null) {
      objStack.push(obj);
      if (obj instanceof NetworkViewer) {
        UINetwork nViewer = ((NetworkViewer) obj).getViewerParent();
        UINetwork v = nViewer.getNetworkParent();
        if (v != null)
          obj = v.getViewer();
        else
          obj = NengoGraphics.getInstance().getWorld();
      } else {
        obj = null;
      }
View Full Code Here


                UIEnsemble ensembleUI = new UIEnsemble(ensemble);
                addUINode(ensembleUI,false,false);
               
              } else if (node instanceof Network) {
                Network network = (Network)node;
                UINetwork networkUI = new UINetwork(network);
                addUINode(networkUI, false, false);
              } else {
                UserMessages.showError("Unsupported node type " + node.getClass().getSimpleName()
                    + " in EnsembleViewer");
              }
View Full Code Here

   *
   * @param exposedName
   *            Name of the newly exposed origin/termination
   */
  protected void expose(String exposedName) {
    UINetwork networkUI = getNodeParent().getNetworkParent();

    if (networkUI != null) {
      exposeModel(networkUI, exposedName);

      showPopupMessage(this.getName() + " is exposed as " + exposedName + " on Network: "
          + networkUI.getName());

    } else {
      UserMessages.showWarning("Cannot expose because no external network is available");
    }
  }
View Full Code Here

  /**
   * UnExposes this origin/termination outside the Network
   */
  protected void unExpose() {
    UINetwork networkUI = getNodeParent().getNetworkParent();
    Network network = networkUI.getModel();
    if (network != null) {
      unExpose(network);
      showPopupMessage(getName() + " is UN-exposed on Network: " + network.getName());
    } else {
      UserMessages.showWarning("Cannot expose because no external network is available");
View Full Code Here

   */
  public static UINeoNode createNodeUI(Node node) {

    UINeoNode nodeUI = null;
    if (node instanceof Network) {
      nodeUI = new UINetwork((Network) node);
    } else if (node instanceof Ensemble) {
      if (node instanceof NEFEnsemble) {
        nodeUI = new UINEFEnsemble((NEFEnsemble) node);
      } else {
        nodeUI = new UIEnsemble((Ensemble) node);
View Full Code Here

      return viewer;
    }
   
    public static UINetwork getActiveNetwork(boolean toplevel) {
      WorldObject wo = getActiveObject();
      UINetwork net = null;
    if (wo instanceof UINetwork) {
      net = (UINetwork)wo;
    } else {
      net = getParentNetwork(wo);
    }
   
    if (toplevel && net != null) {
      UINetwork netparent = net.getNetworkParent();
      while (netparent != null) {
        net = netparent;
        netparent = net.getNetworkParent();
      }
    }
View Full Code Here

  // moves a WorldObject, and all the Windows it lies in, to the front
  protected static void moveStackToFront(WorldObject wo) {
    wo.moveToFront();
   
    // move all parent network windows to the front
    UINetwork pnet = getParentNetwork(wo);
    while (pnet != null) {
        if (pnet.isViewerWindowVisible()) {
            pnet.moveViewerWindowToFront();
        }
      pnet = getParentNetwork(pnet);
    }
  }
View Full Code Here

     * All UI funcitons and constructors must be invoked from the Swing
     * Event Thread
     */
    SwingUtilities.invokeLater(new Runnable() {
      public void run() {
        UINetwork uiNetwork = buildUI();

        doStuff(uiNetwork);
      }
    });
  }
View Full Code Here

    TrackedStatusMsg task;
    task = new TrackedStatusMsg("Creating Model UI");
    if (networkUI == null) {

      networkUI = new UINetwork(network);
      nengoGraphics.getWorld().getGround().addChild(networkUI);
      networkUI.openViewer();
    }

    processNetwork(networkUI);
View Full Code Here

  private UINetwork network;

  public void createUINetwork(NengoGraphics nengoGraphics) throws StructuralException,
      SimulationException {

    network = new UINetwork(new NetworkImpl());
    nengoGraphics.getWorld().getGround().addChild(network);
    network.openViewer();
    network.getViewer().getGround().setElasticEnabled(true);

    (new Thread(new Runnable() {
View Full Code Here

TOP

Related Classes of ca.nengo.ui.models.nodes.UINetwork

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.