I’m sorry, but I really cannot understand the visual tree structure of the code that you quoted. The indentation is messed up and there’s probably a lot of stuff which is unrelated to what you care about.
A general answer to your question is that you need to set the GraphObject.alignment and GraphObject.alignmentFocus, assuming the element is in an appropriate kind of Panel along with the element with which you want to align.