- java.lang.Object
 -  
      
- javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager
 
 
-  
       
- 实现的所有接口
 -  
         
LayoutManager,LayoutManager2 
- Enclosing class:
 - BasicSplitPaneUI
 
public class BasicSplitPaneUI.BasicHorizontalLayoutManager extends Object implements LayoutManager2
用于JSplitPanes的LayoutManager,其方向为HORIZONTAL_SPLIT。 
-  
        
       
-  
             
字段汇总
字段 变量和类型 字段 描述 protected Component[]components组件。protected int[]sizes组件的大小。 
-  
             
方法摘要
所有方法 实例方法 具体的方法 变量和类型 方法 描述 voidaddLayoutComponent(Component comp, Object constraints)使用指定的约束对象将指定的组件添加到布局中。voidaddLayoutComponent(String place, Component component)在适当的位置添加组件。protected intgetAvailableSize(Dimension containerSize, Insets insets)根据容器大小和Insets返回可用宽度。protected intgetInitialLocation(Insets insets)返回左边的插入,除非Insets为null,在这种情况下返回0。floatgetLayoutAlignmentX(Container target)返回沿x轴的对齐方式。floatgetLayoutAlignmentY(Container target)返回沿y轴的对齐方式。protected intgetPreferredSizeOfComponent(Component c)返回传入的Components首选大小的宽度。protected intgetSizeOfComponent(Component c)返回传入的组件的宽度。protected int[]getSizes()返回组件的大小。voidinvalidateLayout(Container c)什么也没做。voidlayoutContainer(Container container)是实际布局。DimensionmaximumLayoutSize(Container target)返回最大布局大小,即两个方向上的Integer.MAX_VALUE。DimensionminimumLayoutSize(Container container)返回包含子项所需的最小大小。DimensionpreferredLayoutSize(Container container)返回包含子项所需的首选大小。voidremoveLayoutComponent(Component component)从我们的知识中删除指定的组件。protected voidresetSizeAt(int index)在传入的位置重置Component的大小。voidresetToPreferredSizes()标记接收器,以便下次布置此实例时,它将询问首选大小。protected voidsetComponentToSize(Component c, int size, int location, Insets insets, Dimension containerSize)设置组件的宽度c为size,将其x的位置在location,y以将insets.top和高度与containerSize.height更少的顶部和底部的插图。protected voidsetSizes(int[] newSizes)将大小设置为newSizes。protected voidupdateComponents()确定组件。 
 -  
             
 
-  
        
       
-  
             
字段详细信息
-  
sizes
protected int[] sizes
组件的大小。 
-  
components
protected Component[] components
组件。 
 -  
 
-  
             
方法详细信息
-  
layoutContainer
public void layoutContainer(Container container)
是实际布局。- Specified by:
 -  
              
layoutContainer在界面LayoutManager - 参数
 -  
              
container- 要布置的容器 
 
-  
addLayoutComponent
public void addLayoutComponent(String place, Component component)
在适当的位置添加组件。 Place必须是JSplitPane.LEFT,RIGHT,TOP,BOTTOM或null之一(对于分隔符)。- Specified by:
 -  
              
addLayoutComponent在界面LayoutManager - 参数
 -  
              
place- 与组件关联的字符串 -  
              
component- 要添加的组件 
 
-  
minimumLayoutSize
public Dimension minimumLayoutSize(Container container)
返回包含子项所需的最小大小。 宽度是所有儿童最小宽度的总和,高度是儿童最小高度的最大值。- Specified by:
 -  
              
minimumLayoutSize在界面LayoutManager - 参数
 -  
              
container- 要布置的组件 - 结果
 - 容器的最小尺寸
 - 另请参见:
 -  
              
LayoutManager.preferredLayoutSize(java.awt.Container) 
 
-  
preferredLayoutSize
public Dimension preferredLayoutSize(Container container)
返回包含子项所需的首选大小。 宽度是孩子们所有首选宽度的总和,高度是孩子们最大的首选高度。- Specified by:
 -  
              
preferredLayoutSize在界面LayoutManager - 参数
 -  
              
container- 要布置的容器 - 结果
 - 容器的首选尺寸
 - 另请参见:
 -  
              
LayoutManager.minimumLayoutSize(java.awt.Container) 
 
-  
removeLayoutComponent
public void removeLayoutComponent(Component component)
从我们的知识中删除指定的组件。- Specified by:
 -  
              
