function setAlign($halign = null, $valign = null)
    {
        $oldHalign = $this->halign;
        $oldValign = $this->valign;
        $this->valign = $valign;
        $this->halign = $halign;
        $this->onAlign($oldHalign, $oldValign);
    }