Package ca.nengo.ui.models.viewers

Examples of ca.nengo.ui.models.viewers.NodeViewer


  /**
   * @return The Network model the Node is attached to
   */
  public UINetwork getNetworkParent() {
    NodeViewer viewer = getParentViewer();

    /*
     * Can only access parent network if the Node is inside a Network Viewer
     */
    if (viewer instanceof NetworkViewer) {
      return ((NetworkViewer) viewer).getViewerParent();
    } else if (viewer != null) {
      // Found the parent viewer, but it's not a network viewer
      // Recursively iterate up the view graph until we find the NetworkViewer or not
      //
      WorldObject viewerParent = viewer.getViewerParent();

      if (viewerParent instanceof UINeoNode) {
        return ((UINeoNode) viewerParent).getNetworkParent();
      }
    }
View Full Code Here


      return null;
    }
   
    public static NodeViewer getActiveViewer() {
      WorldObject wo = getActiveObject();
      NodeViewer viewer = null;
      if (wo instanceof UINodeViewable) {
        UINodeViewable node = (UINodeViewable)wo;
        if (node.isViewerWindowVisible())
          viewer = node.getViewer();
      }
View Full Code Here

     * @return Viewer Window
     */
    protected Window getViewerWindow() {
        if (!isViewerWindowVisible()) {

            NodeViewer nodeViewer = createViewerInstance();
            Window viewerWindow = new Window(this, nodeViewer);
            nodeViewer.applyDefaultLayout();

            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    if (getWorld() != null) {
                        if (viewerWindowRef.get() != null && !viewerWindowRef.get().isDestroyed()) {
View Full Code Here

  }
 
   @Override
  protected void modelUpdated() {
        super.modelUpdated();
        NodeViewer viewer = getViewer();

        if (viewer != null && !getViewer().isDestroyed()) {
            viewer.updateViewFromModel();
        }
    }
View Full Code Here

TOP

Related Classes of ca.nengo.ui.models.viewers.NodeViewer

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.