Class TableRowPainted

java.lang.Object
com.biglybt.ui.swt.views.table.impl.TableRowSWTBase
com.biglybt.ui.swt.views.table.painted.TableRowPainted
All Implemented Interfaces:
TableRow, TableRowCore, TableRowSWT

public class TableRowPainted extends TableRowSWTBase
  • Field Details

    • DEBUG_SUBS

      private static final boolean DEBUG_SUBS
      See Also:
    • isFake

      private final boolean isFake
    • drawOffset

      private org.eclipse.swt.graphics.Point drawOffset
    • numSubItems

      private int numSubItems
    • subDataSources

      private Object[] subDataSources
    • subRows

      private TableRowPainted[] subRows
    • subRows_sync

      private final Object subRows_sync
    • subRowsHeightUseAccessors

      private int subRowsHeightUseAccessors
    • sortCells

      private TableCellSWTBase[] sortCells
    • heightUseAccessors

      private int heightUseAccessors
    • isHidden

      private boolean isHidden
    • initializing

      private boolean initializing
    • inPaintItem

      private boolean inPaintItem
    • colorFG

      private org.eclipse.swt.graphics.Color colorFG
    • colorLock

      private Object colorLock
    • FGRequesters

      private CopyOnWriteList<Object[]> FGRequesters
    • BGRequesters

      private CopyOnWriteList<Object[]> BGRequesters
  • Constructor Details

  • Method Details

    • refilter

      public boolean refilter()
    • isHidden

      public boolean isHidden()
    • invalidate

      public void invalidate(boolean mustRefersh)
      Specified by:
      invalidate in interface TableRowCore
      Overrides:
      invalidate in class TableRowSWTBase
    • buildCells

      private void buildCells()
    • destroyCells

      private void destroyCells()
    • getViewPainted

      public TableViewPainted getViewPainted()
    • swt_paintGC

      public void swt_paintGC(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle drawBounds, int rowStartX, int rowStartY, int pos, boolean isTableSelected, boolean isTableEnabled)
      Parameters:
      gc - GC to draw to
      drawBounds - Area that needs redrawing
      rowStartX - where in the GC this row's x-axis starts
      rowStartY - where in the GC this row's y-axis starts
      pos -
    • fakeRedraw

      public void fakeRedraw(String col_name)
      Description copied from interface: TableRowCore
      forces the cell to be refreshed/repainted onto an off-screen area so that any side-effects of the process (e.g. preferred width) can be updated
    • swt_fakeRedraw

      private void swt_fakeRedraw(String col_name)
    • isInPaintItem

      public boolean isInPaintItem()
      Returns:
    • swt_paintCell

      private boolean swt_paintCell(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle cellBounds, TableCellSWTBase cell, org.eclipse.swt.graphics.Color shadowColor, boolean enableColumnBG, boolean enableColumnFG, boolean isAltColor)
    • getRandomFont

      private org.eclipse.swt.graphics.Font getRandomFont()
    • refresh

      public List<TableCellCore> refresh(boolean bDoGraphics, boolean bVisible)
      Specified by:
      refresh in interface TableRowCore
      Overrides:
      refresh in class TableRowSWTBase
      Returns:
      List of invalid cells
    • redraw

      public void redraw(boolean doChildren)
    • redraw

      public void redraw(boolean doChildren, boolean immediateRedraw)
    • debug

      protected void debug(String s)
    • getBounds

      public org.eclipse.swt.graphics.Rectangle getBounds()
      Specified by:
      getBounds in interface TableRowSWT
      Specified by:
      getBounds in class TableRowSWTBase
    • getDrawBounds

      public org.eclipse.swt.graphics.Rectangle getDrawBounds()
    • getFullHeight

      public int getFullHeight()
    • getDrawOffset

      public org.eclipse.swt.graphics.Point getDrawOffset()
    • heightChanged

      public void heightChanged(int oldHeight, int newHeight)
    • setSubRowsHeight

      private void setSubRowsHeight(int h)
    • subRowHeightChanged

      protected void subRowHeightChanged(int oldHeight, int newHeight)
    • setDrawOffset

      public boolean setDrawOffset(org.eclipse.swt.graphics.Point drawOffset)
    • setWidgetSelected

      public void setWidgetSelected(boolean selected)
      Specified by:
      setWidgetSelected in interface TableRowSWT
      Specified by:
      setWidgetSelected in class TableRowSWTBase
    • setShown

      public boolean setShown(boolean b, boolean force)
      Specified by:
      setShown in interface TableRowSWT
      Overrides:
      setShown in class TableRowSWTBase
      Returns:
      true: changed
    • delete

      public void delete()
      Description copied from interface: TableRowCore
      Don't call this directly to delete a row, it won't work - it is for internal use to allow an implementation to take action on deleting
      Specified by:
      delete in interface TableRowCore
      Overrides:
      delete in class TableRowSWTBase
    • deleteExistingSubRows

      private void deleteExistingSubRows()
    • setSubItemCount

      public void setSubItemCount(int length)
    • setSubItemCount

      private void setSubItemCount(int length, boolean triggerHeightListener)
    • getSubItemCount

      public int getSubItemCount()
    • linkSubItem

      public TableRowCore linkSubItem(int indexOf)
      Returns:
    • setSubItems

      public void setSubItems(Object[] datasources)
    • setSubItems

      private void setSubItems(Object[] datasources, boolean triggerHeightListeners)
    • getSubRowsWithNull

      public TableRowCore[] getSubRowsWithNull()
    • getSubRowsRecursive

      public TableRowCore[] getSubRowsRecursive(boolean includeHidden)
    • getSubRowsRecursive

      private void getSubRowsRecursive(List<TableRowCore> result, TableRowCore[] rows, boolean includeHidden)
    • removeSubRow

      public void removeSubRow(Object datasource)
    • setExpanded

      public void setExpanded(boolean b)
      Specified by:
      setExpanded in interface TableRowCore
      Overrides:
      setExpanded in class TableRowSWTBase
    • setExpanded

      private void setExpanded(boolean b, boolean triggerHeightChange)
    • getSubRow

      public TableRowCore getSubRow(int pos)
    • getForeground

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

      public org.eclipse.swt.graphics.Color getBackground()
      Specified by:
      getBackground in interface TableRowSWT
      Specified by:
      getBackground in class TableRowSWTBase
    • requestForegroundColor

      public void requestForegroundColor(TableViewSWT.ColorRequester requester, org.eclipse.swt.graphics.Color color)
    • requestBackgroundColor

      public void requestBackgroundColor(TableViewSWT.ColorRequester requester, org.eclipse.swt.graphics.Color color)
    • requestColor

      private void requestColor(CopyOnWriteList<Object[]> cow, TableViewSWT.ColorRequester requester, org.eclipse.swt.graphics.Color color)
    • setBackgroundImage

      public void setBackgroundImage(org.eclipse.swt.graphics.Image image)
      Specified by:
      setBackgroundImage in interface TableRowSWT
      Specified by:
      setBackgroundImage in class TableRowSWTBase
    • setIconSize

      public boolean setIconSize(org.eclipse.swt.graphics.Point pt)
      Specified by:
      setIconSize in interface TableRowSWT
      Specified by:
      setIconSize in class TableRowSWTBase
    • getHeight

      public int getHeight()
    • setHeight

      public boolean setHeight(int newHeight)
      Description copied from interface: TableRowCore
      Adjust cell height. Don't use if any other column/cell uses setImage()
      Parameters:
      newHeight - new Row Height. Will not reduce row's height (SWT)
      Returns:
      success level
    • setHeight

      public boolean setHeight(int newHeight, boolean trigger)
    • getLineHeight

      public int getLineHeight()
      Returns:
      Height in px of one standard line of text.
      # of rows of text can be calculated by using TableRowCore.getHeight() / TableRowCore.getLineHeight()
    • getTableCellCore

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

      public TableCell getTableCell(TableColumn column)
    • getTableCellSWT

      public TableCellSWT getTableCellSWT(String name)
      Specified by:
      getTableCellSWT in interface TableRowSWT
      Overrides:
      getTableCellSWT in class TableRowSWTBase
      Returns:
    • getTableCell

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

      public TableCellCore[] getSortColumnCells(String hint)
    • setSortColumn

      public void setSortColumn(String... columnIDs)
    • sortSubRows

      public boolean sortSubRows(TableColumnCore col)