org.eclipse.contribution.visualiser.renderers
Class DefaultVisualiserRenderer

java.lang.Object
  extended byorg.eclipse.contribution.visualiser.renderers.ClassicVisualiserRenderer
      extended byorg.eclipse.contribution.visualiser.renderers.DefaultVisualiserRenderer
All Implemented Interfaces:
IVisualiserRenderer
Direct Known Subclasses:
GradientVisualiserRenderer

public class DefaultVisualiserRenderer
extends ClassicVisualiserRenderer

Implements the visualiser renderer interface to provide the default visualiser drawing style, which has plain columns plus Eclipse style headers with rounded corners. Custom renderers can either implement the interface directly or extend this class, or any of the other renderers.

Author:
mchapman

Field Summary
protected  org.eclipse.swt.graphics.Color[] colorList
           
protected static byte[][] cornerData
           
protected static int cornerSize
           
protected  org.eclipse.swt.graphics.Color lightGrayGradientColor
           
protected  org.eclipse.swt.graphics.Color outlineColor
           
protected  org.eclipse.swt.graphics.Color outlineColor2
           
 
Constructor Summary
DefaultVisualiserRenderer()
           
 
Method Summary
 int getColumnHeaderHeight()
          The space required for headers of each columns
 int getMarginSize()
          The padding to be used around the edges of the visualiser
 int getSpacing()
          The space in-between columns
 void paintColumn(org.eclipse.swt.graphics.GC gc, IMember m, int x, int yoff, int colWidth, int colHeight, boolean affected)
          Paint the actual column (but not any stripes)
 void paintColumnHeader(org.eclipse.swt.graphics.GC gc, IMember m, int x, int colWidth)
          Paint the title of a column, typically the name of the given IMember
 
Methods inherited from class org.eclipse.contribution.visualiser.renderers.ClassicVisualiserRenderer
getConstrainedString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

outlineColor

protected org.eclipse.swt.graphics.Color outlineColor

outlineColor2

protected org.eclipse.swt.graphics.Color outlineColor2

lightGrayGradientColor

protected org.eclipse.swt.graphics.Color lightGrayGradientColor

colorList

protected org.eclipse.swt.graphics.Color[] colorList

cornerSize

protected static int cornerSize

cornerData

protected static byte[][] cornerData
Constructor Detail

DefaultVisualiserRenderer

public DefaultVisualiserRenderer()
Method Detail

getColumnHeaderHeight

public int getColumnHeaderHeight()
Description copied from interface: IVisualiserRenderer
The space required for headers of each columns

Specified by:
getColumnHeaderHeight in interface IVisualiserRenderer
Overrides:
getColumnHeaderHeight in class ClassicVisualiserRenderer

paintColumnHeader

public void paintColumnHeader(org.eclipse.swt.graphics.GC gc,
                              IMember m,
                              int x,
                              int colWidth)
Description copied from interface: IVisualiserRenderer
Paint the title of a column, typically the name of the given IMember

Specified by:
paintColumnHeader in interface IVisualiserRenderer
Overrides:
paintColumnHeader in class ClassicVisualiserRenderer

getSpacing

public int getSpacing()
Description copied from interface: IVisualiserRenderer
The space in-between columns

Specified by:
getSpacing in interface IVisualiserRenderer
Overrides:
getSpacing in class ClassicVisualiserRenderer

getMarginSize

public int getMarginSize()
Description copied from interface: IVisualiserRenderer
The padding to be used around the edges of the visualiser

Specified by:
getMarginSize in interface IVisualiserRenderer
Overrides:
getMarginSize in class ClassicVisualiserRenderer

paintColumn

public void paintColumn(org.eclipse.swt.graphics.GC gc,
                        IMember m,
                        int x,
                        int yoff,
                        int colWidth,
                        int colHeight,
                        boolean affected)
Description copied from interface: IVisualiserRenderer
Paint the actual column (but not any stripes)

Specified by:
paintColumn in interface IVisualiserRenderer
Overrides:
paintColumn in class ClassicVisualiserRenderer