Class LayoutFactory

java.lang.Object
hec.map.annotations.layout.LayoutFactory

public final class LayoutFactory extends Object
This class is a factory of all built-in layouts.
  • Method Details

    • createVerticalFlowLayout

      public static Layout 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

      public 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. 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 alignment
      gap - the gap between widgets
      Returns:
      the vertical flow layout
    • createHorizontalLayout

      @Deprecated public static Layout createHorizontalLayout()
      Deprecated.
      use createHorizontalFlowLayout method instead
      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
    • createHorizontalLayout

      @Deprecated public static Layout createHorizontalLayout(LayoutFactory.SerialAlignment alignment, int gap)
      Deprecated.
      use createHorizontalFlowLayout (alignment, gap) method instead
      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 alignment
      gap - the gap between widgets
      Returns:
      the horizontal flow layout
    • createHorizontalFlowLayout

      public static 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

      public 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. 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 alignment
      gap - the gap between widgets
      Returns:
      the horizontal flow layout