Placing figure in top-right corner of another
        Posted  
        
            by Ivan Dubrov
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Ivan Dubrov
        
        
        
        Published on 2010-03-19T09:20:08Z
        Indexed on 
            2010/03/19
            16:01 UTC
        
        
        Read the original article
        Hit count: 487
        
I want child figure (org.eclipse.draw2d.Figure) to be relative to the top-right corner of the parent (I want place some small icon, which will be ImageFigure, to be 12 pixels from top and right borders). Is there an existing layout manager that can layout child this way?
The org.eclipse.draw2d.XYLayout is not capable of measuring position relative to corner other than top-left.
Of course, I can:
- Write layout manager myself
 - Layout children figure every time bounds are changed for the parent (in parent layout() method).
 
However, I would like to know if some existing layout manager provides that functionality.
© Stack Overflow or respective owner