| java.lang.Object org.eclipse.jface.viewers.ViewerCell
ViewerCell | public class ViewerCell (Code) | | The ViewerCell is the JFace representation of a cell entry in a ViewerRow.
since: 3.3 |
Field Summary | |
public static int | ABOVE Constant denoting the cell above current one (value is 1). | public static int | BELOW Constant denoting the cell below current one (value is 2). | public static int | LEFT Constant denoting the cell to the left of the current one (value is 4). | public static int | RIGHT Constant denoting the cell to the right of the current one (value is 8). |
Constructor Summary | |
| ViewerCell(ViewerRow row, int columnIndex, Object element) Create a new instance of the receiver on the row. |
Method Summary | |
public boolean | equals(Object obj) | public Rectangle | getBounds() Get the bounds of the cell. | public int | getColumnIndex() Get the index of the cell. | public Control | getControl() Get the control for this cell. | public Object | getElement() Get the element this row represents. | public Image | getImage() Return the Image for the cell. | public Widget | getItem() Return the item for the receiver. | public ViewerCell | getNeighbor(int directionMask, boolean sameLevel) Returns the specified neighbor of this cell, or null if no
neighbor exists in the given direction. | public String | getText() Return the text for the cell. | public ViewerRow | getViewerRow() | public int | getVisualIndex() Get the current index. | public int | hashCode() | public void | setBackground(Color background) Set the background color of the cell. | void | setColumn(int column) Set the columnIndex. | public void | setFont(Font font) Set the font of the cell. | public void | setForeground(Color foreground) Set the foreground color of the cell. | public void | setImage(Image image) Set the Image for the cell. | public void | setText(String text) Set the text for the cell. | void | update(ViewerRow rowItem, int column, Object element) Set the row to rowItem and the columnIndex to column. |
ABOVE | public static int ABOVE(Code) | | Constant denoting the cell above current one (value is 1).
|
BELOW | public static int BELOW(Code) | | Constant denoting the cell below current one (value is 2).
|
LEFT | public static int LEFT(Code) | | Constant denoting the cell to the left of the current one (value is 4).
|
RIGHT | public static int RIGHT(Code) | | Constant denoting the cell to the right of the current one (value is 8).
|
ViewerCell | ViewerCell(ViewerRow row, int columnIndex, Object element)(Code) | | Create a new instance of the receiver on the row.
Parameters: row - Parameters: columnIndex - |
getBounds | public Rectangle getBounds()(Code) | | Get the bounds of the cell.
Rectangle |
getColumnIndex | public int getColumnIndex()(Code) | | Get the index of the cell.
the index |
getControl | public Control getControl()(Code) | | Get the control for this cell.
Control |
getImage | public Image getImage()(Code) | | Return the Image for the cell.
Image or null |
getItem | public Widget getItem()(Code) | | Return the item for the receiver.
Item |
getNeighbor | public ViewerCell getNeighbor(int directionMask, boolean sameLevel)(Code) | | Returns the specified neighbor of this cell, or null if no
neighbor exists in the given direction. Direction constants can be
combined by bitwise OR; for example, this method will return the cell to
the upper-left of the current cell by passing
ViewerCell.ABOVE |
ViewerCell.LEFT . If sameLevel is true , only
cells in sibling rows (under the same parent) will be considered.
Parameters: directionMask - the direction mask used to identify the requested neighborcell Parameters: sameLevel - if true , only consider cells from sibling rows the requested neighbor cell, or null if not found |
getVisualIndex | public int getVisualIndex()(Code) | | Get the current index. This can be different from the original index when
columns are reordered
the current index (as shown in the UI) since: 3.4 |
hashCode | public int hashCode()(Code) | | |
setBackground | public void setBackground(Color background)(Code) | | Set the background color of the cell.
Parameters: background - |
setColumn | void setColumn(int column)(Code) | | Set the columnIndex.
Parameters: column - |
setFont | public void setFont(Font font)(Code) | | Set the font of the cell.
Parameters: font - |
setForeground | public void setForeground(Color foreground)(Code) | | Set the foreground color of the cell.
Parameters: foreground - |
setImage | public void setImage(Image image)(Code) | | Set the Image for the cell.
Parameters: image - |
setText | public void setText(String text)(Code) | | Set the text for the cell.
Parameters: text - |
update | void update(ViewerRow rowItem, int column, Object element)(Code) | | Set the row to rowItem and the columnIndex to column.
Parameters: rowItem - Parameters: column - |
|
|