org.gudy.azureus2.ui.swt.views.table.painted
Class TableRowPainted

java.lang.Object
  extended by org.gudy.azureus2.ui.swt.views.table.impl.TableRowSWTBase
      extended by org.gudy.azureus2.ui.swt.views.table.painted.TableRowPainted
All Implemented Interfaces:
TableRowCore, TableRow, TableRowSWT

public class TableRowPainted
extends TableRowSWTBase


Field Summary
static org.eclipse.swt.graphics.Color[] alternatingColors
           
 
Fields inherited from class org.gudy.azureus2.ui.swt.views.table.impl.TableRowSWTBase
DEBUG_ROW_PAINT, lock, mTableCells, wasShown
 
Constructor Summary
TableRowPainted(TableRowCore parentRow, TableViewPainted tv, Object dataSource, boolean triggerHeightChange)
           
 
Method Summary
protected  void debug(String s)
           
 void delete()
          Delete the row
 org.eclipse.swt.graphics.Color getBackground()
           
 org.eclipse.swt.graphics.Rectangle getBounds()
           
 org.eclipse.swt.graphics.Rectangle getDrawBounds()
           
 org.eclipse.swt.graphics.Point getDrawOffset()
           
 org.eclipse.swt.graphics.Color getForeground()
          Retreive the color of the row
 int getFullHeight()
           
 int getHeight()
           
 TableCellCore getSortColumnCell(String hint)
           
 int getSubItemCount()
           
 TableRowCore getSubRow(int pos)
           
 TableRowCore[] getSubRowsWithNull()
           
 TableCell getTableCell(String field)
          Retrieve a cell based on its column name
 TableCellCore getTableCellCore(String name)
          Retrieve a cell based on the supplied value
 TableCellSWT getTableCellSWT(String name)
           
 TableViewPainted getViewPainted()
           
 void heightChanged(int oldHeight, int newHeight)
           
 TableRowCore linkSubItem(int indexOf)
           
 void redraw(boolean doChildren)
           
 void redraw(boolean doChildren, boolean immediateRedraw)
           
 List<TableCellCore> refresh(boolean bDoGraphics, boolean bVisible)
           
 void removeSubRow(Object datasource)
           
 void setBackgroundImage(org.eclipse.swt.graphics.Image image)
           
 boolean setDrawOffset(org.eclipse.swt.graphics.Point drawOffset)
           
 void setExpanded(boolean b)
           
 boolean setForeground(org.eclipse.swt.graphics.Color color)
          Set the color of the row
 boolean setHeight(int newHeight)
          Adjust cell height.
 boolean setHeight(int newHeight, boolean trigger)
           
 boolean setIconSize(org.eclipse.swt.graphics.Point pt)
           
 boolean setShown(boolean b, boolean force)
           
 void setSortColumn(String columnID)
           
 void setSubItemCount(int length)
           
 void setSubItems(Object[] datasources)
           
 void setWidgetSelected(boolean selected)
           
 void subRowHeightChanged(TableRowCore row, int oldHeight, int newHeight)
           
 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)
           
 
Methods inherited from class org.gudy.azureus2.ui.swt.views.table.impl.TableRowSWTBase
addMouseListener, canExpand, clearCellFlag, doesAnyCellHaveFlag, getAlpha, getData, getDataSource, getDataSource, getFontStyle, getIndex, getParentRowCore, getTableID, getView, invalidate, invalidate, invokeMouseListeners, isExpanded, isFocused, isInPaintItem, isMouseOver, isRowDisposed, isSelected, isShown, isValid, isVisible, locationChanged, redraw, refresh, removeMouseListener, setAlpha, setCellFlag, setData, setFontStyle, setForeground, setForeground, setForeground2, setForeground2, setForegroundToErrorColor, setSelected, setTableItem, setTableItem, setUpToDate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

alternatingColors

public static final org.eclipse.swt.graphics.Color[] alternatingColors
Constructor Detail

TableRowPainted

public TableRowPainted(TableRowCore parentRow,
                       TableViewPainted tv,
                       Object dataSource,
                       boolean triggerHeightChange)
Method Detail

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 -

refresh

public List<TableCellCore> refresh(boolean bDoGraphics,
                                   boolean bVisible)
Specified by:
refresh in interface TableRowCore
Overrides:
refresh in class TableRowSWTBase

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)

subRowHeightChanged

public void subRowHeightChanged(TableRowCore row,
                                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
Delete the row

Specified by:
delete in interface TableRowCore
Overrides:
delete in class TableRowSWTBase

setSubItemCount

public void setSubItemCount(int length)

getSubItemCount

public int getSubItemCount()

linkSubItem

public TableRowCore linkSubItem(int indexOf)
Returns:

setSubItems

public void setSubItems(Object[] datasources)

getSubRowsWithNull

public TableRowCore[] getSubRowsWithNull()

removeSubRow

public void removeSubRow(Object datasource)

setExpanded

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

getSubRow

public TableRowCore getSubRow(int pos)

setForeground

public boolean setForeground(org.eclipse.swt.graphics.Color color)
Description copied from interface: TableRowSWT
Set the color of the row

Specified by:
setForeground in interface TableRowSWT
Specified by:
setForeground in class TableRowSWTBase
Parameters:
color - new color

setIconSize

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

getForeground

public org.eclipse.swt.graphics.Color getForeground()
Description copied from interface: TableRowSWT
Retreive the color of the row

Specified by:
getForeground in interface TableRowSWT
Specified by:
getForeground in class TableRowSWTBase
Returns:
color of the row

getBackground

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

setBackgroundImage

public void setBackgroundImage(org.eclipse.swt.graphics.Image image)
Specified by:
setBackgroundImage in interface TableRowSWT
Specified by:
setBackgroundImage 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)

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

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

getSortColumnCell

public TableCellCore getSortColumnCell(String hint)

setSortColumn

public void setSortColumn(String columnID)