public function display()
    {
        if (!$this->visible) {
            return;
        }

        parent::display();

        $this->calculatePages();

        if ($this->total_pages > 1) {
            $div_tag = new SwatHtmlTag('div');
            $div_tag->id = $this->id;
            $div_tag->class = $this->getCSSClassString();
            $div_tag->open();

            if ($this->display_parts & self::POSITION) {
                $this->displayPosition();
            }

            if ($this->display_parts & self::PREV) {
                $this->displayPrev();
            }

            if ($this->display_parts & self::PAGES) {
                $this->displayPages();
            }

            if ($this->display_parts & self::NEXT) {
                $this->displayNext();
            }

            $div_tag->close();
        }
    }