Package hec.map.annotations.layout
Class LayoutFactory
java.lang.Object
hec.map.annotations.layout.LayoutFactory
This class is a factory of all built-in layouts.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Alignment of children widgets within a calculated connection widgets used by default layout used in a connection widget.static enum
Alignment of children widgets within a calculated widget used by FlowLayout (vertical and horizontal flow layout). -
Method Summary
Modifier and TypeMethodDescriptionstatic Layout
Creates a horizontal flow layout with default style where widgets are placed horizontally one to the right from another.static Layout
createHorizontalFlowLayout
(LayoutFactory.SerialAlignment alignment, int gap) Creates a horizontal flow layout with a specific style where widgets are placed horizontally one to the right from another.static Layout
Deprecated.use createHorizontalFlowLayout method insteadstatic Layout
createHorizontalLayout
(LayoutFactory.SerialAlignment alignment, int gap) Deprecated.use createHorizontalFlowLayout (alignment, gap) method insteadstatic Layout
Creates a vertical flow layout with default style where widgets are placed vertically one to the bottom from another.static Layout
createVerticalFlowLayout
(LayoutFactory.SerialAlignment alignment, int gap) Creates a vertical flow layout with a specific style where widgets are placed vertically one to the bottom from another.
-
Method Details
-
createVerticalFlowLayout
Creates a vertical flow layout with default style where widgets are placed vertically one to the bottom from another. The instance can be shared by multiple widgets. If child widget constraint is an Number value, then its integer value is takes as a weight in which the remaining height of the parent widget is split.- Returns:
- the vertical flow layout
-
createVerticalFlowLayout
Creates a vertical flow layout with a specific style where widgets are placed vertically one to the bottom from another. The instance can be shared by multiple widgets. If child widget constraint is an Number value, then its integer value is takes as a weight in which the remaining height of the parent widget is split.- Parameters:
alignment
- the alignmentgap
- the gap between widgets- Returns:
- the vertical flow layout
-
createHorizontalLayout
Deprecated.use createHorizontalFlowLayout method insteadCreates a horizontal flow layout with default style where widgets are placed horizontally one to the right from another. The instance can be shared by multiple widgets. If child widget constraint is an Number value, then its integer value is takes as a weight in which the remaining width of the parent widget is split.- Returns:
- the horizontal flow layout
-
createHorizontalLayout
@Deprecated public static Layout createHorizontalLayout(LayoutFactory.SerialAlignment alignment, int gap) Deprecated.use createHorizontalFlowLayout (alignment, gap) method insteadCreates a horizontal flow layout with a specific style where widgets are placed horizontally one to the right from another. The instance can be shared by multiple widgets. If child widget constraint is an Number value, then its integer value is takes as a weight in which the remaining width of the parent widget is split.- Parameters:
alignment
- the alignmentgap
- the gap between widgets- Returns:
- the horizontal flow layout
-
createHorizontalFlowLayout
Creates a horizontal flow layout with default style where widgets are placed horizontally one to the right from another. The instance can be shared by multiple widgets. If child widget constraint is an Number value, then its integer value is takes as a weight in which the remaining width of the parent widget is split.- Returns:
- the horizontal flow layout
-
createHorizontalFlowLayout
Creates a horizontal flow layout with a specific style where widgets are placed horizontally one to the right from another. The instance can be shared by multiple widgets. If child widget constraint is an Number value, then its integer value is takes as a weight in which the remaining width of the parent widget is split.- Parameters:
alignment
- the alignmentgap
- the gap between widgets- Returns:
- the horizontal flow layout
-