|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gudy.azureus2.ui.swt.views.table.impl.FakeTableCell
public class FakeTableCell
Field Summary |
---|
Fields inherited from interface com.aelitis.azureus.ui.common.table.TableCellCore |
---|
TOOLTIPLISTENER_HOVER, TOOLTIPLISTENER_HOVERCOMPLETE |
Constructor Summary | |
---|---|
FakeTableCell(TableColumnCore column,
java.lang.Object ds)
|
|
FakeTableCell(TableColumn column,
java.lang.Object ds)
|
Method Summary | |
---|---|
void |
addDisposeListener(TableCellDisposeListener listener)
Adds a listener that triggers when the TableCell has been disposed |
void |
addListeners(java.lang.Object listenerObject)
A listener is added for every type of cell listener the supplied object implements |
void |
addMouseListener(TableCellMouseListener listener)
Adds a listener that triggers when a TableCell that belongs to this column has a mouse event. |
void |
addMouseMoveListener(TableCellMouseMoveListener listener)
|
void |
addRefreshListener(TableCellRefreshListener listener)
Adds a listener that triggers when the TableCell needs refreshing |
void |
addToolTipListener(TableCellToolTipListener listener)
Adds a listener related to tooltip actions |
void |
addVisibilityListener(TableCellVisibilityListener listener)
|
protected TableCellMouseEvent |
buildMouseEvent(org.eclipse.swt.events.MouseEvent e,
int eventType)
|
int |
compareTo(java.lang.Object arg0)
|
void |
dispose()
dispose of the cell |
void |
doPaint(org.eclipse.swt.graphics.GC gc)
Paint the cell (for graphics) |
void |
doPaint(org.eclipse.swt.graphics.GC gc,
org.eclipse.swt.graphics.Rectangle bounds)
|
int[] |
getBackground()
Get the background color of the cell |
Graphic |
getBackgroundGraphic()
Returns a Graphic of what's behind the cell |
org.eclipse.swt.graphics.Image |
getBackgroundImage()
|
org.eclipse.swt.graphics.Color |
getBackgroundSWT()
|
org.eclipse.swt.graphics.Rectangle |
getBounds()
|
org.eclipse.swt.graphics.Rectangle |
getBoundsOnDisplay()
|
org.eclipse.swt.graphics.Rectangle |
getCellArea()
|
java.lang.String |
getClipboardText()
Returns text that's meant for the clipboard |
int |
getCursorID()
Get the cursor ID we are currently using XXX Should NOT be SWT.CURSOR_ constants! |
java.lang.Object |
getDataSource()
Retrieve the data object associated with the current table row and cell. |
java.lang.Object |
getDefaultToolTip()
|
int[] |
getForeground()
Get the foreground color of the cell |
org.eclipse.swt.graphics.Color |
getForegroundSWT()
|
Graphic |
getGraphic()
Retrieve the SWT graphic related to this table item for TableColumn objects of TYPE_GRAPHIC only. |
org.eclipse.swt.graphics.Image |
getGraphicSWT()
|
int |
getHeight()
Retrieve the height of the cell's drawing area (excluding any margin) for TableColumn objects of TYPE_GRAPHIC only. |
org.eclipse.swt.graphics.Image |
getIcon()
|
int |
getMarginHeight()
|
int |
getMarginWidth()
|
int |
getMaxLines()
Retrieves the number of lines available for setting text |
int[] |
getMouseOffset()
Return the position of the mouse relative to the cell. |
java.lang.String |
getObfusticatedText()
Return the text used when generating diagnostics |
org.eclipse.swt.graphics.Point |
getSize()
|
java.lang.Comparable |
getSortValue()
Retrieves the sorting value |
TableColumn |
getTableColumn()
Retreive the TableColumn that this cell belongs to |
TableColumnCore |
getTableColumnCore()
|
java.lang.String |
getTableID()
Returns which table the cell is being displayed in. |
TableRow |
getTableRow()
Retrieve the TableRow that this cell belongs to |
TableRowCore |
getTableRowCore()
Retrieve the row that this cell belongs to |
TableRowSWT |
getTableRowSWT()
|
java.lang.String |
getText()
Retrieve the Cell's text |
int |
getTextAlpha()
|
java.lang.Object |
getToolTip()
Retrieve the tooltip object assigned to this cell |
boolean |
getVisuallyChangedSinceRefresh()
Returns whether the cell has visually changed since the last refresh call. |
int |
getWidth()
Retrieve the width of the cell's drawing area (excluding any margin) for TableColumn objects of TYPE_GRAPHIC only. |
void |
invalidate()
Sets the cell to invalid. |
void |
invalidate(boolean mustRefresh)
|
void |
invokeMouseListeners(TableCellMouseEvent event)
Trigger all the mouse listeners that have been addded to this cell |
void |
invokeSWTPaintListeners(org.eclipse.swt.graphics.GC gc)
|
void |
invokeToolTipListeners(int type)
Trigger all the tooltip listeners that have been added to this cell |
void |
invokeVisibilityListeners(int visibility,
boolean invokeColumnListeners)
Trigger all the visibility listeners that have been added to this cell. |
boolean |
isDisposed()
Retrieve whether the cell has been disposed. |
boolean |
isMouseOver()
|
boolean |
isShown()
Determines if the user has chosen to display the cell |
boolean |
isUpToDate()
Returns whether the cell will need updating when it's visible again |
boolean |
isValid()
Validility of the cell's text. |
void |
locationChanged()
Location of the cell has changed |
void |
mouseDoubleClick(org.eclipse.swt.events.MouseEvent e)
|
void |
mouseDown(org.eclipse.swt.events.MouseEvent e)
|
void |
mouseEnter(org.eclipse.swt.events.MouseEvent e)
|
void |
mouseExit(org.eclipse.swt.events.MouseEvent e)
|
void |
mouseHover(org.eclipse.swt.events.MouseEvent e)
|
void |
mouseMove(org.eclipse.swt.events.MouseEvent e)
|
void |
mouseUp(org.eclipse.swt.events.MouseEvent e)
|
boolean |
needsPainting()
Retrieve whether the cell need any paint calls (graphic) |
void |
paintControl(org.eclipse.swt.events.PaintEvent e)
|
void |
redraw()
|
boolean |
refresh()
Refresh the cell, including graphic types |
boolean |
refresh(boolean doGraphics)
Refresh the cell |
boolean |
refresh(boolean doGraphics,
boolean rowVisible)
Refresh the cell. |
boolean |
refresh(boolean doGraphics,
boolean rowVisible,
boolean cellVisible)
Refresh the cell. |
void |
refreshAsync()
|
void |
removeDisposeListener(TableCellDisposeListener listener)
Remove a previously added TableCellDisposeListener |
void |
removeMouseListener(TableCellMouseListener listener)
Remove a previously added TableCellMouseListener |
void |
removeMouseMoveListener(TableCellMouseMoveListener listener)
|
void |
removeRefreshListener(TableCellRefreshListener listener)
Remove a previously added TableCellRefreshListener |
void |
removeToolTipListener(TableCellToolTipListener listener)
Remove a previously added TableCellToolTipListener |
void |
removeVisibilityListener(TableCellVisibilityListener listener)
|
void |
setCellArea(org.eclipse.swt.graphics.Rectangle cellArea)
|
void |
setControl(org.eclipse.swt.widgets.Composite composite)
|
void |
setControl(org.eclipse.swt.widgets.Composite composite,
org.eclipse.swt.graphics.Rectangle cellArea,
boolean addListeners)
|
boolean |
setCursorID(int cursorID)
Set the cursor ID that should be used for the cell |
void |
setDataSource(java.lang.Object _coreDataSource)
|
void |
setDefaultToolTip(java.lang.Object o)
Sets tooltip to be shown in absence of an explicit one |
void |
setFillCell(boolean fillCell)
Sets whether the graphic fills the whole cell for TableColumn objects of TYPE_GRAPHIC only. |
boolean |
setForeground(org.eclipse.swt.graphics.Color color)
Change the cell's foreground color. |
boolean |
setForeground(int[] rgb)
Change the cell's foreground color |
boolean |
setForeground(int red,
int green,
int blue)
Change the cell's foreground color. |
boolean |
setForegroundToErrorColor()
Change the cell's foreground color to the user's defined "error" color. |
boolean |
setGraphic(Graphic img)
Sets the image to be drawn. |
boolean |
setGraphic(org.eclipse.swt.graphics.Image img)
|
boolean |
setIcon(org.eclipse.swt.graphics.Image img)
Set the cell's icon |
void |
setMarginHeight(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. |
void |
setMarginWidth(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. |
void |
setMouseOver(boolean b)
|
void |
setOrentation(int o)
|
boolean |
setSortValue(java.lang.Comparable valueToSort)
Sets a Comparable object that column sorting will act on. |
boolean |
setSortValue(float valueToSort)
Sets a float value that the column sorting will act upon. |
boolean |
setSortValue(long valueToSort)
Sets a long value that the column sorting will act on. |
boolean |
setText(java.lang.String text)
This method is called to set the cell's text. |
void |
setTextAlpha(int textOpacity)
|
void |
setToolTip(java.lang.Object tooltip)
Set the cell's tooltip display. |
void |
setUpToDate(boolean upToDate)
Sets whether the cell will need updating when it's visible again |
void |
setWrapText(boolean wrap)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FakeTableCell(TableColumn column, java.lang.Object ds)
columnRateUpDown
- public FakeTableCell(TableColumnCore column, java.lang.Object ds)
Method Detail |
---|
public void addRefreshListener(TableCellRefreshListener listener)
TableCell
addRefreshListener
in interface TableCell
listener
- Listener Object to be called when refresh is needed.public void removeRefreshListener(TableCellRefreshListener listener)
TableCell
removeRefreshListener
in interface TableCell
listener
- Previously added listenerpublic void addDisposeListener(TableCellDisposeListener listener)
TableCell
addDisposeListener
in interface TableCell
listener
- listener object to be calledpublic void removeDisposeListener(TableCellDisposeListener listener)
TableCell
removeDisposeListener
in interface TableCell
listener
- Previously added listenerpublic void addToolTipListener(TableCellToolTipListener listener)
TableCell
addToolTipListener
in interface TableCell
listener
- listener object to be calledpublic void removeToolTipListener(TableCellToolTipListener listener)
TableCell
removeToolTipListener
in interface TableCell
listener
- Previously added listenerpublic void addMouseListener(TableCellMouseListener listener)
TableCell
addMouseListener
in interface TableCell
public void removeMouseListener(TableCellMouseListener listener)
TableCell
removeMouseListener
in interface TableCell
listener
- Previously added listenerpublic void addMouseMoveListener(TableCellMouseMoveListener listener)
public void removeMouseMoveListener(TableCellMouseMoveListener listener)
public void addVisibilityListener(TableCellVisibilityListener listener)
public void removeVisibilityListener(TableCellVisibilityListener listener)
public void invokeSWTPaintListeners(org.eclipse.swt.graphics.GC gc)
public java.lang.String getClipboardText()
TableCell
getClipboardText
in interface TableCell
public void addListeners(java.lang.Object listenerObject)
TableCell
addListeners
in interface TableCell
listenerObject
- Object implementing some cell listeneterspublic void invokeMouseListeners(TableCellMouseEvent event)
TableCellCore
invokeMouseListeners
in interface TableCellCore
event
- event to triggerpublic java.lang.Object getDataSource()
TableCell
getDataSource
in interface TableCell
Download
object for the current rowPeer
object for the current rowDiskManagerFileInfo
object for the current rowTrackerTorrent
object for the current rowShareResource
object for the current rowpublic int[] getForeground()
TableCell
getForeground
in interface TableCell
public int[] getBackground()
TableCell
getBackground
in interface TableCell
public Graphic getBackgroundGraphic()
TableCell
getBackgroundGraphic
in interface TableCell
public Graphic getGraphic()
TableCell
getGraphic
in interface TableCell
public int getHeight()
TableCell
getHeight
in interface TableCell
public int getMaxLines()
TableCell
getMaxLines
in interface TableCell
public java.lang.Comparable getSortValue()
TableCell
getSortValue
in interface TableCell
public TableColumn getTableColumn()
TableCell
getTableColumn
in interface TableCell
public java.lang.String getTableID()
TableCell
getTableID
in interface TableCell
TableManager
.TABLE_* constantpublic TableRow getTableRow()
TableCell
getTableRow
in interface TableCell
public java.lang.String getText()
TableCell
getText
in interface TableCell
public java.lang.Object getToolTip()
TableCell
getToolTip
in interface TableCell
TableCell.addToolTipListener(TableCellToolTipListener)
public int getWidth()
TableCell
getWidth
in interface TableCell
public void invalidate()
TableCell
invalidate
in interface TableCell
public boolean isDisposed()
TableCell
TableCellDisposeListener
is triggered.
isDisposed
in interface TableCell
public boolean isShown()
TableCell
isShown
in interface TableCell
public boolean isValid()
TableCell
isValid
in interface TableCell
public void setFillCell(boolean fillCell)
TableCell
setFillCell
in interface TableCell
fillCell
- true - the whole cell is filled by the graphicpublic void setWrapText(boolean wrap)
public boolean setForeground(int red, int green, int blue)
TableCell
pass -1 to return color back to default
setForeground
in interface TableCell
red
- red value (0 - 255)green
- green value (0 - 255)blue
- blue value (0 - 255)
public boolean setForeground(int[] rgb)
TableCell
setForeground
in interface TableCell
rgb
- int array containing red, green, and blue values, respectively.
null to return color back to default
public boolean setForegroundToErrorColor()
TableCell
setForegroundToErrorColor
in interface TableCell
public boolean setGraphic(Graphic img)
TableCell
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.
setGraphic
in interface TableCell
img
- image to be stored & drawn
public void setMarginHeight(int height)
TableCell
The default is 1.
setMarginHeight
in interface TableCell
height
- new margin heightpublic void setMarginWidth(int width)
TableCell
The default is 1.
setMarginWidth
in interface TableCell
width
- new margin widthpublic boolean setSortValue(java.lang.Comparable valueToSort)
TableCell
setSortValue
in interface TableCell
valueToSort
- the object that will be used when the column cell's
are compared to each other
public boolean setSortValue(float valueToSort)
TableCell
setSortValue
in interface TableCell
valueToSort
- float sort value
public boolean setText(java.lang.String text)
TableCell
This function must be called from the same thread that the GUI is running
under. Listeners like TableCellAddedListener
do 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 the
TableCellRefreshListener
setText
in interface TableCell
text
- the text to be set
public void setToolTip(java.lang.Object tooltip)
TableCell
setToolTip
in interface TableCell
tooltip
- Object to display. Currently, only String is supportedTableCell.addToolTipListener(TableCellToolTipListener)
public void setDefaultToolTip(java.lang.Object o)
TableCellCore
setDefaultToolTip
in interface TableCellCore
public java.lang.Object getDefaultToolTip()
getDefaultToolTip
in interface TableCellCore
public boolean setSortValue(long valueToSort)
TableCell
setSortValue
in interface TableCell
valueToSort
- sorting value.
public void doPaint(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle bounds)
public boolean refresh()
TableCellCore
refresh
in interface TableCellCore
public void setDataSource(java.lang.Object _coreDataSource)
public void setControl(org.eclipse.swt.widgets.Composite composite)
public void setControl(org.eclipse.swt.widgets.Composite composite, org.eclipse.swt.graphics.Rectangle cellArea, boolean addListeners)
public void paintControl(org.eclipse.swt.events.PaintEvent e)
paintControl
in interface org.eclipse.swt.events.PaintListener
public void mouseUp(org.eclipse.swt.events.MouseEvent e)
mouseUp
in interface org.eclipse.swt.events.MouseListener
public void mouseDown(org.eclipse.swt.events.MouseEvent e)
mouseDown
in interface org.eclipse.swt.events.MouseListener
public void mouseDoubleClick(org.eclipse.swt.events.MouseEvent e)
mouseDoubleClick
in interface org.eclipse.swt.events.MouseListener
public void mouseMove(org.eclipse.swt.events.MouseEvent e)
mouseMove
in interface org.eclipse.swt.events.MouseMoveListener
public void mouseHover(org.eclipse.swt.events.MouseEvent e)
mouseHover
in interface org.eclipse.swt.events.MouseTrackListener
public void mouseExit(org.eclipse.swt.events.MouseEvent e)
mouseExit
in interface org.eclipse.swt.events.MouseTrackListener
public void mouseEnter(org.eclipse.swt.events.MouseEvent e)
mouseEnter
in interface org.eclipse.swt.events.MouseTrackListener
protected TableCellMouseEvent buildMouseEvent(org.eclipse.swt.events.MouseEvent e, int eventType)
e
-
public void dispose()
TableCellCore
dispose
in interface TableCellCore
public int getCursorID()
TableCellCore
getCursorID
in interface TableCellCore
public java.lang.String getObfusticatedText()
TableCellCore
getObfusticatedText
in interface TableCellCore
public TableRowCore getTableRowCore()
TableCellCore
getTableRowCore
in interface TableCellCore
public boolean getVisuallyChangedSinceRefresh()
TableCellCore
getVisuallyChangedSinceRefresh
in interface TableCellCore
public void invalidate(boolean mustRefresh)
invalidate
in interface TableCellCore
public void invokeToolTipListeners(int type)
TableCellCore
invokeToolTipListeners
in interface TableCellCore
type
- TableCellCore.TOOLTIPLISTENER_HOVER
, TableCellCore.TOOLTIPLISTENER_HOVERCOMPLETE
public void invokeVisibilityListeners(int visibility, boolean invokeColumnListeners)
TableCellCore
invokeVisibilityListeners
in interface TableCellCore
visibility
- See TableCellVisibilityListener
.VISIBILITY_* constantspublic boolean isMouseOver()
isMouseOver
in interface TableCellCore
public void setMouseOver(boolean b)
setMouseOver
in interface TableCellSWT
public boolean isUpToDate()
TableCellCore
isUpToDate
in interface TableCellCore
public void locationChanged()
TableCellCore
locationChanged
in interface TableCellCore
public boolean needsPainting()
TableCellCore
needsPainting
in interface TableCellCore
public boolean refresh(boolean doGraphics)
TableCellCore
refresh
in interface TableCellCore
doGraphics
- Whether to update graphic cellspublic boolean refresh(boolean doGraphics, boolean rowVisible, boolean cellVisible)
TableCellCore
refresh
in interface TableCellCore
doGraphics
- Whether to update graphic cellsrowVisible
- Assumed visibility state of rowcellVisible
- Assumed visibility state of the cellpublic boolean refresh(boolean doGraphics, boolean rowVisible)
TableCellCore
refresh
in interface TableCellCore
doGraphics
- Whether to update graphic cellsrowVisible
- Visibility state of rowpublic boolean setCursorID(int cursorID)
TableCellCore
setCursorID
in interface TableCellCore
public void setUpToDate(boolean upToDate)
TableCellCore
setUpToDate
in interface TableCellCore
public int compareTo(java.lang.Object arg0)
compareTo
in interface java.lang.Comparable
public void setOrentation(int o)
public org.eclipse.swt.graphics.Rectangle getCellArea()
public void setCellArea(org.eclipse.swt.graphics.Rectangle cellArea)
public int[] getMouseOffset()
TableCell
getMouseOffset
in interface TableCell
public int getMarginHeight()
getMarginHeight
in interface TableCell
public int getMarginWidth()
getMarginWidth
in interface TableCell
public void refreshAsync()
refreshAsync
in interface TableCellCore
public void redraw()
redraw
in interface TableCellCore
public void doPaint(org.eclipse.swt.graphics.GC gc)
TableCellSWT
doPaint
in interface TableCellSWT
gc
- GC object to be used for paintingpublic org.eclipse.swt.graphics.Image getBackgroundImage()
getBackgroundImage
in interface TableCellSWT
public org.eclipse.swt.graphics.Color getBackgroundSWT()
getBackgroundSWT
in interface TableCellSWT
public org.eclipse.swt.graphics.Rectangle getBounds()
getBounds
in interface TableCellSWT
public org.eclipse.swt.graphics.Color getForegroundSWT()
getForegroundSWT
in interface TableCellSWT
public org.eclipse.swt.graphics.Image getGraphicSWT()
getGraphicSWT
in interface TableCellSWT
public org.eclipse.swt.graphics.Image getIcon()
getIcon
in interface TableCellSWT
public org.eclipse.swt.graphics.Point getSize()
getSize
in interface TableCellSWT
public TableRowSWT getTableRowSWT()
getTableRowSWT
in interface TableCellSWT
public int getTextAlpha()
getTextAlpha
in interface TableCellSWT
public boolean setForeground(org.eclipse.swt.graphics.Color color)
TableCellSWT
setForeground
in interface TableCellSWT
color
- SWT Color object.
public boolean setGraphic(org.eclipse.swt.graphics.Image img)
setGraphic
in interface TableCellSWT
public boolean setIcon(org.eclipse.swt.graphics.Image img)
TableCellSWT
setIcon
in interface TableCellSWT
img
- Cell's new icon
public void setTextAlpha(int textOpacity)
setTextAlpha
in interface TableCellSWT
public org.eclipse.swt.graphics.Rectangle getBoundsOnDisplay()
getBoundsOnDisplay
in interface TableCellSWT
public TableColumnCore getTableColumnCore()
getTableColumnCore
in interface TableCellCore
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |