de.kupzog.ktable.renderers
Class PlusMinusBarDiagramCellRenderer
java.lang.Object
de.kupzog.ktable.renderers.DefaultCellRenderer
de.kupzog.ktable.renderers.BarDiagramCellRenderer
de.kupzog.ktable.renderers.PlusMinusBarDiagramCellRenderer
- All Implemented Interfaces:
- KTableCellRenderer
public class PlusMinusBarDiagramCellRenderer
- extends BarDiagramCellRenderer
Renderer that draws plus and minus values in two bars.
Expects a Collection as data to be drawn.
Assumes that the given content object is a collection containing two percentage values:
a value with a positive meaning and a value with a negative value. (in that order).
- Author:
- Lorenz Maierhofer
Fields inherited from class de.kupzog.ktable.renderers.DefaultCellRenderer |
COLOR_BACKGROUND, COLOR_BGFOCUS, COLOR_BGROWFOCUS, COLOR_COMMENTSIGN, COLOR_FGROWFOCUS, COLOR_FIXEDHIGHLIGHT, COLOR_LINE_DARKGRAY, COLOR_LINE_LIGHTGRAY, COLOR_TEXT, INDICATION_CLICKED, INDICATION_COMMENT, INDICATION_FOCUS, INDICATION_FOCUS_ROW, INDICATION_GRADIENT, INDICATION_SORT, m_alignment, m_bgColor, m_Display, m_fgColor, m_FixedRenderer, m_Style, m_TextRenderer, STYLE_FLAT, STYLE_PUSH |
Method Summary |
protected void |
drawBar(org.eclipse.swt.graphics.GC gc,
org.eclipse.swt.graphics.Rectangle rect,
java.lang.Object content,
org.eclipse.swt.graphics.Color background,
org.eclipse.swt.graphics.Color foreground)
Assumes that the given content object is a collection containing two percentage values:
a value with a positive meaning and a value with a negative value. |
protected void |
drawRightToLeftGradientBar(org.eclipse.swt.graphics.GC gc,
org.eclipse.swt.graphics.Rectangle rect,
float percent,
org.eclipse.swt.graphics.Color foreground,
org.eclipse.swt.graphics.Color background)
|
protected void |
drawRightToLeftNormalBar(org.eclipse.swt.graphics.GC gc,
org.eclipse.swt.graphics.Rectangle rect,
org.eclipse.swt.graphics.Color background,
org.eclipse.swt.graphics.Color foreground,
float percent)
|
Methods inherited from class de.kupzog.ktable.renderers.DefaultCellRenderer |
drawCellContent, drawCommentSign, drawDefaultSolidCellLine, drawVerticalCellContent, getAlignment, getBackground, getForeground, getStyle, setAlignment, setBackground, setDefaultBackground, setDefaultForeground, setForeground, setStyle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PlusMinusBarDiagramCellRenderer
public PlusMinusBarDiagramCellRenderer(int style)
- Parameters:
style
- The style bits to use.
Currently supported are:
- INDICATION_FOCUS
- INDICATION_FOCUS_ROW
- INDICATION_GRADIENT
drawBar
protected void drawBar(org.eclipse.swt.graphics.GC gc,
org.eclipse.swt.graphics.Rectangle rect,
java.lang.Object content,
org.eclipse.swt.graphics.Color background,
org.eclipse.swt.graphics.Color foreground)
- Assumes that the given content object is a collection containing two percentage values:
a value with a positive meaning and a value with a negative value. (in that order).
- Overrides:
drawBar
in class BarDiagramCellRenderer
- Parameters:
gc
- rect
- m_fraction
- background
-
drawRightToLeftGradientBar
protected void drawRightToLeftGradientBar(org.eclipse.swt.graphics.GC gc,
org.eclipse.swt.graphics.Rectangle rect,
float percent,
org.eclipse.swt.graphics.Color foreground,
org.eclipse.swt.graphics.Color background)
drawRightToLeftNormalBar
protected void drawRightToLeftNormalBar(org.eclipse.swt.graphics.GC gc,
org.eclipse.swt.graphics.Rectangle rect,
org.eclipse.swt.graphics.Color background,
org.eclipse.swt.graphics.Color foreground,
float percent)