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.Rectangle
getBounds()
Returns the bounds.org.eclipse.swt.widgets.Display
getDisplay()
Sets the display for the renderer.org.eclipse.swt.graphics.Point
getSize()
Returns the size.boolean
isExpanded()
Returns the expansion state.boolean
isFocus()
Returns a boolean value indicating if this renderer has focus.boolean
isHover()
Returns the hover state.boolean
isMouseDown()
Returns the boolean value indicating if the renderer has the mouseDown state.boolean
isSelected()
Returns the boolean state indicating if the selected state is set.void
setBounds(int x, int y, int width, int height)
Sets the bounds of the drawing.void
setBounds(org.eclipse.swt.graphics.Rectangle bounds)
Sets the bounds of the drawing.void
setDisplay(org.eclipse.swt.widgets.Display display)
Sets the display.void
setExpanded(boolean expanded)
Sets the expansion state of this renderer.void
setFocus(boolean focus)
Sets focus state.void
setHover(boolean hover)
Sets the hover state.void
setLocation(int x, int y)
Sets the location of the drawing.void
setLocation(org.eclipse.swt.graphics.Point location)
Sets the location of the drawing.void
setMouseDown(boolean mouseDown)
Sets the hover state.void
setSelected(boolean selected)
Sets the selected state.void
setSize(int width, int height)
Sets the area of the drawing.void
setSize(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:
setLocation
in interfaceIRenderer
- Parameters:
x
- X.y
- Y.
-
setLocation
public void setLocation(org.eclipse.swt.graphics.Point location)Sets the location of the drawing.- Specified by:
setLocation
in 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:
setMouseDown
in 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:
setSelected
in 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:
setExpanded
in 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:
setDisplay
in interfaceIRenderer
- Parameters:
display
- Display.
-