Class TableRowSWTBase
java.lang.Object
com.biglybt.ui.swt.views.table.impl.TableRowSWTBase
- All Implemented Interfaces:
TableRow
,TableRowCore
,TableRowSWT
- Direct Known Subclasses:
TableRowPainted
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private boolean
private boolean
private final Object
static boolean
private boolean
private int
private boolean
private int
protected final Object
private ArrayList<TableRowMouseListener>
protected Map<String,
TableCellSWTBase> private final TableRowCore
private Object
private final TableViewSWT
private int
protected boolean
Fields inherited from interface com.biglybt.ui.common.table.TableRowCore
ID_EXPANDOHITAREA, ID_EXPANDOHITCOLUMN
-
Constructor Summary
ConstructorsConstructorDescriptionTableRowSWTBase
(Object lock, TableRowCore parentRow, TableViewSWT tv, Object dataSource) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addMouseListener
(TableRowMouseListener listener) Adds a listener that triggers when this TableRow has a mouse event.boolean
void
clearCellFlag
(int flag, boolean subRows) void
delete()
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 deletingboolean
doesAnyCellHaveFlag
(int flag) int
getAlpha()
abstract org.eclipse.swt.graphics.Color
abstract org.eclipse.swt.graphics.Rectangle
Get a previously stored valueRetrieve the data object associated with the current table row.getDataSource
(boolean bCoreObject) Retrieve the Data Source related to this rowint
abstract org.eclipse.swt.graphics.Color
int
getIndex()
getTableCell
(String field) Retrieve a cell based on its column namegetTableCellCore
(String name) Retrieve a cell based on the supplied valuegetTableCellSWT
(String name) Returns which table the row is being displayed in.TableViewSWT<?>
getView()
int
void
Invalidates Rowvoid
invalidate
(boolean mustRefresh) void
boolean
boolean
boolean
boolean
boolean
boolean
Retrieve whether the row is selected by the userboolean
isShown()
boolean
isValid()
Validility of the row's cells.boolean
Retreive whether the row is visible to the user.void
locationChanged
(int iStartColumn) Location of a column has changedvoid
redraw()
like refresh, except a different name to confuse us.refresh
(boolean bDoGraphics) Refresh all the cells in the rowrefresh
(boolean bDoGraphics, boolean bVisible) void
removeMouseListener
(TableRowMouseListener listener) Remove a previously added TableRowMouseListenerboolean
setAlpha
(int alpha) abstract void
setBackgroundImage
(org.eclipse.swt.graphics.Image image) void
setCellFlag
(int flag) void
Store a value against the table rowvoid
setExpanded
(boolean b) boolean
setFontStyle
(int style) abstract boolean
setIconSize
(org.eclipse.swt.graphics.Point pt) void
setRequestAttention
(boolean on) void
setSelected
(boolean selected) boolean
setShown
(boolean b, boolean force) boolean
setTableItem
(int newIndex) Link the row to a SWT TableItemvoid
setUpToDate
(boolean upToDate) boolean
setVisibleRowIndex
(int index) abstract void
setWidgetSelected
(boolean selected) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.biglybt.pif.ui.tables.TableRow
getTableCell
Methods inherited from interface com.biglybt.ui.common.table.TableRowCore
fakeRedraw, getHeight, getLineHeight, getSortColumnCells, getSubItemCount, getSubRow, getSubRowsRecursive, getSubRowsWithNull, isHidden, isInPaintItem, linkSubItem, redraw, refilter, removeSubRow, setHeight, setSortColumn, setSubItemCount, setSubItems, sortSubRows
Methods inherited from interface com.biglybt.ui.swt.views.table.TableRowSWT
getFullHeight, requestBackgroundColor, requestForegroundColor
-
Field Details
-
DEBUG_ROW_PAINT
public static boolean DEBUG_ROW_PAINT -
lock
-
tv
-
parentRow
-
coreDataSource
-
lastIndex
private int lastIndex -
visibleRowIndex
private int visibleRowIndex -
mTableCells
-
bDisposed
private boolean bDisposed -
pluginDataSource
-
wasShown
protected boolean wasShown -
bSetNotUpToDateLastRefresh
private boolean bSetNotUpToDateLastRefresh -
mouseListeners
-
dataList
-
alpha
private int alpha -
fontStyle
private int fontStyle -
expanded
private boolean expanded -
isAttention
private boolean isAttention
-
-
Constructor Details
-
TableRowSWTBase
-
-
Method Details
-
invalidate
public void invalidate()Description copied from interface:TableRowCore
Invalidates Row- Specified by:
invalidate
in interfaceTableRowCore
-
invalidate
public void invalidate(boolean mustRefresh) - Specified by:
invalidate
in interfaceTableRowCore
-
doesAnyCellHaveFlag
public boolean doesAnyCellHaveFlag(int flag) -
setCellFlag
public void setCellFlag(int flag) -
clearCellFlag
public void clearCellFlag(int flag, boolean subRows) -
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 interfaceTableRowCore
-
refresh
Description copied from interface:TableRowCore
Refresh all the cells in the row- Specified by:
refresh
in interfaceTableRowCore
- 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 interfaceTableRowCore
- Parameters:
iStartColumn
- Cells starting at this value may need repainting XXX Rename to cellLocationChanged?
-
getDataSource
Description copied from interface:TableRowCore
Retrieve the Data Source related to this row- Specified by:
getDataSource
in interfaceTableRowCore
- Parameters:
bCoreObject
- true - return a core object
false - return a plugin object- Returns:
- the Data Source Object related to the row
-
getIndex
public int getIndex()- Specified by:
getIndex
in interfaceTableRow
- Specified by:
getIndex
in interfaceTableRowCore
-
setVisibleRowIndex
public boolean setVisibleRowIndex(int index) - Specified by:
setVisibleRowIndex
in interfaceTableRowCore
-
getVisibleRowIndex
public int getVisibleRowIndex()- Specified by:
getVisibleRowIndex
in interfaceTableRowCore
-
getTableCellCore
Description copied from interface:TableRowCore
Retrieve a cell based on the supplied value- Specified by:
getTableCellCore
in interfaceTableRowCore
- 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 interfaceTableRowCore
- 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 interfaceTableRowCore
- 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 interfaceTableRowCore
-
isRowDisposed
public boolean isRowDisposed()- Specified by:
isRowDisposed
in interfaceTableRowCore
-
setUpToDate
public void setUpToDate(boolean upToDate) - Specified by:
setUpToDate
in interfaceTableRowCore
-
refresh
- Specified by:
refresh
in interfaceTableRowCore
- Returns:
- List of invalid cells
-
getView
- Specified by:
getView
in interfaceTableRow
- Specified by:
getView
in interfaceTableRowCore
- Specified by:
getView
in interfaceTableRowSWT
-
addMouseListener
Description copied from interface:TableRow
Adds a listener that triggers when this TableRow has a mouse event.- Specified by:
addMouseListener
in interfaceTableRow
-
removeMouseListener
Description copied from interface:TableRow
Remove a previously added TableRowMouseListener- Specified by:
removeMouseListener
in interfaceTableRow
- Parameters:
listener
- Previously added listener
-
invokeMouseListeners
- Specified by:
invokeMouseListeners
in interfaceTableRowCore
-
isMouseOver
public boolean isMouseOver()- Specified by:
isMouseOver
in interfaceTableRowCore
- Returns:
-
canExpand
public boolean canExpand() -
isExpanded
public boolean isExpanded()- Specified by:
isExpanded
in interfaceTableRowCore
-
setExpanded
public void setExpanded(boolean b) - Specified by:
setExpanded
in interfaceTableRowCore
-
getParentRowCore
- Specified by:
getParentRowCore
in interfaceTableRowCore
-
getDataSource
Description copied from interface:TableRow
Retrieve the data object associated with the current table row.- Specified by:
getDataSource
in interfaceTableRow
- 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
Description copied from interface:TableRow
Returns which table the row is being displayed in.- Specified by:
getTableID
in interfaceTableRow
- Returns:
TableManager
.TABLE_* constant
-
setRequestAttention
public void setRequestAttention(boolean on) - Specified by:
setRequestAttention
in interfaceTableRowCore
-
isRequestAttention
public boolean isRequestAttention() -
isValid
public boolean isValid()Description copied from interface:TableRow
Validility of the row's cells. -
getTableCell
Description copied from interface:TableRow
Retrieve a cell based on its column name- Specified by:
getTableCell
in interfaceTableRow
- 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 interfaceTableRow
- Returns:
- selection status
-
isFocused
public boolean isFocused() -
getData
Description copied from interface:TableRow
Get a previously stored value -
setData
Description copied from interface:TableRow
Store a value against the table row -
setIconSize
public abstract boolean setIconSize(org.eclipse.swt.graphics.Point pt) - Specified by:
setIconSize
in interfaceTableRowSWT
-
getForeground
public abstract org.eclipse.swt.graphics.Color getForeground()- Specified by:
getForeground
in interfaceTableRowSWT
-
getBackground
public abstract org.eclipse.swt.graphics.Color getBackground()- Specified by:
getBackground
in interfaceTableRowSWT
-
getTableCellSWT
- Specified by:
getTableCellSWT
in interfaceTableRowSWT
- Returns:
-
getBounds
public abstract org.eclipse.swt.graphics.Rectangle getBounds()- Specified by:
getBounds
in interfaceTableRowSWT
-
setBackgroundImage
public abstract void setBackgroundImage(org.eclipse.swt.graphics.Image image) - Specified by:
setBackgroundImage
in interfaceTableRowSWT
-
getFontStyle
public int getFontStyle()- Specified by:
getFontStyle
in interfaceTableRowSWT
- Returns:
-
setFontStyle
public boolean setFontStyle(int style) - Specified by:
setFontStyle
in interfaceTableRowSWT
-
getAlpha
public int getAlpha()- Specified by:
getAlpha
in interfaceTableRowSWT
- Returns:
-
setAlpha
public boolean setAlpha(int alpha) - Specified by:
setAlpha
in interfaceTableRowSWT
-
setWidgetSelected
public abstract void setWidgetSelected(boolean selected) - Specified by:
setWidgetSelected
in interfaceTableRowSWT
-
isShown
public boolean isShown()- Specified by:
isShown
in interfaceTableRowSWT
-
setShown
public boolean setShown(boolean b, boolean force) - Specified by:
setShown
in interfaceTableRowSWT
- 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 interfaceTableRowCore
-