LayoutManager
, LayoutManager2
BasicSplitPaneUI.BasicVerticalLayoutManager
BasicSplitPaneUI
public sealed class BasicSplitPaneUI.BasicHorizontalLayoutManager extends Object implements LayoutManager2 permits BasicSplitPaneUI.BasicVerticalLayoutManager
Modifier and Type | Field | Description |
---|---|---|
protected Component[] |
components |
The components. |
protected int[] |
sizes |
The size of components. |
Modifier and Type | Method | Description |
---|---|---|
void |
addLayoutComponent |
Adds the specified component to the layout, using the specified constraint object. |
void |
addLayoutComponent |
Adds the component at place. |
protected int |
getAvailableSize |
Returns the available width based on the container size and Insets . |
protected int |
getInitialLocation |
Returns the left inset, unless the Insets are null in which case 0 is returned. |
float |
getLayoutAlignmentX |
Returns the alignment along the x axis. |
float |
getLayoutAlignmentY |
Returns the alignment along the y axis. |
protected int |
getPreferredSizeOfComponent |
Returns the width of the passed in Components preferred size. |
protected int |
getSizeOfComponent |
Returns the width of the passed in component. |
protected int[] |
getSizes() |
Returns the sizes of the components. |
void |
invalidateLayout |
Does nothing. |
void |
layoutContainer |
Does the actual layout. |
Dimension |
maximumLayoutSize |
Returns the maximum layout size, which is Integer.MAX_VALUE in both directions. |
Dimension |
minimumLayoutSize |
Returns the minimum size needed to contain the children. |
Dimension |
preferredLayoutSize |
Returns the preferred size needed to contain the children. |
void |
removeLayoutComponent |
Removes the specified component from our knowledge. |
protected void |
resetSizeAt |
Resets the size of the Component at the passed in location. |
void |
resetToPreferredSizes() |
Marks the receiver so that the next time this instance is laid out it'll ask for the preferred sizes. |
protected void |
setComponentToSize |
Sets the width of the component c to be size , placing its x location at location , y to the insets.top and height to the containerSize.height less the top and bottom insets. |
protected void |
setSizes |
Sets the sizes to newSizes . |
protected void |
updateComponents() |
Determines the components. |
protected int[] sizes
protected Component[] components
public void layoutContainer(Container container)
layoutContainer
in interface LayoutManager
container
- the container to be laid outpublic void addLayoutComponent(String place, Component component)
addLayoutComponent
in interface LayoutManager
place
- the string to be associated with the componentcomponent
- the component to be addedpublic Dimension minimumLayoutSize(Container container)
minimumLayoutSize
in interface LayoutManager
container
- the component to be laid outpublic Dimension preferredLayoutSize(Container container)
preferredLayoutSize
in interface LayoutManager
container
- the container to be laid outpublic void removeLayoutComponent(Component component)
removeLayoutComponent
in interface LayoutManager
component
- the component to be removedpublic void addLayoutComponent(Component comp, Object constraints)
addLayoutComponent
in interface LayoutManager2
comp
- the component to be addedconstraints
- where/how the component is added to the layout.public float getLayoutAlignmentX(Container target)
getLayoutAlignmentX
in interface LayoutManager2
target
- the target containerpublic float getLayoutAlignmentY(Container target)
getLayoutAlignmentY
in interface LayoutManager2
target
- the target containerpublic void invalidateLayout(Container c)
invalidateLayout
in interface LayoutManager2
c
- the target containerpublic Dimension maximumLayoutSize(Container target)
maximumLayoutSize
in interface LayoutManager2
target
- the target containerpublic void resetToPreferredSizes()
protected void resetSizeAt(int index)
index
- the index of a componentprotected void setSizes(int[] newSizes)
newSizes
.newSizes
- the new sizesprotected int[] getSizes()
protected int getPreferredSizeOfComponent(Component c)
c
- a componentprotected int getSizeOfComponent(Component c)
c
- a componentprotected int getAvailableSize(Dimension containerSize, Insets insets)
Insets
.containerSize
- a container sizeinsets
- an insetsprotected int getInitialLocation(Insets insets)
Insets
are null in which case 0 is returned.insets
- the insetsprotected void setComponentToSize(Component c, int size, int location, Insets insets, Dimension containerSize)
c
to be size
, placing its x location at location
, y to the insets.top
and height to the containerSize.height
less the top and bottom insets.c
- a componentsize
- a new widthlocation
- a new X coordinateinsets
- an insetscontainerSize
- a container sizeprotected void updateComponents()
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/javax/swing/plaf/basic/BasicSplitPaneUI.BasicHorizontalLayoutManager.html