def __init__(self, widget, reference):

        """
        Determine location of <code>widget</code> relative to <code>reference</code>,
        such that <code>referencePanel.add(widget, location.getLeft(), location.getTop())</code>
        leaves the widget in the exact same location on the screen. Note that
        <code>reference</code> need not be the parent node, or even an ancestor of
        <code>widget</code>. Therefore coordinates returned may be negative or may
        exceed the dimensions of <code>reference</code>.

        @param widget the widget whose coordinates we seek
        @param reference the widget relative to which we seek our coordinates
        """

        self.left = 0
        self.referenceAdjustLeft = 0
        self.referenceAdjustTop = 0
        self.top = 0
        self.widgetLeft = 0
        self.widgetTop = 0

        AbstractLocation.__init__(self)

        self.internalSetWidget(widget)
        self.internalSetReference(reference)
        self.recalculate()
 def __init__(self, left, top):
     AbstractLocation.__init__(self)
     self.left = left
     self.top = top