Class AutoResizeRowsCommand

    • Constructor Detail

      • AutoResizeRowsCommand

        public AutoResizeRowsCommand​(NatTable natTable,
                                     int... rowPositions)
        Create a AutoResizeRowsCommand for programmatic execution.
        Parameters:
        natTable - The NatTable instance in which the resize should be performed.
        rowPositions - The row positions that should be auto resized, based on the NatTable position.
        Since:
        1.6
      • AutoResizeRowsCommand

        public AutoResizeRowsCommand​(NatTable natTable,
                                     boolean transformPositions,
                                     int... rowPositions)
        Create a AutoResizeRowsCommand for programmatic execution.
        Parameters:
        natTable - The NatTable instance in which the resize should be performed.
        transformPositions - true if the row positions should be back transformed (e.g. in case the positions are collected via SelectionLayer and therefore need to be back transformed to the GridLayer coordinates), false if the row positions should be treated based on the NatTable.
        rowPositions - The row positions that should be auto resized, based on the NatTable position.
        Since:
        1.6
    • Method Detail

      • getGCFactory

        public GCFactory getGCFactory()
        Returns:
        The GCFactory needed to create a temporary GC for row height calculation.
      • doPositionTransformation

        public boolean doPositionTransformation()
        Return whether the command handler should transform the row positions or not. If this command is created via InitializeAutoResizeRowsCommand the row positions need to be transformed as by default the command handler is registered to the GridLayer but the row positions are set based on the SelectionLayer. A back transformation is therefore needed. If this command was not created with the other constructor, a back transformation in the command handler is not necessary.
        Returns:
        true if the command handler should transform the row positions, false if not.
        Since:
        1.6