public abstract class GridHeaderRenderer 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 header renderers. Contains the properties specific to a grid header.Modifier and Type | Field and Description |
---|---|
protected int |
truncationStyle
Truncation style
|
hoverDetail
LeftMouseButtonDown, MouseMove
Constructor and Description |
---|
GridHeaderRenderer() |
Modifier and Type | Method and Description |
---|---|
protected org.eclipse.swt.graphics.Rectangle |
getControlBounds(java.lang.Object value,
boolean preferred)
Returns the bounds of the control to display
|
int |
getHorizontalAlignment()
Returns the header horizontal alignment.
|
org.eclipse.swt.graphics.Rectangle |
getTextBounds(java.lang.Object value,
boolean preferred)
Returns the bounds of the text in the cell.
|
org.eclipse.swt.graphics.Rectangle |
getToggleBounds()
Returns the bounds of the toggle within the header (typically only group headers have toggles)
or null.
|
int |
getTruncationStyle()
Get the truncation style
|
boolean |
isWordWrap()
Returns whether or not text will be word-wrapped during the render
|
void |
setHorizontalAlignment(int alignment)
Sets the header horizontal alignment.
|
void |
setTruncationStyle(int truncationStyle)
Set the truncation style to use when cell content is too large.
|
void |
setWordWrap(boolean wordWrap)
Sets whether or not text should be word-wrapped during the render
|
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 org.eclipse.swt.graphics.Rectangle getTextBounds(java.lang.Object value, 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.value
- the object being rendered.preferred
- true if the preferred width of the text should be returned.public org.eclipse.swt.graphics.Rectangle getToggleBounds()
protected org.eclipse.swt.graphics.Rectangle getControlBounds(java.lang.Object value, boolean preferred)
value
- the control to displaypreferred
- if true
, compute the preferred sizenull
if no control is
renderedpublic boolean isWordWrap()
public void setWordWrap(boolean wordWrap)
wordWrap
- True to wrap text, false otherwisepublic int getHorizontalAlignment()
org.eclipse.swt.SWTException
- public void setHorizontalAlignment(int alignment)
alignment
- The alignment to set.public int getTruncationStyle()
public void setTruncationStyle(int truncationStyle)
truncationStyle
- SWT.LEFT
,
SWT.CENTER
,
SWT.RIGHT