private int getWidth(Dimension preferredSize) {
      if (!myOrientation.isVertical())
        return preferredSize != null ? preferredSize.width : myDefaultExtent;
      else
        return myParentExtent;
    }
private int getWidth(Dimension preferredSize)