Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Jubula » customize gridlayout(how to access mynode data in grid applyLayout....)
customize gridlayout [message #1014345] Mon, 25 February 2013 16:24 Go to next message
Mokhtar Abdu is currently offline Mokhtar Abdu
Messages: 104
Registered: November 2011
Senior Member
Hi,

so far, I have copied the impl. of GridlyoutAlgo to my class and added one parameter to the constructor. From that, I could restrict the row and col number of my gridlayout to what i want. But i got stuck when I looked to the folowing method:
@Override
	protected synchronized void applyLayoutInternal(InternalNode[] entitiesToLayout,
			InternalRelationship[] relationshipsToConsider, double boundsX,
			double boundsY, double boundsWidth, double boundsHeight) {
		int index = 0;
		for (int i = 0; i < rows; i++) {
			for (int j = 0; j < cols; j++) {
				if ((i * cols + j) < numChildren) {
					// find new position for child
					InternalNode sn = entitiesToLayout[index++];
					double xmove = boundsX + j * colWidth + offsetX;
					double ymove = boundsY + i * rowHeight + offsetY;
					sn.setInternalLocation(xmove, ymove);
					sn.setInternalSize(Math.max(w, MIN_ENTITY_SIZE), Math.max(h, MIN_ENTITY_SIZE));
				}
			}
			fireProgressEvent(2 + i, totalProgress);
		}
		updateLayoutLocations(entitiesToLayout);
		fireProgressEvent(totalProgress, totalProgress);
		
	}

The nodes of my graph are of type CandidateNode (subclass of GraphNode + some fields). How can I now access those "some fields" inside this method????
InternalNode.getGraphData() doesn't seem to work.

Thanks,
Mok
Re: customize gridlayout [message #1014625 is a reply to message #1014345] Tue, 26 February 2013 07:16 Go to previous message
Achim Loerke is currently offline Achim Loerke
Messages: 349
Registered: July 2009
Location: Braunschweig, Germany
Senior Member

Are you sure this posting was meant for the Jubula forum?

- Achim
Previous Topic:How can we implement full execution reports on Jenkins?
Next Topic:What should I do to use column title in SelectEntryByTextpath _specifyColumn)
Goto Forum:
  


Current Time: Fri Oct 31 10:57:25 GMT 2014

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

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