graphStruct.getJGraph().addMouseListener(new JGraphMouseAdapter(graphStruct.getJGraph())); graphStruct.getJGraph().getGraphLayoutCache().setVisible(this, true); this.localGraphStruct.setJGraph(graphStruct.getJGraph());
	public GEStreamNode construct(GraphStructure graphStruct, int level)	{				System.out.println("Constructing the pipeline" +this.getName());		boolean first = true;		this.draw();				graphStruct.addToLevelContainer(level, this);		level++;			/*			DefaultGraphModel model = new DefaultGraphModel();		this.localGraphStruct.setGraphModel(model);		JGraph jgraph = new JGraph(model);			jgraph.addMouseListener(new JGraphMouseAdapter(jgraph));		jgraph.getGraphLayoutCache().setVisible(this, true);		this.localGraphStruct.setJGraph(jgraph);				frame = new LiveJGraphInternalFrame(this.localGraphStruct.getJGraph());		this.localGraphStruct.internalFrame = frame;		*/				graphStruct.getJGraph().addMouseListener(new JGraphMouseAdapter(graphStruct.getJGraph()));		graphStruct.getJGraph().getGraphLayoutCache().setVisible(this, true);		this.localGraphStruct.setJGraph(graphStruct.getJGraph());						ArrayList nodeList = (ArrayList) this.getSuccesors();		Iterator listIter =  nodeList.listIterator();			while(listIter.hasNext())		{			GEStreamNode strNode = (GEStreamNode) listIter.next();			GEStreamNode lastTemp = strNode.construct(graphStruct, level); //GEStreamNode lastTemp = strNode.construct(this.localGraphStruct);						if(!first)			{				System.out.println("Connecting " + lastNode.getName()+  " to "+ strNode.getName());				 				graphStruct.connectDraw(lastNode, strNode); //this.localGraphStruct.connectDraw(lastNode, strNode);			}						lastNode = lastTemp;			first = false;		}			//this.localGraphStruct.getGraphModel().insert(this.localGraphStruct.getCells().toArray(), this.localGraphStruct.getAttributes(), this.localGraphStruct.getConnectionSet(), null, null);		graphStruct.getGraphModel().insert(graphStruct.getCells().toArray(), graphStruct.getAttributes(), graphStruct.getConnectionSet(), null, null);						this.port = new DefaultPort();		this.add(this.port);				/*		frame.setGraphCell(this);		frame.setGraphStruct(graphStruct);		frame.setGraphModel(graphStruct.getGraphModel());		frame.create(this.getName());		frame.setSize(150, 350);		*/						(graphStruct.getAttributes()).put(this, this.attributes);		GraphConstants.setAutoSize(this.attributes, true);		GraphConstants.setBounds(this.attributes, graphStruct.setRectCoords(this));			GraphConstants.setBorder(this.attributes , BorderFactory.createLineBorder(Color.blue));		GraphConstants.setBackground(this.attributes, Color.blue);															(graphStruct.getGraphModel()).insert(new Object[] {this}, null, null, null, null);		graphStruct.getJGraph().getGraphLayoutCache().setVisible(new Object[]{this}, nodeList.toArray());						if (graphStruct.getTopLevel() == this) {			//graphStruct.editorFrame.getDesktopPane().add(frame);			//graphStruct.panel.getViewport().setView(frame);		}		else {			graphStruct.internalFrame.getContentPane().add(frame);		}				/*		try {				frame.setSelected(true);		}  catch(Exception pve) {}		frame.setSize(algorithm.max.x + 10, ((algorithm.max.y + ((algorithm.spacing.y * (this.getSuccesors().size()-1)) / 2)))) ; 		*/				return this;	}	