Class AbstractToolItemRenderer
java.lang.Object
org.eclipse.nebula.widgets.pgroup.AbstractRenderer
org.eclipse.nebula.widgets.pgroup.AbstractToolItemRenderer
- Direct Known Subclasses:
SimpleToolItemRenderer
public abstract class AbstractToolItemRenderer extends AbstractRenderer
Base implementation for rendering ToolItems in the header
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT
Defines that item should be rendered in its default way: Icon+Text if both defined Icon if Text isnull
Text if Icon isnull
static int
MIN
Defines that item should be rendered in its minimal way: Icon only if both defined Icon if Text isnull
Text if Icon isnull
-
Constructor Summary
Constructors Constructor Description AbstractToolItemRenderer()
-
Method Summary
Modifier and Type Method Description abstract 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
abstract org.eclipse.swt.graphics.Point
computeSize(org.eclipse.swt.graphics.GC gc, PGroupToolItem item, int sizeType)
Computes the size needed for the toolitemint
getSizeType()
Get the size typeabstract void
paint(org.eclipse.swt.graphics.GC gc, java.lang.Object value)
void
setSizeType(int sizeType)
Set the size typeMethods 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
-
Field Details
-
DEFAULT
public static final int DEFAULTDefines that item should be rendered in its default way:- Icon+Text if both defined
- Icon if Text is
null
- Text if Icon is
null
- See Also:
- Constant Field Values
-
MIN
public static final int MINDefines that item should be rendered in its minimal way:- Icon only if both defined
- Icon if Text is
null
- Text if Icon is
null
- See Also:
- Constant Field Values
-
-
Constructor Details
-
AbstractToolItemRenderer
public AbstractToolItemRenderer()
-
-
Method Details
-
setSizeType
public void setSizeType(int sizeType)Set the size type -
getSizeType
public int getSizeType()Get the size type- Returns:
- the current size type
-
paint
public abstract void paint(org.eclipse.swt.graphics.GC gc, java.lang.Object value)- Specified by:
paint
in classAbstractRenderer
-
computeSize
public abstract org.eclipse.swt.graphics.Point computeSize(org.eclipse.swt.graphics.GC gc, PGroupToolItem item, int sizeType)Computes the size needed for the toolitem -
computeDropDownArea
public abstract 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
- Parameters:
totalRect
- the total area the item is drawn- Returns:
-