Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Certain objects refuse to appear in pop-up
Certain objects refuse to appear in pop-up [message #695795] Tue, 12 July 2011 15:00
ouri.maler is currently offline ouri.malerFriend
Messages: 22
Registered: July 2010
Junior Member
The GUI I'm working on, in addition to several tabs, has progress bars that appear in pop-up Shells and a display where a Graph (using the ZEST library) appears. These all work fine. More recently, however, I wanted to add a feature that would make a sub-graph appear in a pop-up when a node on the graph was clicked. For some reason, though, the new Shell that pops up is blank. When I coded a ProgressBar in there, it displayed just fine, but when I do the same with a Graph, I get no results. When I put a Composite in there, it doesn't show up either, whether its contents are a Graph or a ProgressBar.

    //when the user double-clicks a node, we want the node's properties to be displayed:
    graph.addListener(SWT.MouseDoubleClick, new Listener() {
		  public void handleEvent(Event event) 
			  try {			  
			      Shell automataShell = new Shell(display);
			      automataShell.setSize(500, 400);;
			      automataShell.setLocation(300, 300);
			      automataShell.setLayout(new FillLayout());
                              //this ProgressBar, put there as a test, displays just fine.
			      ProgressBar progressBar = new ProgressBar(automataShell, SWT.NULL);
			      progressBar.setBounds(100, 10, 200, 20);
			      GraphNode selected = (GraphNode)graph.getSelection().get(0);
				  output(selected.getText() + "\n");
			      DNode node = getNode(nodeList, selected.getText());
			      String nodeType = null;
			      if(node instanceof DComponent)
			    	  nodeType = "Component";
			      if(node instanceof DConnector)
			    	  nodeType = "Connector";
			      output("Selection: " + node.getNodeName() + " is a " + nodeType + "; " + node.getDescription());

			      //This Graph doesn't display. I can't tell why - the method used is similar to the one with which I've created the Graph in the primary Shell.
			      Graph automataGraph = new Graph(automataShell, SWT.NULL);
			      automataGraph.setLayoutData(new RowData(490, 390));
			      makeGraph(node, null, null, automataGraph);
			      automataGraph.setLayoutAlgorithm(new SpringLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING), true);
			  catch (Exception e) {

Any suggestions?
Previous Topic:GC Can Not DrawFocus On Window 7 64Bit
Next Topic:Tabitems / Tabfolder with SWT 3.6.2 on Win7 64 bit
Goto Forum:

Current Time: Tue Jan 26 09:52:26 GMT 2021

Powered by FUDForum. Page generated in 0.01791 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top