void TableHeader::mouseMoved(MouseEventDetails* const e)
{
    if(getResizingAllowed())
    {
        checkMouseMargins(e);
    }
    Inherited::mouseMoved(e);
}
void TableHeader::mouseMoved(const MouseEventUnrecPtr e)
{
    if(getResizingAllowed())
    {
        checkMouseMargins(e);
    }
    Inherited::mouseMoved(e);
}
void TableHeader::mousePressed(MouseEventDetails* const e)
{
    if(getResizingAllowed())
    {
		Pnt2f MousePosInComponent = ViewportToComponent(e->getLocation(), this, e->getViewport());
        UInt32 CumulativeHeaderWidth(0);
        for(UInt32 i(0) ; i<getMFColumnHeaders()->size() ; ++i)
        {
            CumulativeHeaderWidth += getColumnHeaders(i)->getSize().x();
            if(MousePosInComponent.x() >= CumulativeHeaderWidth - getResizingCursorDriftAllowance() &&
               MousePosInComponent.x() <= CumulativeHeaderWidth + getColumnModel()->getColumnMargin() + getResizingCursorDriftAllowance())
            {
                _ColBorderMouseDraggedConnection = getParentWindow()->getParentDrawingSurface()->getEventProducer()->connectMouseDragged(boost::bind(&TableHeader::handleColBorderMouseDragged, this, _1));
                _ColBorderMouseReleasedConnection = getParentWindow()->getParentDrawingSurface()->getEventProducer()->connectMouseReleased(boost::bind(&TableHeader::mouseColBorderMouseReleased, this, _1));
                _ResizingColumn = i;
                return;
            }
            CumulativeHeaderWidth += getColumnModel()->getColumnMargin();
        }
    }
    Inherited::mousePressed(e);
}
void TableHeader::mousePressed(const MouseEventUnrecPtr e)
{
    if(getResizingAllowed())
    {
		Pnt2f MousePosInComponent = ViewportToComponent(e->getLocation(), TableHeaderRefPtr(this), e->getViewport());
        UInt32 CumulativeHeaderWidth(0);
        for(UInt32 i(0) ; i<getMFColumnHeaders()->size() ; ++i)
        {
            CumulativeHeaderWidth += getColumnHeaders(i)->getSize().x();
            if(MousePosInComponent.x() >= CumulativeHeaderWidth - getResizingCursorDriftAllowance() &&
               MousePosInComponent.x() <= CumulativeHeaderWidth + getColumnModel()->getColumnMargin() + getResizingCursorDriftAllowance())
            {
                getParentWindow()->getDrawingSurface()->getEventProducer()->addMouseMotionListener(&(_MarginDraggedListener));
                getParentWindow()->getDrawingSurface()->getEventProducer()->addMouseListener(&(_MarginDraggedListener));
                _ResizingColumn = i;
                return;
            }
            CumulativeHeaderWidth += getColumnModel()->getColumnMargin();
        }
    }
    Inherited::mousePressed(e);
}