Class SimpleToolItemRenderer
- java.lang.Object
-
- org.eclipse.nebula.widgets.pgroup.AbstractRenderer
-
- org.eclipse.nebula.widgets.pgroup.AbstractToolItemRenderer
-
- org.eclipse.nebula.widgets.pgroup.SimpleToolItemRenderer
-
public class SimpleToolItemRenderer extends AbstractToolItemRenderer
-
-
Field Summary
Fields Modifier and Type Field Description private int
dropDownWidth
private int
padding
-
Fields inherited from class org.eclipse.nebula.widgets.pgroup.AbstractToolItemRenderer
DEFAULT, MIN
-
-
Constructor Summary
Constructors Constructor Description SimpleToolItemRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.swt.graphics.Rectangle
computeDropDownArea(org.eclipse.swt.graphics.Rectangle totalRect)
Computes the area where the DropDown-Icon is shown in case ofSWT.DROP_DOWN
org.eclipse.swt.graphics.Point
computeSize(org.eclipse.swt.graphics.GC gc, PGroupToolItem item, int type)
Computes the size needed for the toolitemvoid
paint(org.eclipse.swt.graphics.GC gc, java.lang.Object value)
-
Methods inherited from class org.eclipse.nebula.widgets.pgroup.AbstractToolItemRenderer
getSizeType, setSizeType
-
Methods inherited from class org.eclipse.nebula.widgets.pgroup.AbstractRenderer
getBounds, getSize, isExpanded, isFocus, isHover, isMouseDown, isSelected, setBounds, setBounds, setExpanded, setFocus, setHover, setLocation, setLocation, setMouseDown, setSelected, setSize, setSize
-
-
-
-
Method Detail
-
paint
public void paint(org.eclipse.swt.graphics.GC gc, java.lang.Object value)
- Specified by:
paint
in classAbstractToolItemRenderer
-
computeSize
public org.eclipse.swt.graphics.Point computeSize(org.eclipse.swt.graphics.GC gc, PGroupToolItem item, int type)
Description copied from class:AbstractToolItemRenderer
Computes the size needed for the toolitem- Specified by:
computeSize
in classAbstractToolItemRenderer
- Parameters:
gc
- the gcitem
- the toolitemtype
- size type- Returns:
- the computed size for the toolitem and sizeType
- See Also:
AbstractToolItemRenderer.DEFAULT
,AbstractToolItemRenderer.MIN
-
computeDropDownArea
public org.eclipse.swt.graphics.Rectangle computeDropDownArea(org.eclipse.swt.graphics.Rectangle totalRect)
Description copied from class:AbstractToolItemRenderer
Computes the area where the DropDown-Icon is shown in case ofSWT.DROP_DOWN
- Specified by:
computeDropDownArea
in classAbstractToolItemRenderer
- Parameters:
totalRect
- the total area the item is drawn- Returns:
-
-