Class AbstractArrayPane

    • Constructor Detail

      • AbstractArrayPane

        public AbstractArrayPane()
    • Method Detail

      • init

        public void init​(String name,
                         javax.servlet.jsp.PageContext pageContext)
        Description copied from interface: ArrayPane
        Generic class to display a typical WA array table pane. A unique name identifier is to be used in html pages for this array specific actions (exemple : sort on a specific column)
        Specified by:
        init in interface ArrayPane
        Parameters:
        name - A unique name in the page to display
      • init

        public void init​(String name,
                         javax.servlet.ServletRequest request,
                         javax.servlet.http.HttpSession session)
        Description copied from interface: ArrayPane
        Constructor declaration
        Specified by:
        init in interface ArrayPane
      • init

        public void init​(String name,
                         String url,
                         javax.servlet.ServletRequest request,
                         javax.servlet.http.HttpSession session)
        Description copied from interface: ArrayPane
        Constructor declaration
        Specified by:
        init in interface ArrayPane
      • addArrayColumn

        public ArrayColumn addArrayColumn​(String title)
        Add a new column to the table.
        Specified by:
        addArrayColumn in interface ArrayPane
        Parameters:
        title - The column title to display
        Returns:
        The new column header. You can use this object to modify the default display options.
      • addArrayLine

        public ArrayLine addArrayLine()
        Description copied from interface: ArrayPane
        Add a line to the table. Be carefull : each line form the array has to contain the same cell number. If not, the array will contain some empty cells, and won't be sortable.
        Specified by:
        addArrayLine in interface ArrayPane
        Returns:
        an ArrayLine, to be used to add cells and to modify default display options.
      • getTitle

        public String getTitle()
        Description copied from interface: ArrayPane
        Get the title
        Specified by:
        getTitle in interface ArrayPane
        Returns:
        The title
      • setTitle

        public void setTitle​(String title)
        Description copied from interface: ArrayPane
        Set the array title, to be displayed on the first html table.
        Specified by:
        setTitle in interface ArrayPane
        Parameters:
        title - The title
      • getName

        public String getName()
        Description copied from interface: ArrayPane
        Get the unique name
        Specified by:
        getName in interface ArrayPane
        Returns:
        The name of this object in the http page
      • setVisibleLineNumber

        public void setVisibleLineNumber​(int maximum)
        Description copied from interface: ArrayPane
        Set the maximum line number visible in the table. If the number of line is greater than this maximum, only the first lines will be visible, and some buttons to view next and previous lines will be added.
        Specified by:
        setVisibleLineNumber in interface ArrayPane
        Parameters:
        maximum - The maximum number of visible lines
      • getColumnToSort

        public int getColumnToSort()
        Description copied from interface: ArrayPane
        Get the column to be sorted
        Specified by:
        getColumnToSort in interface ArrayPane
        Returns:
        The column number.
      • setColumnToSort

        public void setColumnToSort​(int columnNumber)
        Description copied from interface: ArrayPane
        Modify the column number the sort will be based on.
        Specified by:
        setColumnToSort in interface ArrayPane
        Parameters:
        columnNumber - The column to be sorted
      • print

        public String print()
        Description copied from interface: ArrayPane
        Print the array line in an html format.
        Specified by:
        print in interface ArrayPane
        Specified by:
        print in interface SimpleGraphicElement
        Returns:
        The html code, representing the array pane
      • getSession

        public javax.servlet.http.HttpSession getSession()
        Description copied from interface: ArrayPane
        Get the session in which the ArrayPane will keep its state.
        Specified by:
        getSession in interface ArrayPane
        Returns:
        The session
      • getRequest

        public javax.servlet.ServletRequest getRequest()
        Description copied from interface: ArrayPane
        Get the request that can contains some parameters for the ArrayPane (sort action...)
        Specified by:
        getRequest in interface ArrayPane
        Returns:
        The entering request
      • setRoutingAddress

        public void setRoutingAddress​(String address)
        This method sets the routing address. This is actually the URL of the page to which requests will be routed when the user clicks on a column header link.
        Specified by:
        setRoutingAddress in interface ArrayPane
        Parameters:
        address -
      • getSortable

        public boolean getSortable()
        Description copied from interface: ArrayPane
        Get global array columns behaviour for sort. By default, all colums are sortable.
        Specified by:
        getSortable in interface ArrayPane
        Returns:
        True, if the array is sortable, false if not.
      • setSortable

        public void setSortable​(boolean sortable)
        Set all array columns to be sortable or not. By default, all colums are sortable.
        Specified by:
        setSortable in interface ArrayPane
        Parameters:
        sortable - Set sortable to false if you want all the table to be unsortable.
      • getSortMode

        public int getSortMode()
        Description copied from interface: ArrayPane
        Get the sort mode for all columns.
        Specified by:
        getSortMode in interface ArrayPane
        Returns:
        The sort mode.
      • setSortMode

        public void setSortMode​(int mode)
        This methods sets the sort mode for all columns. The columns cells may or may not take this value into account.
        Specified by:
        setSortMode in interface ArrayPane
        Parameters:
        mode - The new sort mode.
      • setCellsConfiguration

        public void setCellsConfiguration​(int spacing,
                                          int padding,
                                          int borderWidth)
        This method allows for the change of cell presentation values. A negative value means 'do not change this value'
        Specified by:
        setCellsConfiguration in interface ArrayPane
        Parameters:
        spacing -
        padding -
        borderWidth -
      • getCellSpacing

        public int getCellSpacing()
      • getCellPadding

        public int getCellPadding()
      • getCellBorderWidth

        public int getCellBorderWidth()
      • getPaginationJavaScriptCallback

        public String getPaginationJavaScriptCallback()
      • isXHTML

        public boolean isXHTML()
      • setXHTML

        public void setXHTML​(boolean xhtml)
        Specified by:
        setXHTML in interface ArrayPane
      • getExportData

        public boolean getExportData()
        Specified by:
        getExportData in interface ArrayPane
        Returns:
        true if the current array pane can be exported, false else if
      • setExportData

        public void setExportData​(boolean exportData)
        Specified by:
        setExportData in interface ArrayPane
        Parameters:
        exportData - enable/disable export data from array pane
      • getExportDataURL

        public String getExportDataURL()
        Specified by:
        getExportDataURL in interface ArrayPane
        Returns:
        export data URL used to export current ArrayPane data
      • setExportDataURL

        public void setExportDataURL​(String exportDataURL)
        Specified by:
        setExportDataURL in interface ArrayPane
        Parameters:
        exportDataURL - the URL to set used to export array pane data
      • getExportUrl

        protected String getExportUrl()
        Returns:
        the export array pane URL
      • isSortableLines

        public boolean isSortableLines()
      • setSortableLines

        public void setSortableLines​(boolean sortableLines)
        Specified by:
        setSortableLines in interface ArrayPane
      • getUrl

        public String getUrl()
      • getIconsPath

        public String getIconsPath()
      • getAlignement

        public String getAlignement()
      • setAlignement

        public void setAlignement​(String alignement)
      • printSortJavascriptFunction

        protected String printSortJavascriptFunction()
      • getUpdateSortJavascriptCallback

        public String getUpdateSortJavascriptCallback()
      • isPaginationOptimized

        protected boolean isPaginationOptimized()
        Indicates if the pagination is optimized, the is to say if the array contains only the lines which will be printed to the user whereas the array could provides many other pages.
        Returns:
        true if the pagination is optimized.
      • getNbItems

        protected int getNbItems()
        Gets the number of items the list can provides.
        Returns:
        the total number of items.