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