Package com.mystictri.neotexture.TextureGraphNode

Examples of com.mystictri.neotexture.TextureGraphNode.ConnectionPoint


      }
    } else if (e.getSource() == swapInputsChannelMenuItem) { // --------------------------------------------------------
      TextureGraphNode node = graph.selectedNodes.get(0);
      if (node != null) {
        if (node.getChannel().getNumInputChannels() < 2) return;
        ConnectionPoint p0 = node.getInputConnectionPointByChannelIndex(0);
        ConnectionPoint p1 = node.getInputConnectionPointByChannelIndex(1);
        TextureNodeConnection c0 = graph.getConnectionAtInputPoint(p0);
        TextureNodeConnection c1 = graph.getConnectionAtInputPoint(p1);
        graph.removeConnection(c0);
        graph.removeConnection(c1);
        if (c0 != null && c1 != null) {
          ConnectionPoint temp = c0.target;
          c0.target = c1.target;
          c1.target = temp;
          graph.addConnection(c0);
          graph.addConnection(c1);
        } else if (c1 != null) {
View Full Code Here


      return 2;
    }
    // now check if we clicked into an input node
    Vector<ConnectionPoint> allCPs = node.getAllConnectionPointsVector();
    for (int i = 0; i < allCPs.size(); i++) {
      ConnectionPoint cp = allCPs.get(i);
      if (cp.inside(x, y))
        return -cp.channelIndex - 1;
    }
   
    if ((x >= helpX) && (x <= (helpX + helpW)) && (y >= helpY) && (y <= (helpY + helpH))) {
      JOptionPane.showMessageDialog(this, node.getChannel().getHelpText(), node.getChannel().getName() + " Help", JOptionPane.PLAIN_MESSAGE);
View Full Code Here

TOP

Related Classes of com.mystictri.neotexture.TextureGraphNode.ConnectionPoint

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.