Class TableRowSWTBase

    • Field Detail

      • DEBUG_ROW_PAINT

        public static boolean DEBUG_ROW_PAINT
      • lock

        protected final java.lang.Object lock
      • coreDataSource

        private final java.lang.Object coreDataSource
      • lastIndex

        private int lastIndex
      • visibleRowIndex

        private int visibleRowIndex
      • mTableCells

        protected java.util.Map<java.lang.String,​TableCellSWTBase> mTableCells
      • bDisposed

        private boolean bDisposed
      • pluginDataSource

        private java.lang.Object pluginDataSource
      • wasShown

        protected boolean wasShown
      • bSetNotUpToDateLastRefresh

        private boolean bSetNotUpToDateLastRefresh
      • dataList

        private java.util.Map<java.lang.String,​java.lang.Object> dataList
      • alpha

        private int alpha
      • fontStyle

        private int fontStyle
      • expanded

        private boolean expanded
      • isAttention

        private boolean isAttention
    • Constructor Detail

      • TableRowSWTBase

        public TableRowSWTBase​(java.lang.Object lock,
                               TableRowCore parentRow,
                               TableViewSWT tv,
                               java.lang.Object dataSource)
    • Method Detail

      • invalidate

        public void invalidate​(boolean mustRefersh)
        Specified by:
        invalidate in interface TableRowCore
      • doesAnyCellHaveFlag

        public boolean doesAnyCellHaveFlag​(int flag)
      • setCellFlag

        public void setCellFlag​(int flag)
      • clearCellFlag

        public void clearCellFlag​(int flag,
                                  boolean subRows)
      • refresh

        public java.util.List refresh​(boolean bDoGraphics)
        Description copied from interface: TableRowCore
        Refresh all the cells in the row
        Specified by:
        refresh in interface TableRowCore
        Parameters:
        bDoGraphics - Refresh graphic cells to
      • locationChanged

        public void locationChanged​(int iStartColumn)
        Description copied from interface: TableRowCore
        Location of a column has changed
        Specified by:
        locationChanged in interface TableRowCore
        Parameters:
        iStartColumn - Cells starting at this value may need repainting XXX Rename to cellLocationChanged?
      • getDataSource

        public java.lang.Object getDataSource​(boolean bCoreObject)
        Description copied from interface: TableRowCore
        Retrieve the Data Source related to this row
        Specified by:
        getDataSource in interface TableRowCore
        Parameters:
        bCoreObject - true - return a core object
        false - return a plugin object
        Returns:
        the Data Source Object related to the row
      • getTableCellCore

        public TableCellCore getTableCellCore​(java.lang.String name)
        Description copied from interface: TableRowCore
        Retrieve a cell based on the supplied value
        Specified by:
        getTableCellCore in interface TableRowCore
        Parameters:
        name - Column name of the cell to be returned
        Returns:
        TableCellCore object related to this row and the specified column
      • isVisible

        public boolean isVisible()
        Description copied from interface: TableRowCore
        Retreive whether the row is visible to the user.
        Specified by:
        isVisible in interface TableRowCore
        Returns:
        visibility state
      • setTableItem

        public boolean setTableItem​(int newIndex)
        Description copied from interface: TableRowCore
        Link the row to a SWT TableItem
        Specified by:
        setTableItem in interface TableRowCore
        Parameters:
        newIndex - new position row should be
        Returns:
        false - already linked to that item at that index
      • setSelected

        public void setSelected​(boolean selected)
        Specified by:
        setSelected in interface TableRowCore
      • setUpToDate

        public void setUpToDate​(boolean upToDate)
        Specified by:
        setUpToDate in interface TableRowCore
      • refresh

        public java.util.List<TableCellCore> refresh​(boolean bDoGraphics,
                                                     boolean bVisible)
        Specified by:
        refresh in interface TableRowCore
        Returns:
        List of invalid cells
      • removeMouseListener

        public void removeMouseListener​(TableRowMouseListener listener)
        Description copied from interface: TableRow
        Remove a previously added TableRowMouseListener
        Specified by:
        removeMouseListener in interface TableRow
        Parameters:
        listener - Previously added listener
      • canExpand

        public boolean canExpand()
      • getDataSource

        public java.lang.Object getDataSource()
        Description copied from interface: TableRow
        Retrieve the data object associated with the current table row.
        Specified by:
        getDataSource in interface TableRow
        Returns:
        The return type is dependent upon which table the cell is for:
        TABLE_MYTORRENTS_*: Download object for the current row
        TABLE_TORRENT_PEERS: Peer object for the current row
        TABLE_TORRENT_FILES: DiskManagerFileInfo object for the current row
        TABLE_MYTRACKER: TrackerTorrent object for the current row
        TABLE_MYSHARES: ShareResource object for the current row
        remaining TABLE_* constants: undefined or null
      • getTableID

        public java.lang.String getTableID()
        Description copied from interface: TableRow
        Returns which table the row is being displayed in.
        Specified by:
        getTableID in interface TableRow
        Returns:
        TableManager.TABLE_* constant
      • isRequestAttention

        public boolean isRequestAttention()
      • isValid

        public boolean isValid()
        Description copied from interface: TableRow
        Validility of the row's cells.
        Specified by:
        isValid in interface TableRow
        Returns:
        True - Text is the same as last call. You do not need to update unless you have new text to display.
        False - Cell-to-Datasource link has changed, and the text is definitely not valid.
      • getTableCell

        public TableCell getTableCell​(java.lang.String field)
        Description copied from interface: TableRow
        Retrieve a cell based on its column name
        Specified by:
        getTableCell in interface TableRow
        Parameters:
        field - Name/ID of column
        Returns:
        TableCell object related to this row and the column specified
      • isSelected

        public boolean isSelected()
        Description copied from interface: TableRow
        Retrieve whether the row is selected by the user
        Specified by:
        isSelected in interface TableRow
        Returns:
        selection status
      • isFocused

        public boolean isFocused()
      • getData

        public java.lang.Object getData​(java.lang.String id)
        Description copied from interface: TableRow
        Get a previously stored value
        Specified by:
        getData in interface TableRow
        Returns:
      • setData

        public void setData​(java.lang.String id,
                            java.lang.Object data)
        Description copied from interface: TableRow
        Store a value against the table row
        Specified by:
        setData in interface TableRow
      • setIconSize

        public abstract boolean setIconSize​(org.eclipse.swt.graphics.Point pt)
        Specified by:
        setIconSize in interface TableRowSWT
      • getForeground

        public abstract org.eclipse.swt.graphics.Color getForeground()
        Specified by:
        getForeground in interface TableRowSWT
      • getBackground

        public abstract org.eclipse.swt.graphics.Color getBackground()
        Specified by:
        getBackground in interface TableRowSWT
      • getBounds

        public abstract org.eclipse.swt.graphics.Rectangle getBounds()
        Specified by:
        getBounds in interface TableRowSWT
      • setBackgroundImage

        public abstract void setBackgroundImage​(org.eclipse.swt.graphics.Image image)
        Specified by:
        setBackgroundImage in interface TableRowSWT
      • setAlpha

        public boolean setAlpha​(int alpha)
        Specified by:
        setAlpha in interface TableRowSWT
      • setWidgetSelected

        public abstract void setWidgetSelected​(boolean selected)
        Specified by:
        setWidgetSelected in interface TableRowSWT
      • setShown

        public boolean setShown​(boolean b,
                                boolean force)
        Specified by:
        setShown in interface TableRowSWT
        Returns:
        true: changed
      • redraw

        public void redraw()
        Description copied from interface: TableRowCore
        like refresh, except a different name to confuse us.
        Specified by:
        redraw in interface TableRowCore