Class FakeTableCell
- All Implemented Interfaces:
TableCell, TableCellCore, TableCellSWT, Comparable, EventListener, org.eclipse.swt.events.MouseListener, org.eclipse.swt.events.MouseMoveListener, org.eclipse.swt.events.MouseTrackListener, org.eclipse.swt.events.PaintListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.eclipse.swt.graphics.Rectangleprivate ArrayList<TableCellClipboardListener> private ArrayListprivate ArrayListprivate ArrayListprivate ArrayListprivate org.eclipse.swt.widgets.Compositeprivate Objectprivate Objectprivate ArrayListprivate TableRowprivate Graphicprivate booleanprivate org.eclipse.swt.graphics.Imageprivate org.eclipse.swt.graphics.Rectangleprivate intprivate intprivate doubleprivate intprivate Objectprivate ArrayListprivate Comparableprivate final TableColumnCoreprivate Stringprivate Stringprivate AEMonitorprivate Objectprivate ArrayListprivate booleanprivate booleanFields inherited from interface TableCellCore
TOOLTIPLISTENER_HOVER, TOOLTIPLISTENER_HOVERCOMPLETE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean_setSortValue(Comparable valueToSort) private voidvoidaddDisposeListener(TableCellDisposeListener listener) Adds a listener that triggers when the TableCell has been disposedvoidaddListeners(Object listenerObject) A listener is added for every type of cell listener the supplied object implementsvoidaddMenuListener(TableCellMenuListener listener) voidaddMouseListener(TableCellMouseListener listener) Adds a listener that triggers when a TableCell that belongs to this column has a mouse event.voidvoidaddRefreshListener(TableCellRefreshListener listener) Adds a listener that triggers when the TableCell needs refreshingprivate voidaddSWTPaintListener(TableCellSWTPaintListener listener) voidaddToolTipListener(TableCellToolTipListener listener) Adds a listener related to tooltip actionsvoidprotected TableCellMouseEventbuildMouseEvent(org.eclipse.swt.events.MouseEvent e, int eventType) intvoiddispose()dispose of the cellvoiddoPaint(org.eclipse.swt.graphics.GC gc) Paint the cell (for graphics)voiddoPaint(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle bounds) int[]Get the background color of the cellReturns a Graphic of what's behind the cellorg.eclipse.swt.graphics.Imageorg.eclipse.swt.graphics.Colororg.eclipse.swt.graphics.Rectangleorg.eclipse.swt.graphics.Rectangleorg.eclipse.swt.graphics.RectangleReturns text that's meant for the clipboardintGet the cursor ID we are currently using XXX Should NOT be SWT.CURSOR_ constants!Retrieve the data object associated with the current table row and cell.int[]Get the foreground color of the cellorg.eclipse.swt.graphics.ColorRetrieve the SWT graphic related to this table item for TableColumn objects of TYPE_GRAPHIC only.org.eclipse.swt.graphics.ImageintRetrieve the height of the cell's drawing area (excluding any margin) for TableColumn objects of TYPE_GRAPHIC only.org.eclipse.swt.graphics.ImagegetIcon()intintintRetrieves the number of lines available for setting textint[]Return the position of the mouse relative to the cell.doubleReturn the text used when generating diagnosticsorg.eclipse.swt.graphics.PointgetSize()Retrieves the sorting valueRetreive the TableColumn that this cell belongs toReturns which table the cell is being displayed in.Retrieve the TableRow that this cell belongs toRetrieve the row that this cell belongs togetText()Retrieve the Cell's textintFor image based cells should return a textual equivalent.Retrieve the tooltip object assigned to this cellbooleanReturns whether the cell has visually changed since the last refresh call.intgetWidth()Retrieve the width of the cell's drawing area (excluding any margin) for TableColumn objects of TYPE_GRAPHIC only.voidSets the cell to invalid.voidinvalidate(boolean mustRefresh) voidvoidTrigger all the mouse listeners that have been addded to this cellvoidinvokeSWTPaintListeners(org.eclipse.swt.graphics.GC gc) voidinvokeToolTipListeners(int type) Trigger all the tooltip listeners that have been added to this cellvoidinvokeVisibilityListeners(int visibility, boolean invokeColumnListeners) Trigger all the visibility listeners that have been added to this cell.booleanRetrieve whether the cell has been disposed.booleanbooleanisShown()Determines if the user has chosen to display the cellbooleanReturns whether the cell will need updating when it's visible againbooleanisValid()Validility of the cell's text.voidLocation of the cell has changedvoidmouseDoubleClick(org.eclipse.swt.events.MouseEvent e) voidmouseDown(org.eclipse.swt.events.MouseEvent e) voidmouseEnter(org.eclipse.swt.events.MouseEvent e) voidmouseExit(org.eclipse.swt.events.MouseEvent e) voidmouseHover(org.eclipse.swt.events.MouseEvent e) voidmouseMove(org.eclipse.swt.events.MouseEvent e) voidmouseUp(org.eclipse.swt.events.MouseEvent e) booleanRetrieve whether the cell need any paint calls (graphic)voidpaintControl(org.eclipse.swt.events.PaintEvent e) voidredraw()booleanrefresh()Refresh the cell, including graphic typesbooleanrefresh(boolean doGraphics) Refresh the cellbooleanrefresh(boolean doGraphics, boolean rowVisible) Refresh the cell.booleanrefresh(boolean doGraphics, boolean rowVisible, boolean cellVisible) Refresh the cell.voidvoidRemove a previously added TableCellDisposeListenervoidremoveMenuListener(TableCellMenuListener listener) voidremoveMouseListener(TableCellMouseListener listener) Remove a previously added TableCellMouseListenervoidvoidRemove a previously added TableCellRefreshListenervoidRemove a previously added TableCellToolTipListenervoidvoidsetCellArea(org.eclipse.swt.graphics.Rectangle cellArea) voidsetControl(org.eclipse.swt.widgets.Composite composite) voidsetControl(org.eclipse.swt.widgets.Composite composite, org.eclipse.swt.graphics.Rectangle cellArea, boolean addListeners) booleansetCursorID(int cursorID) Set the cursor ID that should be used for the cellvoidvoidsetDataSource(Object _coreDataSource) voidSets tooltip to be shown in absence of an explicit onevoidsetFillCell(boolean fillCell) Sets whether the graphic fills the whole cell for TableColumn objects of TYPE_GRAPHIC only.booleansetForeground(int[] rgb) Change the cell's foreground colorbooleansetForeground(int red, int green, int blue) Change the cell's foreground color.booleansetForeground(org.eclipse.swt.graphics.Color color) Change the cell's foreground color.booleanChange the cell's foreground color to the user's defined "error" color.booleansetGraphic(Graphic img) Sets the image to be drawn.booleansetGraphic(org.eclipse.swt.graphics.Image img) booleansetIcon(org.eclipse.swt.graphics.Image img) Set the cell's iconvoidsetMarginHeight(int height) Specifies the number of pixels of vertical margin that will be placed along the top and bottom edges of the layout for TableColumn objects of TYPE_GRAPHIC only.voidsetMarginWidth(int width) Specifies the number of pixels of horizontal margin that will be placed along the left and right edges of the layout for TableColumn object of TYPE_GRAPHIC only.voidsetMouseOver(boolean b) voidsetNumeric(double d) Set the numeric value of the cell.voidsetOrentation(int o) private voidbooleansetSortValue(float valueToSort) Sets a float value that the column sorting will act upon.booleansetSortValue(long valueToSort) Sets a long value that the column sorting will act on.booleansetSortValue(Comparable valueToSort) Sets a Comparable object that column sorting will act on.booleansetText(StringInterner.StringSupplier supplier) booleanThis method is called to set the cell's text.voidsetTextAlpha(int textOpacity) voidsetTextEquivalent(String str) voidsetToolTip(Object tooltip) Set the cell's tooltip display.voidsetUpToDate(boolean upToDate) Sets whether the cell will need updating when it's visible againvoidsetWrapText(boolean wrap) private voidbooleanWhen true, cell is part of a multi-column sort, and you should set the cell's sort value based solely on your column's data.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface TableCell
isSecondarySortEnabled
-
Field Details
-
this_mon
-
refreshListeners
-
disposeListeners
-
tooltipListeners
-
cellMouseListeners
-
cellMouseMoveListeners
-
cellVisibilityListeners
-
cellClipboardListeners
-
image
private org.eclipse.swt.graphics.Image image -
imageBounds
private org.eclipse.swt.graphics.Rectangle imageBounds -
marginHeight
private int marginHeight -
orientation
private int orientation -
marginWidth
private int marginWidth -
sortValue
-
coreDataSource
-
composite
private org.eclipse.swt.widgets.Composite composite -
tableColumn
-
graphic
-
text
-
textEquiv
-
numericValue
private double numericValue -
pluginDataSource
-
tooltip
-
default_tooltip
-
cellArea
private org.eclipse.swt.graphics.Rectangle cellArea -
hadMore
private boolean hadMore -
wrapText
private boolean wrapText -
cellSWTPaintListeners
-
valid
private boolean valid -
fakeRow
-
userData
-
-
Constructor Details
-
FakeTableCell
-
-
Method Details
-
addRefreshListener
Description copied from interface:TableCellAdds a listener that triggers when the TableCell needs refreshing- Specified by:
addRefreshListenerin interfaceTableCell- Parameters:
listener- Listener Object to be called when refresh is needed.
-
removeRefreshListener
Description copied from interface:TableCellRemove a previously added TableCellRefreshListener- Specified by:
removeRefreshListenerin interfaceTableCell- Parameters:
listener- Previously added listener
-
addDisposeListener
Description copied from interface:TableCellAdds a listener that triggers when the TableCell has been disposed- Specified by:
addDisposeListenerin interfaceTableCell- Parameters:
listener- listener object to be called
-
removeDisposeListener
Description copied from interface:TableCellRemove a previously added TableCellDisposeListener- Specified by:
removeDisposeListenerin interfaceTableCell- Parameters:
listener- Previously added listener
-
addToolTipListener
Description copied from interface:TableCellAdds a listener related to tooltip actions- Specified by:
addToolTipListenerin interfaceTableCell- Parameters:
listener- listener object to be called
-
removeToolTipListener
Description copied from interface:TableCellRemove a previously added TableCellToolTipListener- Specified by:
removeToolTipListenerin interfaceTableCell- Parameters:
listener- Previously added listener
-
addMouseListener
Description copied from interface:TableCellAdds a listener that triggers when a TableCell that belongs to this column has a mouse event.- Specified by:
addMouseListenerin interfaceTableCell- Parameters:
listener-
-
removeMouseListener
Description copied from interface:TableCellRemove a previously added TableCellMouseListener- Specified by:
removeMouseListenerin interfaceTableCell- Parameters:
listener- Previously added listener
-
addMenuListener
- Specified by:
addMenuListenerin interfaceTableCell
-
removeMenuListener
- Specified by:
removeMenuListenerin interfaceTableCell
-
addMouseMoveListener
-
removeMouseMoveListener
-
addVisibilityListener
-
removeVisibilityListener
-
addSWTPaintListener
- Parameters:
listenerObject-- Since:
- 4.0.0.1
-
invokeSWTPaintListeners
public void invokeSWTPaintListeners(org.eclipse.swt.graphics.GC gc) -
addCellClipboardListener
-
getClipboardText
Description copied from interface:TableCellReturns text that's meant for the clipboard- Specified by:
getClipboardTextin interfaceTableCell
-
addListeners
Description copied from interface:TableCellA listener is added for every type of cell listener the supplied object implements- Specified by:
addListenersin interfaceTableCell- Parameters:
listenerObject- Object implementing some cell listeners
-
invokeMouseListeners
Description copied from interface:TableCellCoreTrigger all the mouse listeners that have been addded to this cell- Specified by:
invokeMouseListenersin interfaceTableCellCore- Parameters:
event- event to trigger
-
invokeMenuListeners
- Specified by:
invokeMenuListenersin interfaceTableCellCore
-
getDataSource
Description copied from interface:TableCellRetrieve the data object associated with the current table row and cell. The results of this method MUST NOT BE CACHED. The link between a table cell and a DataSource is not persistent and can change from call to call (for example when the table is re-ordered, the link may be modified)- Specified by:
getDataSourcein interfaceTableCell- 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
-
getForeground
public int[] getForeground()Description copied from interface:TableCellGet the foreground color of the cell- Specified by:
getForegroundin interfaceTableCell- Returns:
- array containing red, green, and blue color
-
getBackground
public int[] getBackground()Description copied from interface:TableCellGet the background color of the cell- Specified by:
getBackgroundin interfaceTableCell- Returns:
- array containing red, green, and blue color. Might be null
-
getBackgroundGraphic
Description copied from interface:TableCellReturns a Graphic of what's behind the cell- Specified by:
getBackgroundGraphicin interfaceTableCell- Returns:
-
getGraphic
Description copied from interface:TableCellRetrieve the SWT graphic related to this table item for TableColumn objects of TYPE_GRAPHIC only.- Specified by:
getGraphicin interfaceTableCell- Returns:
- the Image that is draw in the cell, or null if there is none.
-
getHeight
public int getHeight()Description copied from interface:TableCellRetrieve the height of the cell's drawing area (excluding any margin) for TableColumn objects of TYPE_GRAPHIC only. -
getMaxLines
public int getMaxLines()Description copied from interface:TableCellRetrieves the number of lines available for setting text- Specified by:
getMaxLinesin interfaceTableCell- Returns:
- # of lines available, -1 if unknown
-
getSortValue
Description copied from interface:TableCellRetrieves the sorting value- Specified by:
getSortValuein interfaceTableCell- Returns:
- Object that will be sorted on
-
getTableColumn
Description copied from interface:TableCellRetreive the TableColumn that this cell belongs to- Specified by:
getTableColumnin interfaceTableCell- Returns:
- this cell's TableColumn
-
getTableID
Description copied from interface:TableCellReturns which table the cell is being displayed in.- Specified by:
getTableIDin interfaceTableCell- Returns:
TableManager.TABLE_* constant
-
getTableRow
Description copied from interface:TableCellRetrieve the TableRow that this cell belongs to- Specified by:
getTableRowin interfaceTableCell- Returns:
- this cell's TableRow
-
getText
-
getTextSupplier
- Specified by:
getTextSupplierin interfaceTableCell
-
getToolTip
Description copied from interface:TableCellRetrieve the tooltip object assigned to this cell- Specified by:
getToolTipin interfaceTableCell- Returns:
- tooltip object
- See Also:
-
getWidth
public int getWidth()Description copied from interface:TableCellRetrieve the width of the cell's drawing area (excluding any margin) for TableColumn objects of TYPE_GRAPHIC only. -
invalidate
public void invalidate()Description copied from interface:TableCellSets the cell to invalid. This will result in a refresh on the next scheduled interval.- Specified by:
invalidatein interfaceTableCell
-
isDisposed
public boolean isDisposed()Description copied from interface:TableCellRetrieve whether the cell has been disposed. This will return true after theTableCellDisposeListeneris triggered.- Specified by:
isDisposedin interfaceTableCell- Returns:
- disposal state
-
isShown
-
isValid
public boolean isValid()Description copied from interface:TableCellValidility of the cell's text. -
setFillCell
public void setFillCell(boolean fillCell) Description copied from interface:TableCellSets whether the graphic fills the whole cell for TableColumn objects of TYPE_GRAPHIC only. This may effect how often a refresh of the cell is needed, and effects alignment.- Specified by:
setFillCellin interfaceTableCell- Parameters:
fillCell- true - the whole cell is filled by the graphic
-
setWrapText
public void setWrapText(boolean wrap) -
setForeground
public boolean setForeground(int red, int green, int blue) Description copied from interface:TableCellChange the cell's foreground color.pass -1 to return color back to default
- Specified by:
setForegroundin interfaceTableCell- Parameters:
red- red value (0 - 255)green- green value (0 - 255)blue- blue value (0 - 255)- Returns:
- True - Color changed.
False - Color was already set.
-
setForeground
public boolean setForeground(int[] rgb) Description copied from interface:TableCellChange the cell's foreground color- Specified by:
setForegroundin interfaceTableCell- Parameters:
rgb- int array containing red, green, and blue values, respectively. null to return color back to default- Returns:
-
setForegroundToErrorColor
public boolean setForegroundToErrorColor()Description copied from interface:TableCellChange the cell's foreground color to the user's defined "error" color.- Specified by:
setForegroundToErrorColorin interfaceTableCell- Returns:
- True - Color changed.
False - Color was already set.
-
setGraphic
Description copied from interface:TableCellSets the image to be drawn.From 3.0.1.1, setting the graphic to the same Graphic object will not redraw the image. You need to
TableCell.invalidate()the cell if you know the image bits have changed (or you could pass a new Graphic object in each time a new image is generated)Previously, setting the graphic to the same object resulted in a repaint. Plugins were naughty and would do this on every refresh, causing horrible repaint slowdowns.
- Specified by:
setGraphicin interfaceTableCell- Parameters:
img- image to be stored invalid input: '&' drawn- Returns:
- true - image was changed.
false = image was the same
-
setMarginHeight
public void setMarginHeight(int height) Description copied from interface:TableCellSpecifies the number of pixels of vertical margin that will be placed along the top and bottom edges of the layout for TableColumn objects of TYPE_GRAPHIC only.The default is 1.
- Specified by:
setMarginHeightin interfaceTableCell- Parameters:
height- new margin height
-
setMarginWidth
public void setMarginWidth(int width) Description copied from interface:TableCellSpecifies the number of pixels of horizontal margin that will be placed along the left and right edges of the layout for TableColumn object of TYPE_GRAPHIC only.The default is 1.
- Specified by:
setMarginWidthin interfaceTableCell- Parameters:
width- new margin width
-
setSortValue
Description copied from interface:TableCellSets a Comparable object that column sorting will act on. If you never call setSortValue, your column will be sorted by the cell's text.- Specified by:
setSortValuein interfaceTableCell- Parameters:
valueToSort- the object that will be used when the column cell's are compared to each other- Returns:
- True - Sort Value changed.
False - Sort Value was already set to object supplied.
-
setSortValue
public boolean setSortValue(float valueToSort) Description copied from interface:TableCellSets a float value that the column sorting will act upon.- Specified by:
setSortValuein interfaceTableCell- Parameters:
valueToSort- float sort value- Returns:
- true if sort value changed, or false if sort value already set to value supplied
-
setText
Description copied from interface:TableCellThis method is called to set the cell's text. Caching is done, so that if same text is used several times, there won't be any 'flickering' effect. Ie the text is only updated if it's different from current value.This function must be called from the same thread that the GUI is running under. Listeners like
TableCellAddedListenerdo not always get called on the GUI thread.If you wish to set the text and not worry about changing to the GUI thread, use
TableCell.invalidate(), and set the text in theTableCellRefreshListener -
setText
-
getTextEquivalent
Description copied from interface:TableCellFor image based cells should return a textual equivalent. This is useful for filtering, for example.- Specified by:
getTextEquivalentin interfaceTableCell- Returns:
- the text value to be used or null if it should be ignored
-
setTextEquivalent
- Specified by:
setTextEquivalentin interfaceTableCell
-
getNumeric
public double getNumeric()- Specified by:
getNumericin interfaceTableCell- Returns:
- numeric value of the cell or Double.NaN if undefined
-
setNumeric
public void setNumeric(double d) Description copied from interface:TableCellSet the numeric value of the cell. This is not used for formating, sort order, display, it is purely to allow the numeric value of a cell be set and retrieved- Specified by:
setNumericin interfaceTableCell- Parameters:
d-
-
setToolTip
Description copied from interface:TableCellSet the cell's tooltip display.- Specified by:
setToolTipin interfaceTableCell- Parameters:
tooltip- Object to display. Currently, only String is supported- See Also:
-
setDefaultToolTip
Description copied from interface:TableCellCoreSets tooltip to be shown in absence of an explicit one- Specified by:
setDefaultToolTipin interfaceTableCellCore
-
getDefaultToolTip
- Specified by:
getDefaultToolTipin interfaceTableCellCore
-
updateTooltip
private void updateTooltip() -
_setSortValue
-
setSortValue
public boolean setSortValue(long valueToSort) Description copied from interface:TableCellSets a long value that the column sorting will act on.- Specified by:
setSortValuein interfaceTableCell- Parameters:
valueToSort- sorting value.- Returns:
- True - Sort Value changed.
False - Sort Value was already set to value supplied.
-
doPaint
public void doPaint(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle bounds) -
refresh
public boolean refresh()Description copied from interface:TableCellCoreRefresh the cell, including graphic types- Specified by:
refreshin interfaceTableCellCore
-
setDataSource
-
setControl
public void setControl(org.eclipse.swt.widgets.Composite composite) -
setControl
public void setControl(org.eclipse.swt.widgets.Composite composite, org.eclipse.swt.graphics.Rectangle cellArea, boolean addListeners) -
paintControl
public void paintControl(org.eclipse.swt.events.PaintEvent e) - Specified by:
paintControlin interfaceorg.eclipse.swt.events.PaintListener
-
mouseUp
public void mouseUp(org.eclipse.swt.events.MouseEvent e) - Specified by:
mouseUpin interfaceorg.eclipse.swt.events.MouseListener
-
mouseDown
public void mouseDown(org.eclipse.swt.events.MouseEvent e) - Specified by:
mouseDownin interfaceorg.eclipse.swt.events.MouseListener
-
mouseDoubleClick
public void mouseDoubleClick(org.eclipse.swt.events.MouseEvent e) - Specified by:
mouseDoubleClickin interfaceorg.eclipse.swt.events.MouseListener
-
mouseMove
public void mouseMove(org.eclipse.swt.events.MouseEvent e) - Specified by:
mouseMovein interfaceorg.eclipse.swt.events.MouseMoveListener
-
mouseHover
public void mouseHover(org.eclipse.swt.events.MouseEvent e) - Specified by:
mouseHoverin interfaceorg.eclipse.swt.events.MouseTrackListener
-
mouseExit
public void mouseExit(org.eclipse.swt.events.MouseEvent e) - Specified by:
mouseExitin interfaceorg.eclipse.swt.events.MouseTrackListener
-
mouseEnter
public void mouseEnter(org.eclipse.swt.events.MouseEvent e) - Specified by:
mouseEnterin interfaceorg.eclipse.swt.events.MouseTrackListener
-
buildMouseEvent
- Parameters:
e-- Returns:
- Since:
- 3.0.2.1
-
setOrientationViaColumn
private void setOrientationViaColumn() -
dispose
public void dispose()Description copied from interface:TableCellCoredispose of the cell- Specified by:
disposein interfaceTableCellCore
-
getCursorID
public int getCursorID()Description copied from interface:TableCellCoreGet the cursor ID we are currently using XXX Should NOT be SWT.CURSOR_ constants!- Specified by:
getCursorIDin interfaceTableCellCore- Returns:
-
getObfuscatedText
Description copied from interface:TableCellCoreReturn the text used when generating diagnostics- Specified by:
getObfuscatedTextin interfaceTableCellCore- Returns:
-
getTableRowCore
Description copied from interface:TableCellCoreRetrieve the row that this cell belongs to- Specified by:
getTableRowCorein interfaceTableCellCore- Returns:
- the row that this cell belongs to
-
getVisuallyChangedSinceRefresh
public boolean getVisuallyChangedSinceRefresh()Description copied from interface:TableCellCoreReturns whether the cell has visually changed since the last refresh call. Could be used to prevent a refresh, or refresh early.- Specified by:
getVisuallyChangedSinceRefreshin interfaceTableCellCore- Returns:
- visually changed since refresh state
-
invalidate
public void invalidate(boolean mustRefresh) - Specified by:
invalidatein interfaceTableCellCore
-
invokeToolTipListeners
public void invokeToolTipListeners(int type) Description copied from interface:TableCellCoreTrigger all the tooltip listeners that have been added to this cell- Specified by:
invokeToolTipListenersin interfaceTableCellCore- Parameters:
type-TableCellCore.TOOLTIPLISTENER_HOVER,TableCellCore.TOOLTIPLISTENER_HOVERCOMPLETE
-
invokeVisibilityListeners
public void invokeVisibilityListeners(int visibility, boolean invokeColumnListeners) Description copied from interface:TableCellCoreTrigger all the visibility listeners that have been added to this cell.- Specified by:
invokeVisibilityListenersin interfaceTableCellCore- Parameters:
visibility- SeeTableCellVisibilityListener.VISIBILITY_* constants
-
isMouseOver
public boolean isMouseOver()- Specified by:
isMouseOverin interfaceTableCellCore
-
setMouseOver
public void setMouseOver(boolean b) - Specified by:
setMouseOverin interfaceTableCellSWT
-
isUpToDate
public boolean isUpToDate()Description copied from interface:TableCellCoreReturns whether the cell will need updating when it's visible again- Specified by:
isUpToDatein interfaceTableCellCore- Returns:
-
locationChanged
public void locationChanged()Description copied from interface:TableCellCoreLocation of the cell has changed- Specified by:
locationChangedin interfaceTableCellCore
-
needsPainting
public boolean needsPainting()Description copied from interface:TableCellCoreRetrieve whether the cell need any paint calls (graphic)- Specified by:
needsPaintingin interfaceTableCellCore- Returns:
- whether the cell needs painting
-
refresh
public boolean refresh(boolean doGraphics) Description copied from interface:TableCellCoreRefresh the cell- Specified by:
refreshin interfaceTableCellCore- Parameters:
doGraphics- Whether to update graphic cells
-
refresh
public boolean refresh(boolean doGraphics, boolean rowVisible, boolean cellVisible) Description copied from interface:TableCellCoreRefresh the cell. This method overide takes a bRowVisible paramater and a bCellVisible parameter in order to reduce the number of calls to TableRow.isVisible() and calculations of cell visibility.- Specified by:
refreshin interfaceTableCellCore- Parameters:
doGraphics- Whether to update graphic cellsrowVisible- Assumed visibility state of rowcellVisible- Assumed visibility state of the cell
-
refresh
public boolean refresh(boolean doGraphics, boolean rowVisible) Description copied from interface:TableCellCoreRefresh the cell. This method override takes a bRowVisible parameter in order to reduce the number of calls to TableRow.isVisible() in cases where multiple cells on the same row are being refreshed.- Specified by:
refreshin interfaceTableCellCore- Parameters:
doGraphics- Whether to update graphic cellsrowVisible- Visibility state of row
-
setCursorID
public boolean setCursorID(int cursorID) Description copied from interface:TableCellCoreSet the cursor ID that should be used for the cell- Specified by:
setCursorIDin interfaceTableCellCore- Returns:
- changed
-
setUpToDate
public void setUpToDate(boolean upToDate) Description copied from interface:TableCellCoreSets whether the cell will need updating when it's visible again- Specified by:
setUpToDatein interfaceTableCellCore- Parameters:
upToDate-
-
compareTo
- Specified by:
compareToin interfaceComparable
-
setOrentation
public void setOrentation(int o) -
getCellArea
public org.eclipse.swt.graphics.Rectangle getCellArea() -
setCellArea
public void setCellArea(org.eclipse.swt.graphics.Rectangle cellArea) -
getMouseOffset
public int[] getMouseOffset()Description copied from interface:TableCellReturn the position of the mouse relative to the cell.- Specified by:
getMouseOffsetin interfaceTableCell- Returns:
- array of 2 containing x and y position position relative to cell. null if cell doesn't have mouse.
-
getMarginHeight
public int getMarginHeight()- Specified by:
getMarginHeightin interfaceTableCell- Returns:
-
getMarginWidth
public int getMarginWidth()- Specified by:
getMarginWidthin interfaceTableCell- Returns:
-
refreshAsync
public void refreshAsync()- Specified by:
refreshAsyncin interfaceTableCellCore
-
redraw
public void redraw()- Specified by:
redrawin interfaceTableCellCore
-
doPaint
public void doPaint(org.eclipse.swt.graphics.GC gc) Description copied from interface:TableCellSWTPaint the cell (for graphics)- Specified by:
doPaintin interfaceTableCellSWT- Parameters:
gc- GC object to be used for painting
-
getBackgroundImage
public org.eclipse.swt.graphics.Image getBackgroundImage()- Specified by:
getBackgroundImagein interfaceTableCellSWT- Returns:
-
getBackgroundSWT
public org.eclipse.swt.graphics.Color getBackgroundSWT()- Specified by:
getBackgroundSWTin interfaceTableCellSWT- Returns:
-
getBounds
public org.eclipse.swt.graphics.Rectangle getBounds()- Specified by:
getBoundsin interfaceTableCellSWT
-
getForegroundSWT
public org.eclipse.swt.graphics.Color getForegroundSWT()- Specified by:
getForegroundSWTin interfaceTableCellSWT- Returns:
-
getGraphicSWT
public org.eclipse.swt.graphics.Image getGraphicSWT()- Specified by:
getGraphicSWTin interfaceTableCellSWT
-
getIcon
public org.eclipse.swt.graphics.Image getIcon()- Specified by:
getIconin interfaceTableCellSWT- Returns:
-
getSize
public org.eclipse.swt.graphics.Point getSize()- Specified by:
getSizein interfaceTableCellSWT
-
getTableRowSWT
- Specified by:
getTableRowSWTin interfaceTableCellSWT- Returns:
-
getTextAlpha
public int getTextAlpha()- Specified by:
getTextAlphain interfaceTableCellSWT- Returns:
-
setForeground
public boolean setForeground(org.eclipse.swt.graphics.Color color) Description copied from interface:TableCellSWTChange the cell's foreground color. NOTE: favor (R, G, B)- Specified by:
setForegroundin interfaceTableCellSWT- Parameters:
color- SWT Color object.- Returns:
- True - Color changed.
False - Color was already set.
-
setGraphic
public boolean setGraphic(org.eclipse.swt.graphics.Image img) - Specified by:
setGraphicin interfaceTableCellSWT
-
setIcon
public boolean setIcon(org.eclipse.swt.graphics.Image img) Description copied from interface:TableCellSWTSet the cell's icon- Specified by:
setIconin interfaceTableCellSWT- Parameters:
img- Cell's new icon- Returns:
- true if the icon will be used
-
setTextAlpha
public void setTextAlpha(int textOpacity) - Specified by:
setTextAlphain interfaceTableCellSWT- Parameters:
textOpacity-
-
getBoundsOnDisplay
public org.eclipse.swt.graphics.Rectangle getBoundsOnDisplay()- Specified by:
getBoundsOnDisplayin interfaceTableCellSWT
-
getTableColumnCore
- Specified by:
getTableColumnCorein interfaceTableCellCore
-
useSimpleSortValue
public boolean useSimpleSortValue()Description copied from interface:TableCellWhen true, cell is part of a multi-column sort, and you should set the cell's sort value based solely on your column's data. Common scenario:
User sorts just by your column, you may want to sort by the main value, and subsort by several secondary values. When user sorts by multiple columns (including yours), your secondary values can prevent other sort columns from being applied. Example:
When sorted by itself, the "unopened" column would look better if sorted by last opened date. However, if useSimpleSortValue is not taken into account, and the user sorts by unopened + name, the order would not necessarily change. The end result would be a sort by unopened, last opened, and then 'bytes downloaded'.- Specified by:
useSimpleSortValuein interfaceTableCell
-
getData
-
setData
-