Package org.eclipse.nebula.widgets.grid
Interface IRenderer
-
- All Known Subinterfaces:
IInternalWidget
- All Known Implementing Classes:
AbstractInternalWidget,AbstractRenderer,BranchRenderer,CheckBoxRenderer,DefaultBottomLeftRenderer,DefaultCellRenderer,DefaultColumnFooterRenderer,DefaultColumnGroupHeaderRenderer,DefaultColumnHeaderRenderer,DefaultDropPointRenderer,DefaultEmptyCellRenderer,DefaultEmptyColumnFooterRenderer,DefaultEmptyColumnHeaderRenderer,DefaultEmptyRowHeaderRenderer,DefaultFocusRenderer,DefaultInsertMarkRenderer,DefaultRowHeaderRenderer,DefaultTopLeftRenderer,ExpandToggleRenderer,GridCellRenderer,GridFooterRenderer,GridHeaderRenderer,GroupToggleRenderer,SortArrowRenderer,ToggleRenderer,Win7ColumnGroupHeaderRenderer,Win7EmptyColumnHeaderRenderer,Win7GridColumnHeaderRenderer
public interface IRendererNOTE: THIS WIDGET AND ITS API ARE STILL UNDER DEVELOPMENT. THIS IS A PRE-RELEASE ALPHA VERSION. USERS SHOULD EXPECT API CHANGES IN FUTURE VERSIONS.
Renders a single visual unit. A IRenderer implementation can have state (i.e. is hovered or is selected) that affects the drawing.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.eclipse.swt.graphics.PointcomputeSize(org.eclipse.swt.graphics.GC gc, int wHint, int hHint, java.lang.Object value)Returns the size of the given value's visual representation.voidpaint(org.eclipse.swt.graphics.GC gc, java.lang.Object value)Paints the visual representation of the given value on the given GC.voidsetBounds(int x, int y, int width, int height)Sets the bounds of the drawing.voidsetBounds(org.eclipse.swt.graphics.Rectangle bounds)Sets the bounds of the drawing.voidsetDisplay(org.eclipse.swt.widgets.Display display)Sets the display.voidsetExpanded(boolean expanded)Sets the expanded state.voidsetFocus(boolean focus)Sets focus state.voidsetHover(boolean hover)Sets the hover state.voidsetLocation(int x, int y)Sets the location of the drawing.voidsetLocation(org.eclipse.swt.graphics.Point location)Sets the location of the drawing.voidsetMouseDown(boolean mouseDown)Sets the hover state.voidsetSelected(boolean selected)Sets the selected state.voidsetSize(int width, int height)Sets the area of the drawing.voidsetSize(org.eclipse.swt.graphics.Point size)Sets the area of the drawing.
-
-
-
Method Detail
-
paint
void paint(org.eclipse.swt.graphics.GC gc, java.lang.Object value)Paints the visual representation of the given value on the given GC. The actual class of the value object is determined by the use of the implementing class.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
Transformto translate the coordinates of all the drawing operations, otherwise they will need to offset each draw.- Parameters:
gc- GC to paint withvalue- the value being painted
-
computeSize
org.eclipse.swt.graphics.Point computeSize(org.eclipse.swt.graphics.GC gc, int wHint, int hHint, java.lang.Object value)Returns the size of the given value's visual representation.- Parameters:
gc- convenience GC for string and text extentswHint- given width (or SWT.DEFAULT)hHint- given height (or SWT.DEFAULT)value- value to be sized- Returns:
- the size
-
setBounds
void setBounds(org.eclipse.swt.graphics.Rectangle bounds)
Sets the bounds of the drawing.- Parameters:
bounds- Bounds.
-
setBounds
void setBounds(int x, int y, int width, int height)Sets the bounds of the drawing.- Parameters:
x- X coordinate.y- Y coordinate.width- Width.height- Height.
-
setLocation
void setLocation(org.eclipse.swt.graphics.Point location)
Sets the location of the drawing.- Parameters:
location- Location.
-
setLocation
void setLocation(int x, int y)Sets the location of the drawing.- Parameters:
x- X.y- Y.
-
setFocus
void setFocus(boolean focus)
Sets focus state.- Parameters:
focus- focus state.
-
setHover
void setHover(boolean hover)
Sets the hover state.- Parameters:
hover- Hover state.
-
setMouseDown
void setMouseDown(boolean mouseDown)
Sets the hover state.- Parameters:
mouseDown- Mouse state.
-
setSelected
void setSelected(boolean selected)
Sets the selected state.- Parameters:
selected- Selection state.
-
setExpanded
void setExpanded(boolean expanded)
Sets the expanded state.- Parameters:
expanded- Expansion state.
-
setSize
void setSize(int width, int height)Sets the area of the drawing.- Parameters:
width- Width.height- Height.
-
setSize
void setSize(org.eclipse.swt.graphics.Point size)
Sets the area of the drawing.- Parameters:
size- Size.
-
setDisplay
void setDisplay(org.eclipse.swt.widgets.Display display)
Sets the display.- Parameters:
display- Display.
-
-