Class HorizontalLayout
java.lang.Object
com.intellij.ui.components.panels.HorizontalLayout
- All Implemented Interfaces:
LayoutManager,LayoutManager2
This class is intended to lay out added components horizontally.
It allows to add them into the LEFT, CENTER, or RIGHT group, which are aligned separately.
Every group can contain any amount of components. The specified gap is added between components,
and the double gap is added between groups of components.
NB!: this class must be modified together with the VerticalLayout class accordingly
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHorizontalLayout(int gap) Creates a layout with the specified gap.HorizontalLayout(int gap, int alignment) Creates a layout with the specified gap and vertical alignment. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLayoutComponent(Component component, Object constraints) voidaddLayoutComponent(String name, Component component) floatgetLayoutAlignmentX(Container target) floatgetLayoutAlignmentY(Container target) voidinvalidateLayout(Container target) voidlayoutContainer(Container container) maximumLayoutSize(Container target) minimumLayoutSize(Container container) preferredLayoutSize(Container container) voidremoveLayoutComponent(Component component)
-
Field Details
-
LEFT
- See Also:
-
RIGHT
- See Also:
-
CENTER
- See Also:
-
-
Constructor Details
-
HorizontalLayout
public HorizontalLayout(int gap) Creates a layout with the specified gap. All components will have preferred widths, but their heights will be set according to the container.- Parameters:
gap- horizontal gap between components
-
HorizontalLayout
public HorizontalLayout(int gap, int alignment) Creates a layout with the specified gap and vertical alignment. All components will have preferred sizes.- Parameters:
gap- horizontal gap between componentsalignment- vertical alignment for components- See Also:
-
-
Method Details
-
addLayoutComponent
- Specified by:
addLayoutComponentin interfaceLayoutManager2
-
maximumLayoutSize
- Specified by:
maximumLayoutSizein interfaceLayoutManager2
-
getLayoutAlignmentX
- Specified by:
getLayoutAlignmentXin interfaceLayoutManager2
-
getLayoutAlignmentY
- Specified by:
getLayoutAlignmentYin interfaceLayoutManager2
-
invalidateLayout
- Specified by:
invalidateLayoutin interfaceLayoutManager2
-
addLayoutComponent
- Specified by:
addLayoutComponentin interfaceLayoutManager
-
removeLayoutComponent
- Specified by:
removeLayoutComponentin interfaceLayoutManager
-
preferredLayoutSize
- Specified by:
preferredLayoutSizein interfaceLayoutManager
-
minimumLayoutSize
- Specified by:
minimumLayoutSizein interfaceLayoutManager
-
layoutContainer
- Specified by:
layoutContainerin interfaceLayoutManager
-