setSize(new Point(17, 16));
}
public void paint(GC gc, Object value)
{
Transform transform = new Transform(gc.getDevice());
transform.translate(getBounds().x, getBounds().y);
gc.setTransform(transform);
Color back = gc.getBackground();
Color fore = gc.getForeground();
if (isHover())
{
Color old = gc.getForeground();
gc.setForeground(gc.getDevice().getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW));
gc.drawRoundRectangle(0, 0, 16, 15, 5, 5);
gc.setForeground(old);
}
if (isExpanded())
{
gc.drawPolygon(new int[] {5, 6, 8, 3, 11, 6, 10, 6, 8, 4, 6, 6 });
gc.drawPolygon(new int[] {5, 10, 8, 7, 11, 10, 10, 10, 8, 8, 6, 10 });
}
else
{
gc.drawPolygon(new int[] {5, 4, 8, 7, 11, 4, 10, 4, 8, 6, 6, 4 });
gc.drawPolygon(new int[] {5, 8, 8, 11, 11, 8, 10, 8, 8, 10, 6, 8 });
}
if (isFocus())
{
gc.setBackground(back);
gc.setForeground(fore);
gc.drawFocus(2, 2, 13, 12);
}
gc.setTransform(null);
transform.dispose();
}