Class AbstractReportCellSort

    • Constructor Detail

      • AbstractReportCellSort

        public AbstractReportCellSort​(Shortcut definition)
        Default constructor
        Parameters:
        definition - Shortcut instance with the base definition of the option
    • Method Detail

      • isSorted

        protected boolean isSorted​(TransformContext context)
        Utility method that determines if the current context for which this option will be generated has its component (for example, grid cell) already sorted or not
        Parameters:
        context - TransformContext initialized instance with the information on where this option will be used
        Returns:
        boolean value indicating if the base element is already sorted
      • isSortAscending

        protected boolean isSortAscending​(TransformContext context)
        Utility method that determines if the current context for which this option will be generated has its component (for example, grid cell) sorted ascending or not.
        Parameters:
        context - TransformContext initialized instance with the information on where this option will be used
        Returns:
        boolean value indicating if the base element is already sorted ascending
      • getSortEvent

        protected WebEvent getSortEvent​(TransformContext context,
                                        int type)
        Utility method that generates the event for the sort manipulation.
        Parameters:
        context - TransformContext initialized instance with the information on where this option will be used
        type - int value indicating which sort order shall be provided. Values expected come from the SORT_DESCENDING and SORT_ASCENDING constants
        Returns:
        WebEvent initialized instance if the sort event is available. Otherwise it will return null.
      • getJSCode

        protected java.lang.String getJSCode​(TransformContext context,
                                             WebEvent event)
        Generate the JavaScript code the context menu item generated by this builder instance will trigger when the user selects it.
        Parameters:
        context - TransformContext initialized instance with the information on where this option will be used
        event - WebEvent instance that will determine which sort manipulation will be performed if the option is selected.
        Returns:
        String value with the JavaScript information to trigger when the option is selected.
      • getSortType

        public int getSortType()
        Returns:
        Returns the sortType.
        Since:
        MicroStrategy Web 8.0.2
      • setSortType

        public void setSortType​(int sortType)
        Parameters:
        sortType - The sortType to set.
        Since:
        MicroStrategy Web 8.0.2