javax.swing.plaf.basic

Class BasicSplitPaneUI.BasicVerticalLayoutManager

Enclosing Class:
BasicSplitPaneUI
Implemented Interfaces:
LayoutManager, LayoutManager2

public class BasicSplitPaneUI.BasicVerticalLayoutManager
extends BasicSplitPaneUI.BasicHorizontalLayoutManager

This class is the Layout Manager for the JSplitPane when the orientation is VERTICAL_SPLIT.

Field Summary

Fields inherited from class javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager

components, sizes

Method Summary

protected int
getAvailableSize(Dimension containerSize, Insets insets)
This method returns the height of the container minus the top and bottom inset.
protected int
getInitialLocation(Insets insets)
This method returns the top inset.
protected int
getPreferredSizeOfComponent(Component c)
This method returns the preferred height of the component.
protected int
getSizeOfComponent(Component c)
This method returns the current height of the component.
Dimension
minimumLayoutSize(Container container)
This method returns the minimum layout size.
Dimension
preferredLayoutSize(Container container)
This method returns the preferred layout size.
protected void
setComponentToSize(Component c, int size, int location, Insets insets, Dimension containerSize)
This method sets the bounds of the given component.

Methods inherited from class javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager

addLayoutComponent, addLayoutComponent, getAvailableSize, getInitialLocation, getLayoutAlignmentX, getLayoutAlignmentY, getPreferredSizeOfComponent, getSizeOfComponent, getSizes, invalidateLayout, layoutContainer, maximumLayoutSize, minimumLayoutSize, preferredLayoutSize, removeLayoutComponent, resetSizeAt, resetToPreferredSizes, setComponentToSize, setSizes, updateComponents

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Details

getAvailableSize

protected int getAvailableSize(Dimension containerSize,
                               Insets insets)
This method returns the height of the container minus the top and bottom inset.
Overrides:
getAvailableSize in interface BasicSplitPaneUI.BasicHorizontalLayoutManager
Parameters:
containerSize - The size of the container.
insets - The insets of the container.
Returns:
The height minus top and bottom inset.

getInitialLocation

protected int getInitialLocation(Insets insets)
This method returns the top inset.
Overrides:
getInitialLocation in interface BasicSplitPaneUI.BasicHorizontalLayoutManager
Parameters:
insets - The Insets to use.
Returns:
The top inset.

getPreferredSizeOfComponent

protected int getPreferredSizeOfComponent(Component c)
This method returns the preferred height of the component.
Overrides:
getPreferredSizeOfComponent in interface BasicSplitPaneUI.BasicHorizontalLayoutManager
Parameters:
c - The component to measure.
Returns:
The preferred height of the component.

getSizeOfComponent

protected int getSizeOfComponent(Component c)
This method returns the current height of the component.
Overrides:
getSizeOfComponent in interface BasicSplitPaneUI.BasicHorizontalLayoutManager
Parameters:
c - The component to measure.
Returns:
The current height of the component.

minimumLayoutSize

public Dimension minimumLayoutSize(Container container)
This method returns the minimum layout size. The minimum height is the sum of all the components' minimum heights. The minimum width is the maximum of all the components' minimum widths.
Specified by:
minimumLayoutSize in interface LayoutManager
Overrides:
minimumLayoutSize in interface BasicSplitPaneUI.BasicHorizontalLayoutManager
Parameters:
container - The container to measure.
Returns:
The minimum size.

preferredLayoutSize

public Dimension preferredLayoutSize(Container container)
This method returns the preferred layout size. The preferred height is the sum of all the components' preferred heights. The preferred width is the maximum of all the components' preferred widths.
Specified by:
preferredLayoutSize in interface LayoutManager
Overrides:
preferredLayoutSize in interface BasicSplitPaneUI.BasicHorizontalLayoutManager
Parameters:
container - The container to measure.
Returns:
The preferred size.

setComponentToSize

protected void setComponentToSize(Component c,
                                  int size,
                                  int location,
                                  Insets insets,
                                  Dimension containerSize)
This method sets the bounds of the given component. The y coordinate is the location given. The x coordinate is the left inset. The height is the size given. The width is the container size minus the left and right inset.
Overrides:
setComponentToSize in interface BasicSplitPaneUI.BasicHorizontalLayoutManager
Parameters:
c - The component to set bounds for.
size - The height.
location - The y coordinate.
insets - The insets to use.
containerSize - The container's size.

BasicSplitPaneUI.java -- Copyright (C) 2003, 2004, 2005, 2006, Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.