removeLayoutComponent接口LayoutManager - 参数
 -  
              
component- 要删除的组件 
 
-  
addLayoutComponent
public void addLayoutComponent(Component comp, Object constraints)
使用指定的约束对象将指定的组件添加到布局中。- Specified by:
 -  
              
addLayoutComponent在界面LayoutManager2 - 参数
 -  
              
comp- 要添加的组件 -  
              
constraints- 组件添加到布局的位置/方式。 
 
-  
getLayoutAlignmentX
public float getLayoutAlignmentX(Container target)
返回沿x轴的对齐方式。 这指定了组件相对于其他组件的对齐方式。 该值应为0到1之间的数字,其中0表示沿原点对齐,1表示距离原点最远,0.5表示居中等。- Specified by:
 -  
              
getLayoutAlignmentX在界面LayoutManager2 - 参数
 -  
              
target- 目标容器 - 结果
 - x轴对齐偏好
 
 
-  
getLayoutAlignmentY
public float getLayoutAlignmentY(Container target)
返回沿y轴的对齐方式。 这指定了组件相对于其他组件的对齐方式。 该值应为0到1之间的数字,其中0表示沿原点对齐,1表示距离原点最远,0.5表示居中等。- Specified by:
 -  
              
getLayoutAlignmentY在界面LayoutManager2 - 参数
 -  
              
target- 目标容器 - 结果
 - y轴对齐偏好
 
 
-  
invalidateLayout
public void invalidateLayout(Container c)
什么也没做。 如果开发人员真的想要更改其中一个视图的大小,应该发送JSplitPane.resetToPreferredSizes。- Specified by:
 -  
              
invalidateLayout在界面LayoutManager2 - 参数
 -  
              
c- 目标容器 
 
-  
maximumLayoutSize
public Dimension maximumLayoutSize(Container target)
返回最大布局大小,即两个方向上的Integer.MAX_VALUE。- Specified by:
 -  
              
maximumLayoutSize接口LayoutManager2 - 参数
 -  
              
target- 目标容器 - 结果
 - 容器的最大尺寸
 - 另请参见:
 -  
              
Component.getMaximumSize(),LayoutManager 
 
-  
resetToPreferredSizes
public void resetToPreferredSizes()
标记接收器,以便下次布置此实例时,它将询问首选大小。 
-  
resetSizeAt
protected void resetSizeAt(int index)
在传入的位置重置Component的大小。- 参数
 -  
              
index- 组件的索引 
 
-  
setSizes
protected void setSizes(int[] newSizes)
将大小设置为newSizes。- 参数
 -  
              
newSizes- 新尺寸 
 
-  
getSizes
protected int[] getSizes()
返回组件的大小。- 结果
 - 组件的大小
 
 
-  
getPreferredSizeOfComponent
protected int getPreferredSizeOfComponent(Component c)
返回传入的Components首选大小的宽度。- 参数
 -  
              
c- 一个组件 - 结果
 - 组件的首选宽度
 
 
-  
getSizeOfComponent
protected int getSizeOfComponent(Component c)
返回传入的组件的宽度。- 参数
 -  
              
c- 一个组件 - 结果
 - 组件的宽度
 
 
-  
getAvailableSize
protected int getAvailableSize(Dimension containerSize, Insets insets)
根据容器大小和Insets返回可用宽度。- 参数
 -  
              
containerSize- 容器大小 -  
              
insets- 一个插图 - 结果
 - 可用的宽度
 
 
-  
getInitialLocation
protected int getInitialLocation(Insets insets)
返回左边的插入,除非Insets为null,在这种情况下返回0。- 参数
 -  
              
insets- 插图 - 结果
 - 左边的插图
 
 
-  
setComponentToSize
protected void setComponentToSize(Component c, int size, int location, Insets insets, Dimension containerSize)
将组件c的宽度设置为size,将其x位置设置为location,将y设置为insets.top,将高度设置为containerSize.height减去顶部和底部插入。- 参数
 -  
              
c- 一个组件 -  
              
size- 新宽度 -  
              
location- 新的X坐标 -  
              
insets- 一个插图 -  
              
containerSize- 货柜尺寸 
 
-  
updateComponents
protected void updateComponents()
确定组件。 每当将新的实例安装到现有的SplitPane中时,都应调用此方法。 
 -  
 
 -