Class WDataTable.ActionConstraint

    • Constructor Detail

      • ActionConstraint

        public ActionConstraint​(int minSelectedRowCount,
                                int maxSelectedRowCount,
                                boolean error,
                                String message)
        Creates an action constraint.
        Parameters:
        minSelectedRowCount - the minimum number of rows which must be selected to fulfil the constraint, or zero for any number of rows.
        maxSelectedRowCount - the maximum number of rows which can be selected to fulfil the constraint, or zero for any number of rows.
        error - true if the constaint is an error, false for a warning.
        message - the message to display when the constraint is not met.
    • Method Detail

      • getMinSelectedRowCount

        public int getMinSelectedRowCount()
        Indicates the minimum number of rows which must be selected for the error/warning not to occur.
        Returns:
        the minimum selected row count.
      • setMinSelectedRowCount

        public void setMinSelectedRowCount​(int minSelectedRowCount)
        Parameters:
        minSelectedRowCount - The minimum selected row count to set.
      • getMaxSelectedRowCount

        public int getMaxSelectedRowCount()
        Indicates the maximum number of rows which can be selected for the error/warning not to occur.
        Returns:
        the maximum selected row count.
      • setMaxSelectedRowCount

        public void setMaxSelectedRowCount​(int maxSelectedRowCount)
        Parameters:
        maxSelectedRowCount - The maximum selected row count to set.
      • isError

        public boolean isError()
        Indicates whether the constraint is an error or warning.
        Returns:
        true if the constaint is an error, false for a warning.
      • setError

        public void setError​(boolean error)
        Sets whether the constraint is an error or warning.
        Parameters:
        error - true if the constaint is an error, false for a warning.
      • getMessage

        public String getMessage()
        Returns:
        Returns the message.
      • setMessage

        public void setMessage​(String message)
        Parameters:
        message - The message to set.