public abstract class GridCellRenderer extends AbstractInternalWidget
NOTE: THIS WIDGET AND ITS API ARE STILL UNDER DEVELOPMENT. THIS IS A PRE-RELEASE ALPHA VERSION. USERS SHOULD EXPECT API CHANGES IN FUTURE VERSIONS.
The super class for all grid cell renderers. Contains the properties specific to a grid cell.Modifier and Type | Field and Description |
---|---|
protected int |
truncationStyle
Truncation style
|
hoverDetail
LeftMouseButtonDown, MouseMove
Constructor and Description |
---|
GridCellRenderer() |
Modifier and Type | Method and Description |
---|---|
int |
getAlignment() |
int |
getColumn() |
int |
getRow() |
org.eclipse.swt.graphics.Rectangle |
getTextBounds(GridItem item,
boolean preferred)
Returns the bounds of the text in the cell.
|
int |
getTruncationStyle()
Get the truncation style
|
int |
getVerticalAlignment() |
boolean |
isCellFocus() |
boolean |
isCellSelected() |
boolean |
isCheck() |
boolean |
isColumnHover() |
boolean |
isDragging()
Gets the dragging state.
|
boolean |
isRowFocus() |
boolean |
isRowHover() |
boolean |
isTree() |
boolean |
isWordWrap() |
void |
setAlignment(int alignment) |
void |
setCellFocus(boolean columnFocus) |
void |
setCellSelected(boolean cellSelected) |
void |
setCheck(boolean check) |
void |
setColumn(int column) |
void |
setColumnHover(boolean columnHover) |
void |
setDragging(boolean dragging)
Sets the dragging state.
|
void |
setRow(int row) |
void |
setRowFocus(boolean rowFocus) |
void |
setRowHover(boolean rowHover) |
void |
setTree(boolean tree) |
void |
setTruncationStyle(int truncationStyle)
Set the truncation style to use when cell content is too large.
|
void |
setVerticalAlignment(int verticalAlignment) |
void |
setWordWrap(boolean wordWrap) |
getHoverDetail, setHoverDetail
getBounds, getDisplay, getSize, isExpanded, isFocus, isHover, isMouseDown, isSelected, setBounds, setBounds, setDisplay, setExpanded, setFocus, setHover, setLocation, setLocation, setMouseDown, setSelected, setSize, setSize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
notify
computeSize, paint, setBounds, setBounds, setDisplay, setExpanded, setFocus, setHover, setLocation, setLocation, setMouseDown, setSelected, setSize, setSize
public int getRow()
public void setRow(int row)
row
- The row to set.public int getAlignment()
public void setAlignment(int alignment)
alignment
- The alignment to set.public int getVerticalAlignment()
public void setVerticalAlignment(int verticalAlignment)
verticalAlignment
- The vertical alignment to set.public boolean isCheck()
public void setCheck(boolean check)
check
- The check to set.public boolean isTree()
public void setTree(boolean tree)
tree
- The tree to set.public int getColumn()
public void setColumn(int column)
column
- The column to set.public boolean isColumnHover()
public void setColumnHover(boolean columnHover)
columnHover
- The columnHover to set.public boolean isRowHover()
public void setRowHover(boolean rowHover)
rowHover
- The rowHover to set.public boolean isCellFocus()
public void setCellFocus(boolean columnFocus)
columnFocus
- The columnFocus to set.public boolean isRowFocus()
public void setRowFocus(boolean rowFocus)
rowFocus
- The rowFocus to set.public boolean isCellSelected()
public void setCellSelected(boolean cellSelected)
cellSelected
- the cellSelected to setpublic org.eclipse.swt.graphics.Rectangle getTextBounds(GridItem item, boolean preferred)
null
is returned here, in-place tooltips
will not be displayed. If the preferred
argument is
true
then the returned bounds should be large enough to show the
entire text. If preferred
is false
then the
returned bounds should be be relative to the current bounds.item
- item to calculate text bounds.preferred
- true if the preferred width of the text should be returned.public boolean isWordWrap()
public void setWordWrap(boolean wordWrap)
wordWrap
- the wordWrap to setpublic boolean isDragging()
public void setDragging(boolean dragging)
dragging
- The state to set.public int getTruncationStyle()
public void setTruncationStyle(int truncationStyle)
truncationStyle
- SWT.LEFT
,
SWT.CENTER
,
SWT.RIGHT