org.eclipse.contribution.visualiser.renderers
Class ClassicVisualiserRenderer

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

public class ClassicVisualiserRenderer
extends java.lang.Object
implements IVisualiserRenderer

Implements the visualiser renderer interface to provide the classic visualiser drawing style.

Author:
mchapman

Constructor Summary
ClassicVisualiserRenderer()
           
 
Method Summary
 int getColumnHeaderHeight()
          The space required for headers of each columns
protected  java.lang.String getConstrainedString(org.eclipse.swt.graphics.GC gc, java.lang.String name, int width)
           
 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassicVisualiserRenderer

public ClassicVisualiserRenderer()
Method Detail

getSpacing

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

Specified by:
getSpacing in interface IVisualiserRenderer
Returns:
the gap in pixels

getColumnHeaderHeight

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

Specified by:
getColumnHeaderHeight in interface IVisualiserRenderer
Returns:
the height in pixels

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
Returns:
the margin size in pixels

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
Parameters:
gc - the graphics context to paint to
m - the IMember for this column
x - the horizontal coordinate for the start of this column
colWidth - the width of the column

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
Parameters:
gc - the graphics context to paint to
m - the IMember for this column
x -
yoff -
colWidth -
colHeight -
affected - indicates whether this column is affected by any stripes

getConstrainedString

protected java.lang.String getConstrainedString(org.eclipse.swt.graphics.GC gc,
                                                java.lang.String name,
                                                int width)