public class Win7GridColumnHeaderRenderer extends DefaultColumnHeaderRenderer
Modifier and Type | Field and Description |
---|---|
(package private) int |
arrowMargin |
(package private) int |
bottomMargin |
(package private) int |
imageSpacing |
(package private) int |
leftMargin |
(package private) int |
rightMargin |
(package private) int |
topMargin |
LeftMouseButtonDown, MouseMove
Constructor and Description |
---|
Win7GridColumnHeaderRenderer(Win7PaletteProvider palette) |
Modifier and Type | Method and Description |
---|---|
protected static void |
drawColumnHeader(org.eclipse.swt.graphics.GC graphics,
org.eclipse.swt.graphics.Rectangle bounds,
org.eclipse.swt.graphics.Color[] colors)
Draw the column header based on the given colors
|
protected static void |
drawColumnSelectedTopShadow(org.eclipse.swt.graphics.GC graphics,
org.eclipse.swt.graphics.Rectangle bounds,
org.eclipse.swt.graphics.Color[] colors)
Draw an additional shadow for the selected column state
|
int |
getTruncationStyle()
Get the truncation style
|
void |
paint(org.eclipse.swt.graphics.GC gc,
java.lang.Object value)
Paints the visual representation of the given value on the given GC.
|
void |
setDisplay(org.eclipse.swt.widgets.Display d)
Set the display for the renderer
|
void |
setTruncationStyle(int truncationStyle)
Set the truncation style to use when cell content is too large.
|
computeSize, getControlBounds, getTextBounds, notify
getHorizontalAlignment, getToggleBounds, isWordWrap, setHorizontalAlignment, setWordWrap
getHoverDetail, setHoverDetail
getBounds, getDisplay, getSize, isExpanded, isFocus, isHover, isMouseDown, isSelected, setBounds, setBounds, setExpanded, setFocus, setHover, setLocation, setLocation, setMouseDown, setSelected, setSize, setSize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setBounds, setBounds, setExpanded, setFocus, setHover, setLocation, setLocation, setMouseDown, setSelected, setSize, setSize
int leftMargin
int rightMargin
int topMargin
int bottomMargin
int arrowMargin
int imageSpacing
public Win7GridColumnHeaderRenderer(Win7PaletteProvider palette)
palette
- public void setDisplay(org.eclipse.swt.widgets.Display d)
setDisplay
in interface IRenderer
setDisplay
in class DefaultColumnHeaderRenderer
d
- Displaypublic void paint(org.eclipse.swt.graphics.GC gc, java.lang.Object value)
Implementors need to respect the bounds values that may have been
specified. The bounds values may affect the x and y values for all
drawing operations as well as the width and heights. Implementors may use
a Transform
to translate the coordinates of all the
drawing operations, otherwise they will need to offset each draw.
paint
in interface IRenderer
paint
in class DefaultColumnHeaderRenderer
gc
- GC to paint withvalue
- the value being paintedprotected static void drawColumnSelectedTopShadow(org.eclipse.swt.graphics.GC graphics, org.eclipse.swt.graphics.Rectangle bounds, org.eclipse.swt.graphics.Color[] colors)
graphics
- bounds
- colors
- protected static void drawColumnHeader(org.eclipse.swt.graphics.GC graphics, org.eclipse.swt.graphics.Rectangle bounds, org.eclipse.swt.graphics.Color[] colors)
graphics
- bounds
- colors
- public int getTruncationStyle()
getTruncationStyle
in class GridHeaderRenderer
public void setTruncationStyle(int truncationStyle)
setTruncationStyle
in class GridHeaderRenderer
truncationStyle
- SWT.LEFT
,
SWT.CENTER
,
SWT.RIGHT