Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.jface.text.source
Class ChangeRulerColumn


java.lang.Object
  extended by 
org.eclipse.jface.text.source.ChangeRulerColumn
All Implemented Interfaces:
IRevisionRulerColumn, IChangeRulerColumn, IVerticalRulerColumn, IVerticalRulerInfo, IVerticalRulerInfoExtension

public final class ChangeRulerColumn
extends Object
implements IVerticalRulerColumn, IVerticalRulerInfo, IVerticalRulerInfoExtension, IChangeRulerColumn, IRevisionRulerColumn

A vertical ruler column displaying line numbers and serving as a UI for quick diff. Clients instantiate and configure object of this class.

Since:
3.0

Field Summary
 
Fields inherited from interface org.eclipse.jface.text.source. IChangeRulerColumn
QUICK_DIFF_MODEL_ID
 
Constructor Summary
ChangeRulerColumn ()
          Deprecated. since 3.2 use ChangeRulerColumn(ISharedTextColors) instead
ChangeRulerColumn ( ISharedTextColors sharedColors)
          Creates a new revision ruler column.
 
Method Summary
 void addVerticalRulerListener ( IVerticalRulerListener listener)
          Registers a vertical ruler listener to be informed if an annotation gets selected on the vertical ruler.
  Control createControl ( CompositeRuler parentRuler, Composite parentControl)
          Creates the column's SWT control.
  Control getControl ()
          Returns the column's SWT control.
  IAnnotationHover getHover ()
          Returns the hover for this vertical ruler (column).
 int getLineOfLastMouseButtonActivity ()
          Returns the line number of the last mouse button activity.
  IAnnotationModel getModel ()
          Returns the model currently used by the receiver.
  ISelectionProvider getRevisionSelectionProvider ()
          Returns the revision selection provider.
protected  int getVisibleLinesInViewport ()
          Deprecated. as of 3.2 the number of lines in the viewport cannot be computed because StyledText supports variable line heights
 int getWidth ()
          Returns the width of this column's control.
protected  void handleDispose ()
          Disposes the column's resources.
protected  boolean isViewerCompletelyShown ()
          Returns true if the viewport displays the entire viewer contents, i.e. the viewer is not vertically scrollable.
protected  void postRedraw ()
          Triggers a redraw in the display thread.
 void redraw ()
          Redraws this column.
 void removeVerticalRulerListener ( IVerticalRulerListener listener)
          Removes a previously registered listener.
 void setAddedColor ( Color addedColor)
          Sets the background color for added lines.
 void setBackground ( Color background)
          Sets the background color for normal lines.
 void setChangedColor ( Color changedColor)
          Sets the background color for changed lines.
 void setDeletedColor ( Color deletedColor)
          Sets the color for the deleted lines indicator.
 void setFont ( Font font)
          Sets the font of this ruler column.
 void setHover ( IAnnotationHover hover)
          Sets the hover of this ruler column.
 void setModel ( IAnnotationModel model)
          Associates an annotation model with this ruler column.
 void setRevisionInformation ( RevisionInformation info)
          Sets the revision information.
 int toDocumentLineNumber (int y_coordinate)
          Translates a y-coordinate of the ruler's SWT control into the according line number of the document of the connected text viewer.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChangeRulerColumn

public ChangeRulerColumn()
Deprecated. since 3.2 use ChangeRulerColumn(ISharedTextColors) instead

Creates a new ruler column.


ChangeRulerColumn

public ChangeRulerColumn(
ISharedTextColors sharedColors)
Creates a new revision ruler column.

Parameters:
sharedColors - the colors to look up RGBs
Since:
3.2
Method Detail

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

handleDispose

protected void handleDispose()
Disposes the column's resources.


getVisibleLinesInViewport

protected int getVisibleLinesInViewport()
Deprecated. as of 3.2 the number of lines in the viewport cannot be computed because StyledText supports variable line heights

Returns the view port height in lines.

Returns:
the view port height in lines

isViewerCompletelyShown

protected final boolean isViewerCompletelyShown()
Returns true if the viewport displays the entire viewer contents, i.e. the viewer is not vertically scrollable.

Returns:
true if the viewport displays the entire contents, false otherwise
Since:
3.2

redraw

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

Specified by:
redraw in interface IVerticalRulerColumn

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

getLineOfLastMouseButtonActivity

public int getLineOfLastMouseButtonActivity()
Description copied from interface: IVerticalRulerInfo
Returns the line number of the last mouse button activity. Based on the input document of the connected text viewer.

