public class RedmondShelfRenderer extends AbstractRenderer
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.
Constructor and Description |
---|
RedmondShelfRenderer() |
Modifier and Type | Method and Description |
---|---|
org.eclipse.swt.graphics.Point |
computeSize(org.eclipse.swt.graphics.GC gc,
int wHint,
int hHint,
java.lang.Object value)
Returns the size of the given value's visual representation.
|
void |
dispose()
Disposes of any resources managed by this renderer.
|
org.eclipse.swt.graphics.Font |
getFont() |
org.eclipse.swt.graphics.Color |
getForeground() |
org.eclipse.swt.graphics.Color |
getGradient1() |
org.eclipse.swt.graphics.Color |
getGradient2() |
org.eclipse.swt.graphics.Color |
getHoverForeground() |
org.eclipse.swt.graphics.Color |
getHoverGradient1() |
org.eclipse.swt.graphics.Color |
getHoverGradient2() |
org.eclipse.swt.graphics.Color |
getLineColor() |
org.eclipse.swt.graphics.Font |
getSelectedFont() |
org.eclipse.swt.graphics.Color |
getSelectedForeground() |
org.eclipse.swt.graphics.Color |
getSelectedGradient1() |
org.eclipse.swt.graphics.Color |
getSelectedGradient2() |
void |
initialize(org.eclipse.swt.widgets.Control control)
Performs any initialization logic (such as creating new colors or fonts).
|
void |
paint(org.eclipse.swt.graphics.GC gc,
java.lang.Object value)
Paints the visual representation of the given value on the given GC.
|
void |
setFont(org.eclipse.swt.graphics.Font font) |
void |
setForeground(org.eclipse.swt.graphics.Color foreground)
Sets text color for non-selected items.
|
void |
setGradient1(org.eclipse.swt.graphics.Color gradient1) |
void |
setGradient2(org.eclipse.swt.graphics.Color gradient2) |
void |
setHoverForeground(org.eclipse.swt.graphics.Color hoverForeground)
Sets text color for the hovered item.
|
void |
setHoverGradient1(org.eclipse.swt.graphics.Color hoverGradient1) |
void |
setHoverGradient2(org.eclipse.swt.graphics.Color hoverGradient2) |
void |
setLineColor(org.eclipse.swt.graphics.Color lineColor) |
void |
setSelectedFont(org.eclipse.swt.graphics.Font selectedFont) |
void |
setSelectedForeground(org.eclipse.swt.graphics.Color selectedForeground)
Sets text color for the selected item.
|
void |
setSelectedGradient1(org.eclipse.swt.graphics.Color selectedGradient1) |
void |
setSelectedGradient2(org.eclipse.swt.graphics.Color selectedGradient2) |
getBounds, getSize, isDisposed, isExpanded, isFocus, isHover, isMouseDown, isSelected, setBounds, setBounds, setDisposed, setExpanded, setFocus, setHover, setLocation, setLocation, setMouseDown, setSelected, setSize, setSize
public org.eclipse.swt.graphics.Point computeSize(org.eclipse.swt.graphics.GC gc, int wHint, int hHint, java.lang.Object value)
computeSize
in class AbstractRenderer
gc
- convenience GC for string and text extentswHint
- given width (or SWT.DEFAULT)hHint
- given height (or SWT.DEFAULT)value
- value to be sizedpublic void paint(org.eclipse.swt.graphics.GC gc, java.lang.Object value)
AbstractRenderer
Implementors need to respect the bounds values that may have been
specified. The bounds values may affect the x and y values for all
drawing operations as well as the width and heights. Implementors may use
a Transform
to translate the coordinates of all the
drawing operations, otherwise they will need to offset each draw.
paint
in class AbstractRenderer
gc
- GC to paint withvalue
- the value being paintedAbstractRenderer.paint(org.eclipse.swt.graphics.GC, java.lang.Object)
public void initialize(org.eclipse.swt.widgets.Control control)
AbstractRenderer
initialize
in class AbstractRenderer
control
- control that is using the rendererAbstractRenderer.initialize(org.eclipse.swt.widgets.Control)
public void dispose()
AbstractRenderer
dispose
in class AbstractRenderer
AbstractRenderer.dispose()
public org.eclipse.swt.graphics.Color getLineColor()
public void setLineColor(org.eclipse.swt.graphics.Color lineColor)
public org.eclipse.swt.graphics.Font getFont()
public void setFont(org.eclipse.swt.graphics.Font font)
public org.eclipse.swt.graphics.Color getGradient1()
public void setGradient1(org.eclipse.swt.graphics.Color gradient1)
public org.eclipse.swt.graphics.Color getGradient2()
public void setGradient2(org.eclipse.swt.graphics.Color gradient2)
public org.eclipse.swt.graphics.Color getHoverGradient1()
public void setHoverGradient1(org.eclipse.swt.graphics.Color hoverGradient1)
public org.eclipse.swt.graphics.Color getHoverGradient2()
public void setHoverGradient2(org.eclipse.swt.graphics.Color hoverGradient2)
public org.eclipse.swt.graphics.Font getSelectedFont()
public void setSelectedFont(org.eclipse.swt.graphics.Font selectedFont)
public org.eclipse.swt.graphics.Color getSelectedForeground()
public void setSelectedForeground(org.eclipse.swt.graphics.Color selectedForeground)
selectedForeground
- Can be null
, foreground color of the parent is
used in that case.public org.eclipse.swt.graphics.Color getHoverForeground()
public void setHoverForeground(org.eclipse.swt.graphics.Color hoverForeground)
hoverForeground
- Can be null
, foreground color of the parent is
used in that case.public org.eclipse.swt.graphics.Color getForeground()
public void setForeground(org.eclipse.swt.graphics.Color foreground)
foreground
- Can be null
, foreground color of the parent is
used in that case.public org.eclipse.swt.graphics.Color getSelectedGradient1()
public void setSelectedGradient1(org.eclipse.swt.graphics.Color selectedGradient1)
public org.eclipse.swt.graphics.Color getSelectedGradient2()
public void setSelectedGradient2(org.eclipse.swt.graphics.Color selectedGradient2)