Eclipse Platform
2.0

org.eclipse.jface.text.source
Class LineNumberRulerColumn

java.lang.Object
  |
  +--org.eclipse.jface.text.source.LineNumberRulerColumn
All Implemented Interfaces:
IVerticalRulerColumn

public final class LineNumberRulerColumn
extends Object
implements IVerticalRulerColumn

A vertical ruler column displaying line numbers. Clients may use this class as is.

Since:
2.0

Constructor Summary
LineNumberRulerColumn()
          Constructs a new vertical ruler column.
 
Method Summary
protected  void computeIndentations()
          Computes the indentations for the given font and stores them in fIndentation.
 Control createControl(CompositeRuler parentRuler, Composite parentControl)
          Creates the column's SWT control.
protected  Color getBackground(Display display)
          Returns the System background color for list widgets.
 Control getControl()
          Returns the column's SWT control.
protected  int getVisibleLinesInViewport()
          Returns the viewport height in lines.
 int getWidth()
          Returns the width of this column's control.
 void redraw()
          Redraws this column.
 void setBackground(Color background)
          Sets the background color of this column.
 void setFont(Font font)
          Sets the font of this ruler column.
 void setForeground(Color foreground)
          Sets the foreground color of this column.
 void setModel(IAnnotationModel model)
          Associates an annotation model with this ruler column.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LineNumberRulerColumn

public LineNumberRulerColumn()
Constructs a new vertical ruler column.

Method Detail

setForeground

public void setForeground(Color foreground)
Sets the foreground color of this column.

Parameters:
foreground - the foreground color

setBackground

public void setBackground(Color background)
Sets the background color of this column.

Parameters:
background - the background color

getBackground

protected Color getBackground(Display display)
Returns the System background color for list widgets.

Parameters:
display - the display
Returns:
the System background color for list widgets

getControl

public Control getControl()
Description copied from interface: IVerticalRulerColumn
Returns the column's SWT control.

Specified by:
getControl in interface IVerticalRulerColumn
Returns:
the column's SWT control

getWidth

public int getWidth()
Description copied from interface: IVerticalRulerColumn
Returns the width of this column's control.

Specified by:
getWidth in interface IVerticalRulerColumn
Returns:
the width of this column's control

computeIndentations

protected void computeIndentations()
Computes the indentations for the given font and stores them in fIndentation.


createControl

public Control createControl(CompositeRuler parentRuler,
                             Composite parentControl)
Description copied from interface: IVerticalRulerColumn
Creates the column's SWT control.

Specified by:
createControl in interface IVerticalRulerColumn
Parameters:
parentRuler - the parent ruler of this column
parentControl - the control of the parent ruler
Returns:
the column's SWT control

getVisibleLinesInViewport

protected int getVisibleLinesInViewport()
Returns the viewport height in lines.

Returns:
the viewport height in lines

redraw

public void redraw()
Description copied from interface: IVerticalRulerColumn
Redraws this column.

Specified by:
redraw in interface IVerticalRulerColumn

setModel

public void setModel(IAnnotationModel model)
Description copied from interface: IVerticalRulerColumn
Associates an annotation model with this ruler column. A value null is acceptable and clears the ruler.

Specified by:
setModel in interface IVerticalRulerColumn
Parameters:
model - the new annotation model, may be null

setFont

public void setFont(Font font)
Description copied from interface: IVerticalRulerColumn
Sets the font of this ruler column.

Specified by:
setFont in interface IVerticalRulerColumn
Parameters:
font - the new font of the ruler column

Eclipse Platform
2.0

Copyright (c) IBM Corp. and others 2000, 2002. All Rights Reserved.