preferredSize_ = new Dimension(width_, h);
if( model.getOrientation() == VERTICAL ) preferredSize_ = new Dimension(width_, h); else { width_ = calculateVerticalWidth(); preferredSize_ = new Dimension(width_,h); }
    private void calculatePreferredSize()    {        int h = knobHeight;        if (model.isPaintTicks()) h += knobHeight;        if (model.isPaintLabels() || model.isPaintEndLabels())            h += TwoKnobsSliderUI.EXTRA+fontHeight+2*TwoKnobsSliderUI.BUFFER;        preferredSize_ = new Dimension(width_, h);    }