Specified by:
getLineOfLastMouseButtonActivity in interface IVerticalRulerInfo
Returns:
the line number of the last mouse button activity or -1 if the last mouse activity does not correspond to a valid document line

toDocumentLineNumber

public int toDocumentLineNumber(int y_coordinate)
Description copied from interface: IVerticalRulerInfo
Translates a y-coordinate of the ruler's SWT control into the according line number of the document of the connected text viewer.

Specified by:
toDocumentLineNumber in interface IVerticalRulerInfo
Parameters:
y_coordinate - a y-coordinate of the ruler's SWT control
Returns:
the line number of that coordinate or -1 if that coordinate does not correspond to a valid document line

getHover

public 
IAnnotationHover getHover()
Description copied from interface: IVerticalRulerInfoExtension
Returns the hover for this vertical ruler (column).

Specified by:
getHover in interface IVerticalRulerInfoExtension
Returns:
the hover for this column

setHover

public void setHover(
IAnnotationHover hover)
Description copied from interface: IChangeRulerColumn
Sets the hover of this ruler column.

Specified by:
setHover in interface IChangeRulerColumn
Parameters:
hover - the hover that will produce hover information text for this ruler column

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

setBackground

public void setBackground(
Color background)
Description copied from interface: IChangeRulerColumn
Sets the background color for normal lines. The color has to be disposed of by the caller when the receiver is no longer used.

Specified by:
setBackground in interface IChangeRulerColumn
Parameters:
background - the new color to be used as standard line background

setAddedColor

public void setAddedColor(
Color addedColor)
Description copied from interface: IChangeRulerColumn
Sets the background color for added lines. The color has to be disposed of by the caller when the receiver is no longer used.

Specified by:
setAddedColor in interface IChangeRulerColumn
Parameters:
addedColor - the new color to be used for the added lines background

setChangedColor

public void setChangedColor(
Color changedColor)
Description copied from interface: IChangeRulerColumn
Sets the background color for changed lines. The color has to be disposed of by the caller when the receiver is no longer used.

Specified by:
setChangedColor in interface IChangeRulerColumn
Parameters:
changedColor - the new color to be used for the changed lines background

setDeletedColor

public void setDeletedColor(
Color deletedColor)
Description copied from interface: IChangeRulerColumn
Sets the color for the deleted lines indicator. The color has to be disposed of by the caller when the receiver is no longer used.

Specified by:
setDeletedColor in interface IChangeRulerColumn
Parameters:
deletedColor - the new color to be used for the deleted lines indicator.

getModel

public 
IAnnotationModel getModel()
Description copied from interface: IVerticalRulerInfoExtension
Returns the model currently used by the receiver.

Specified by:
getModel in interface IVerticalRulerInfoExtension
Returns:
the model of the receiver, or null if no model is installed.

getControl

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

Specified by:
getControl in interface IVerticalRulerColumn
Specified by:
getControl in interface IVerticalRulerInfo
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
Specified by:
getWidth in interface IVerticalRulerInfo
Returns:
the width of this column's control

postRedraw

protected final void postRedraw()
Triggers a redraw in the display thread.


addVerticalRulerListener

public void addVerticalRulerListener(
IVerticalRulerListener listener)
Description copied from interface: IVerticalRulerInfoExtension
Registers a vertical ruler listener to be informed if an annotation gets selected on the vertical ruler.

Specified by:
addVerticalRulerListener in interface IVerticalRulerInfoExtension
Parameters:
listener - the listener to be informed

removeVerticalRulerListener

public void removeVerticalRulerListener(
IVerticalRulerListener listener)
Description copied from interface: IVerticalRulerInfoExtension
Removes a previously registered listener. If listener is not registered with the receiver, calling this method has no effect.

Specified by:
removeVerticalRulerListener in interface IVerticalRulerInfoExtension
Parameters:
listener - the listener to be removed

setRevisionInformation

public void setRevisionInformation(
RevisionInformation info)
Description copied from interface: IRevisionRulerColumn
Sets the revision information.

Specified by:
setRevisionInformation in interface IRevisionRulerColumn
Parameters:
info - the new revision information, or null to reset the ruler

getRevisionSelectionProvider

public 
ISelectionProvider getRevisionSelectionProvider()
Returns the revision selection provider.

Returns:
the revision selection provider
Since:
3.2

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire