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 intprivate booleanprivate booleanprivate final Objectstatic booleanprivate booleanprivate intprivate booleanprivate intprotected final Objectprivate ArrayList<TableRowMouseListener> protected Map<String, TableCellSWTBase> private final TableRowCoreprivate Objectprivate final TableViewSWTprivate intprotected booleanFields inherited from interface TableRowCore
ID_EXPANDOHITAREA, ID_EXPANDOHITCOLUMN -
Constructor Summary
ConstructorsConstructorDescriptionTableRowSWTBase(Object lock, TableRowCore parentRow, TableViewSWT tv, Object dataSource) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMouseListener(TableRowMouseListener listener) Adds a listener that triggers when this TableRow has a mouse event.booleanvoidclearCellFlag(int flag, boolean subRows) voiddelete()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 deletingbooleandoesAnyCellHaveFlag(int flag) intgetAlpha()abstract org.eclipse.swt.graphics.Colorabstract org.eclipse.swt.graphics.RectangleGet a previously stored valueRetrieve the data object associated with the current table row.getDataSource(boolean bCoreObject) Retrieve the Data Source related to this rowintabstract org.eclipse.swt.graphics.ColorintgetIndex()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()intvoidInvalidates Rowvoidinvalidate(boolean mustRefresh) voidbooleanbooleanbooleanbooleanbooleanbooleanRetrieve whether the row is selected by the userbooleanisShown()booleanisValid()Validility of the row's cells.booleanRetreive whether the row is visible to the user.voidlocationChanged(int iStartColumn) Location of a column has changedvoidredraw()like refresh, except a different name to confuse us.refresh(boolean bDoGraphics) Refresh all the cells in the rowrefresh(boolean bDoGraphics, boolean bVisible) voidremoveMouseListener(TableRowMouseListener listener) Remove a previously added TableRowMouseListenerbooleansetAlpha(int alpha) abstract voidsetBackgroundImage(org.eclipse.swt.graphics.Image image) voidsetCellFlag(int flag) voidStore a value against the table rowvoidsetExpanded(boolean b) booleansetFontStyle(int style) abstract booleansetIconSize(org.eclipse.swt.graphics.Point pt) voidsetRequestAttention(boolean on) voidsetSelected(boolean selected) booleansetShown(boolean b, boolean force) booleansetTableItem(int newIndex) Link the row to a SWT TableItemvoidsetUpToDate(boolean upToDate) booleansetVisibleRowIndex(int index) abstract voidsetWidgetSelected(boolean selected) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface TableRow
getTableCellMethods inherited from interface TableRowCore
fakeRedraw, getHeight, getLineHeight, getSortColumnCells, getSubItemCount, getSubRow, getSubRowsRecursive, getSubRowsWithNull, isHidden, isInPaintItem, linkSubItem, redraw, refilter, removeSubRow, setHeight, setSortColumn, setSubItemCount, setSubItems, sortSubRowsMethods inherited from interface 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:TableRowCoreInvalidates Row- Specified by:
invalidatein interfaceTableRowCore
-
invalidate
public void invalidate(boolean mustRefresh) - Specified by:
invalidatein 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:TableRowCoreDon'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:
deletein interfaceTableRowCore
-
refresh
Description copied from interface:TableRowCoreRefresh all the cells in the row- Specified by:
refreshin interfaceTableRowCore- Parameters:
bDoGraphics- Refresh graphic cells to
-
locationChanged
public void locationChanged(int iStartColumn) Description copied from interface:TableRowCoreLocation of a column has changed- Specified by:
locationChangedin interfaceTableRowCore- Parameters:
iStartColumn- Cells starting at this value may need repainting XXX Rename to cellLocationChanged?
-
getDataSource
Description copied from interface:TableRowCoreRetrieve the Data Source related to this row- Specified by:
getDataSourcein 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:
getIndexin interfaceTableRow- Specified by:
getIndexin interfaceTableRowCore
-
setVisibleRowIndex
public boolean setVisibleRowIndex(int index) - Specified by:
setVisibleRowIndexin interfaceTableRowCore
-
getVisibleRowIndex
public int getVisibleRowIndex()- Specified by:
getVisibleRowIndexin interfaceTableRowCore
-
getTableCellCore
Description copied from interface:TableRowCoreRetrieve a cell based on the supplied value- Specified by:
getTableCellCorein 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:TableRowCoreRetreive whether the row is visible to the user.- Specified by:
isVisiblein interfaceTableRowCore- Returns:
- visibility state
-
setTableItem
public boolean setTableItem(int newIndex) Description copied from interface:TableRowCoreLink the row to a SWT TableItem- Specified by:
setTableItemin 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:
setSelectedin interfaceTableRowCore
-
isRowDisposed
public boolean isRowDisposed()- Specified by:
isRowDisposedin interfaceTableRowCore
-
setUpToDate
public void setUpToDate(boolean upToDate) - Specified by:
setUpToDatein interfaceTableRowCore
-
refresh
- Specified by:
refreshin interfaceTableRowCore- Returns:
- List of invalid cells
-
getView
- Specified by:
getViewin interfaceTableRow- Specified by:
getViewin interfaceTableRowCore- Specified by:
getViewin interfaceTableRowSWT- Returns:
-
addMouseListener
Description copied from interface:TableRowAdds a listener that triggers when this TableRow has a mouse event.- Specified by:
addMouseListenerin interfaceTableRow- Parameters:
listener-
-
removeMouseListener
Description copied from interface:TableRowRemove a previously added TableRowMouseListener- Specified by:
removeMouseListenerin interfaceTableRow- Parameters:
listener- Previously added listener
-
invokeMouseListeners
- Specified by:
invokeMouseListenersin interfaceTableRowCore- Parameters:
event-
-
isMouseOver
public boolean isMouseOver()- Specified by:
isMouseOverin interfaceTableRowCore- Returns:
-
canExpand
public boolean canExpand() -
isExpanded
public boolean isExpanded()- Specified by:
isExpandedin interfaceTableRowCore
-
setExpanded
public void setExpanded(boolean b) - Specified by:
setExpandedin interfaceTableRowCore
-
getParentRowCore
- Specified by:
getParentRowCorein interfaceTableRowCore
-
getDataSource
Description copied from interface:TableRowRetrieve the data object associated with the current table row.- Specified by:
getDataSourcein interfaceTableRow- Returns:
- The return type is dependent upon which table the cell is for:
TABLE_MYTORRENTS_*:Downloadobject for the current row
TABLE_TORRENT_PEERS:Peerobject for the current row
TABLE_TORRENT_FILES:DiskManagerFileInfoobject for the current row
TABLE_MYTRACKER:TrackerTorrentobject for the current row
TABLE_MYSHARES:ShareResourceobject for the current row
remaining TABLE_* constants: undefined or null
-
getTableID
Description copied from interface:TableRowReturns which table the row is being displayed in.- Specified by:
getTableIDin interfaceTableRow- Returns:
TableManager.TABLE_* constant
-
setRequestAttention
public void setRequestAttention(boolean on) - Specified by:
setRequestAttentionin interfaceTableRowCore
-
isRequestAttention
public boolean isRequestAttention() -
isValid
-
getTableCell
Description copied from interface:TableRowRetrieve a cell based on its column name- Specified by:
getTableCellin 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:TableRowRetrieve whether the row is selected by the user- Specified by:
isSelectedin interfaceTableRow- Returns:
- selection status
-
isFocused
public boolean isFocused() -
getData
-
setData
-
setIconSize
public abstract boolean setIconSize(org.eclipse.swt.graphics.Point pt) - Specified by:
setIconSizein interfaceTableRowSWT
-
getForeground
public abstract org.eclipse.swt.graphics.Color getForeground()- Specified by:
getForegroundin interfaceTableRowSWT
-
getBackground
public abstract org.eclipse.swt.graphics.Color getBackground()- Specified by:
getBackgroundin interfaceTableRowSWT
-
getTableCellSWT
- Specified by:
getTableCellSWTin interfaceTableRowSWT- Parameters:
name-- Returns:
-
getBounds
public abstract org.eclipse.swt.graphics.Rectangle getBounds()- Specified by:
getBoundsin interfaceTableRowSWT
-
setBackgroundImage
public abstract void setBackgroundImage(org.eclipse.swt.graphics.Image image) - Specified by:
setBackgroundImagein interfaceTableRowSWT
-
getFontStyle
public int getFontStyle()- Specified by:
getFontStylein interfaceTableRowSWT- Returns:
-
setFontStyle
public boolean setFontStyle(int style) - Specified by:
setFontStylein interfaceTableRowSWT
-
getAlpha
public int getAlpha()- Specified by:
getAlphain interfaceTableRowSWT- Returns:
-
setAlpha
public boolean setAlpha(int alpha) - Specified by:
setAlphain interfaceTableRowSWT
-
setWidgetSelected
public abstract void setWidgetSelected(boolean selected) - Specified by:
setWidgetSelectedin interfaceTableRowSWT- Parameters:
selected-
-
isShown
public boolean isShown()- Specified by:
isShownin interfaceTableRowSWT
-
setShown
public boolean setShown(boolean b, boolean force) - Specified by:
setShownin interfaceTableRowCore- Parameters:
b-force-- Returns:
- true: changed
-
redraw
public void redraw()Description copied from interface:TableRowCorelike refresh, except a different name to confuse us.- Specified by:
redrawin interfaceTableRowCore
-