Class SpreadSheetTableWithButtons

    • Constructor Detail

      • SpreadSheetTableWithButtons

        public SpreadSheetTableWithButtons()
        The default constructor.
      • SpreadSheetTableWithButtons

        public SpreadSheetTableWithButtons​(SpreadSheetTableModel model)
        Initializes the table with the specified model.
        Parameters:
        model - the model to use
    • Method Detail

      • setModel

        public void setModel​(TableModel dataModel)
        Sets the data model for this table to newModel and registers with it for listener notifications from the new data model.
        Overrides:
        setModel in class BaseTableWithButtons
        Parameters:
        dataModel - the new data source for this table
        See Also:
        getModel()
      • setHeaderPopupMenuCustomizer

        public void setHeaderPopupMenuCustomizer​(PopupMenuCustomizer value)
        Sets the popup menu customizer to use (for the header).
        Parameters:
        value - the customizer, null to remove it
      • getHeaderPopupMenuCustomizer

        public PopupMenuCustomizer getHeaderPopupMenuCustomizer()
        Returns the current popup menu customizer (for the header).
        Returns:
        the customizer, null if none set
      • setCellPopupMenuCustomizer

        public void setCellPopupMenuCustomizer​(PopupMenuCustomizer value)
        Sets the popup menu customizer to use (for the cells).
        Parameters:
        value - the customizer, null to remove it
      • getCellPopupMenuCustomizer

        public PopupMenuCustomizer getCellPopupMenuCustomizer()
        Returns the current popup menu customizer (for the cells).
        Returns:
        the customizer, null if none set
      • setCellRenderingCustomizer

        public void setCellRenderingCustomizer​(CellRenderingCustomizer value)
        Sets the renderer.
        Parameters:
        value - the renderer
      • getCellRenderingCustomizer

        public CellRenderingCustomizer getCellRenderingCustomizer()
        Returns the renderer.
        Returns:
        the renderer
      • setShowFormulas

        public void setShowFormulas​(boolean value)
        Sets whether to display the formulas or their calculated values.
        Parameters:
        value - true if to display the formulas rather than the calculated values
      • getShowFormulas

        public boolean getShowFormulas()
        Returns whether to display the formulas or their calculated values.
        Returns:
        true if to display the formulas rather than the calculated values
      • setShowRowColumn

        public void setShowRowColumn​(boolean value)
        Whether to display the column with the row numbers.
        Parameters:
        value - true if to display column
      • getShowRowColumn

        public boolean getShowRowColumn()
        Returns whether the column with the row numbers is displayed.
        Returns:
        true if column displayed
      • setUseSimpleHeader

        public void setUseSimpleHeader​(boolean value)
        Whether to display a simple header or an HTML one with the column indices.
        Parameters:
        value - true if to display simple header
      • getUseSimpleHeader

        public boolean getUseSimpleHeader()
        Returns whether to display a simple header or an HTML one with the column indices.
        Returns:
        true if simple header displayed
      • setReadOnly

        public void setReadOnly​(boolean value)
        Sets whether the table is read-only.
        Parameters:
        value - true if read-only
      • isReadOnly

        public boolean isReadOnly()
        Returns whether the table is read-only.
        Returns:
        true if read-only
      • setModified

        public void setModified​(boolean value)
        Sets whether the table has been modified.
        Parameters:
        value - true if modified
      • isModified

        public boolean isModified()
        Returns whether the table has been modified.
        Returns:
        true if modified
      • setShowCellTypes

        public void setShowCellTypes​(boolean value)
        Sets whether to show the cell types rather than the cell values.
        Parameters:
        value - true if to show cell types
      • getShowCellTypes

        public boolean getShowCellTypes()
        Returns whether to show the cell types rather than the cell values.
        Returns:
        true if showing the cell types
      • sort

        public void sort​(RowComparator comparator)
        Sorts the spreadsheet with the given comparator.
        Parameters:
        comparator - the row comparator to use
      • search

        public void search​(String searchString,
                           boolean regexp)
        Performs a search for the given string. Limits the display of rows to ones containing the search string.
        Parameters:
        searchString - the string to search for
        regexp - whether to perform regular expression matching or just plain string comparison
      • getSeachString

        public String getSeachString()
        Returns the current search string.
        Returns:
        the search string, null if not filtered
      • isRegExpSearch

        public boolean isRegExpSearch()
        Returns whether the last search was a regular expression based one.
        Returns:
        true if last search was a reg exp one
      • toSpreadSheet

        public SpreadSheet toSpreadSheet​(TableRowRange range)
        Returns the underlying sheet.
        Parameters:
        range - the type of rows to return
        Returns:
        the spread sheet
      • toSpreadSheet

        public SpreadSheet toSpreadSheet​(TableRowRange range,
                                         boolean view)
        Returns the underlying sheet.
        Parameters:
        range - the type of rows to return
        view - whether to return only a view (ignored if TableRowRange.ALL)
        Returns:
        the spread sheet
      • setColumnWidthApproach

        public void setColumnWidthApproach​(BaseTable.ColumnWidthApproach value)
        Sets the strategy for setting optimal column widths.
        Parameters:
        value - the strategy
      • getColumnWidthApproach

        public BaseTable.ColumnWidthApproach getColumnWidthApproach()
        Returns the strategy for setting optimal column widths. Default implementation is initialized with "NONE".
        Returns:
        the strategy