public abstract class AbstractToolItemRenderer extends AbstractRenderer
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT
Defines that item should be rendered in its default way:
Icon+Text if both defined
Icon if Text is
null
Text if Icon is null
|
static int |
MIN
Defines that item should be rendered in its minimal way:
Icon only if both defined
Icon if Text is
null
Text if Icon is null
|
Constructor and Description |
---|
AbstractToolItemRenderer() |
Modifier and Type | Method and 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 of
SWT.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 toolitem
|
int |
getSizeType()
Get the size type
|
abstract void |
paint(org.eclipse.swt.graphics.GC gc,
java.lang.Object value) |
void |
setSizeType(int sizeType)
Set the size type
|
getBounds, getSize, isExpanded, isFocus, isHover, isMouseDown, isSelected, setBounds, setBounds, setExpanded, setFocus, setHover, setLocation, setLocation, setMouseDown, setSelected, setSize, setSize
public static final int DEFAULT
null
null
public static final int MIN
null
null
public void setSizeType(int sizeType)
public int getSizeType()
public abstract void paint(org.eclipse.swt.graphics.GC gc, java.lang.Object value)
paint
in class AbstractRenderer
public abstract org.eclipse.swt.graphics.Point computeSize(org.eclipse.swt.graphics.GC gc, PGroupToolItem item, int sizeType)
public abstract org.eclipse.swt.graphics.Rectangle computeDropDownArea(org.eclipse.swt.graphics.Rectangle totalRect)
SWT.DROP_DOWN
totalRect
- the total area the item is drawn