|
Eclipse Platform Release 3.4 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jface.viewers.ViewerCell
The ViewerCell is the JFace representation of a cell entry in a ViewerRow.
Field Summary | |
static int |
ABOVE
Constant denoting the cell above current one (value is 1). |
static int |
BELOW
Constant denoting the cell below current one (value is 2). |
static int |
LEFT
Constant denoting the cell to the left of the current one (value is 4). |
static int |
RIGHT
Constant denoting the cell to the right of the current one (value is 8). |
Method Summary | |
boolean |
equals(Object obj)
|
Color |
getBackground()
Gets the background color of the cell. |
Rectangle |
getBounds()
Get the bounds of the cell. |
int |
getColumnIndex()
Get the index of the cell. |
Control |
getControl()
Get the control for this cell. |
Object |
getElement()
Get the element this row represents. |
Font |
getFont()
Gets the font of the cell. |
Color |
getForeground()
Gets the foreground color of the cell. |
Image |
getImage()
Return the Image for the cell. |
Rectangle |
getImageBounds()
Returns the location and bounds of the area where the image is drawn |
Widget |
getItem()
Return the item for the receiver. |
ViewerCell |
getNeighbor(int directionMask,
boolean sameLevel)
Returns the specified neighbor of this cell, or null if no
neighbor exists in the given direction. |
StyleRange[] |
getStyleRanges()
Returns the style ranges to be applied on the text label or null if no
style ranges have been set. |
String |
getText()
Return the text for the cell. |
Rectangle |
getTextBounds()
The location and bounds of the area where the text is drawn depends on various things (image displayed, control with SWT.CHECK) |
ViewerRow |
getViewerRow()
|
int |
getVisualIndex()
Get the current index. |
int |
hashCode()
|
void |
setBackground(Color background)
Set the background color of the cell. |
void |
setFont(Font font)
Set the font of the cell. |
void |
setForeground(Color foreground)
Set the foreground color of the cell. |
void |
setImage(Image image)
Set the Image for the cell. |
void |
setStyleRanges(StyleRange[] styleRanges)
Set the style ranges to be applied on the text label Note: Requires StyledCellLabelProvider with owner draw enabled. |
void |
setText(String text)
Set the text for the cell. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static int ABOVE
public static int BELOW
public static int LEFT
public static int RIGHT
Method Detail |
public int getColumnIndex()
public Rectangle getBounds()
Rectangle
public Object getElement()
Object
public String getText()
String
public Image getImage()
Image
or null
public void setBackground(Color background)
background
- public void setForeground(Color foreground)
foreground
- public void setFont(Font font)
font
- public void setText(String text)
text
- public void setImage(Image image)
image
- public void setStyleRanges(StyleRange[] styleRanges)
StyledCellLabelProvider
with owner draw enabled.
styleRanges
- the styled rangespublic StyleRange[] getStyleRanges()
null
if no
style ranges have been set.
public Widget getItem()
Item
public Control getControl()
Control
public int getVisualIndex()
public ViewerCell getNeighbor(int directionMask, boolean sameLevel)
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 ABOVE
|
LEFT
. If sameLevel
is true
, only
cells in sibling rows (under the same parent) will be considered.
directionMask
- the direction mask used to identify the requested neighbor
cellsameLevel
- if true
, only consider cells from sibling rows
null
if not foundpublic ViewerRow getViewerRow()
public Rectangle getTextBounds()
null
if the underlying widget implementation doesn't provide this
informationpublic Rectangle getImageBounds()
null
if the underlying widget implementation doesn't provide this
informationpublic Color getForeground()
null
for the default foregroundpublic Color getBackground()
null
for the default backgroundpublic Font getFont()
null
for the default fontpublic int hashCode()
public boolean equals(Object obj)
|
Eclipse Platform Release 3.4 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.