Package org.eclipse.nebula.widgets.grid
Class AbstractRenderer
java.lang.Object
org.eclipse.nebula.widgets.grid.AbstractRenderer
- All Implemented Interfaces:
IRenderer
- Direct Known Subclasses:
AbstractInternalWidget,BranchRenderer,CheckBoxRenderer,DefaultBottomLeftRenderer,DefaultDropPointRenderer,DefaultEmptyColumnFooterRenderer,DefaultEmptyColumnHeaderRenderer,DefaultEmptyRowHeaderRenderer,DefaultFocusRenderer,DefaultInsertMarkRenderer,DefaultRowHeaderRenderer,DefaultTopLeftRenderer,ExpandToggleRenderer,GroupToggleRenderer,SortArrowRenderer,ToggleRenderer,Win7EmptyColumnHeaderRenderer
public abstract class AbstractRenderer extends java.lang.Object implements IRenderer
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.
Base implementation of IRenderer. Provides management of a few values.-
Constructor Summary
Constructors Constructor Description AbstractRenderer() -
Method Summary
Modifier and Type Method Description org.eclipse.swt.graphics.RectanglegetBounds()Returns the bounds.org.eclipse.swt.widgets.DisplaygetDisplay()Sets the display for the renderer.org.eclipse.swt.graphics.PointgetSize()Returns the size.booleanisExpanded()Returns the expansion state.booleanisFocus()Returns a boolean value indicating if this renderer has focus.booleanisHover()Returns the hover state.booleanisMouseDown()Returns the boolean value indicating if the renderer has the mouseDown state.booleanisSelected()Returns the boolean state indicating if the selected state is set.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 expansion state of this renderer.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.
-
Constructor Details
-
AbstractRenderer
public AbstractRenderer()
-
-
Method Details
-
getBounds
public org.eclipse.swt.graphics.Rectangle getBounds()Returns the bounds.- Returns:
- Rectangle describing the bounds.
-
setBounds
public void setBounds(int x, int y, int width, int height)Sets the bounds of the drawing. -
setBounds
public void setBounds(org.eclipse.swt.graphics.Rectangle bounds)Sets the bounds of the drawing. -
getSize
public org.eclipse.swt.graphics.Point getSize()Returns the size.- Returns:
- size of the renderer.
-
setLocation
public void setLocation(int x, int y)Sets the location of the drawing.- Specified by:
setLocationin interfaceIRenderer- Parameters:
x- X.y- Y.
-
setLocation
public void setLocation(org.eclipse.swt.graphics.Point location)Sets the location of the drawing.- Specified by:
setLocationin interfaceIRenderer- Parameters:
location- Location.
-
setSize
public void setSize(int width, int height)Sets the area of the drawing. -
setSize
public void setSize(org.eclipse.swt.graphics.Point size)Sets the area of the drawing. -
isFocus
public boolean isFocus()Returns a boolean value indicating if this renderer has focus.- Returns:
- True/false if has focus.
-
setFocus
public void setFocus(boolean focus)Sets focus state. -
isHover
public boolean isHover()Returns the hover state.- Returns:
- Is the renderer in the hover state.
-
setHover
public void setHover(boolean hover)Sets the hover state. -
isMouseDown
public boolean isMouseDown()Returns the boolean value indicating if the renderer has the mouseDown state.- Returns:
- mouse down state.
-
setMouseDown
public void setMouseDown(boolean mouseDown)Sets the hover state.- Specified by:
setMouseDownin interfaceIRenderer- Parameters:
mouseDown- Mouse state.
-
isSelected
public boolean isSelected()Returns the boolean state indicating if the selected state is set.- Returns:
- selected state.
-
setSelected
public void setSelected(boolean selected)Sets the selected state.- Specified by:
setSelectedin interfaceIRenderer- Parameters:
selected- Selection state.
-
isExpanded
public boolean isExpanded()Returns the expansion state.- Returns:
- Returns the expanded.
-
setExpanded
public void setExpanded(boolean expanded)Sets the expansion state of this renderer.- Specified by:
setExpandedin interfaceIRenderer- Parameters:
expanded- The expanded to set.
-
getDisplay
public org.eclipse.swt.widgets.Display getDisplay()Sets the display for the renderer.- Returns:
- Returns the display.
-
setDisplay
public void setDisplay(org.eclipse.swt.widgets.Display display)Sets the display.- Specified by:
setDisplayin interfaceIRenderer- Parameters:
display- Display.
-