private static void layoutHContainer(Container parent) {
    int leftWidth = 0;
    int rightWidth = 0;
    JComponent jParent = (JComponent)parent;
    JComponent left = (JComponent)jParent.getClientProperty(LightToolWindow.LEFT_MIN_KEY);
    if (left != null) {
      leftWidth = LightToolWindow.MINIMIZE_WIDTH;
    }
    JComponent right = (JComponent)jParent.getClientProperty(LightToolWindow.RIGHT_MIN_KEY);
    if (right != null) {
      rightWidth = LightToolWindow.MINIMIZE_WIDTH;
    }
    int extraWidth = leftWidth + rightWidth;

    int width = parent.getWidth() - extraWidth;
    int height = parent.getHeight();
    Component toolbar = parent.getComponent(0);
    Dimension toolbarSize = toolbar.isVisible() ? toolbar.getPreferredSize() : new Dimension();
    toolbar.setBounds(leftWidth, 0, width, toolbarSize.height);
    parent.getComponent(1).setBounds(leftWidth, toolbarSize.height, width, height - toolbarSize.height);

    if (left != null) {
      left.setBounds(0, 0, leftWidth, height);
    }
    if (right != null) {
      right.setBounds(width + leftWidth, 0, rightWidth, height);
    }
  }
private static void layoutHContainer(Container parent)