LPEX
4.4.0

com.ibm.lpex.alef
Class LineNumberColumn

java.lang.Object
  extended by AbstractContributedRulerColumn
      extended by com.ibm.lpex.alef.LineNumberColumn

public final class LineNumberColumn
extends AbstractContributedRulerColumn

The line number ruler contribution. Encapsulates a LpexLineNumberChangeRulerColumn as a contribution to the rulerColumns extension point. Instead of instantiating the delegate itself, it calls createLineNumberRulerColumn() in LpexAbstractDecoratedTextEditor via LineNumberColumn.ICompatibilityForwarder to maintain compatibility with previous releases.


Nested Class Summary
static interface LineNumberColumn.ICompatibilityForwarder
          Forwarder for preference checks and ruler creation.
 
Field Summary
static String ID
          The contribution id of the quick diff / revision ruler.
 
Constructor Summary
LineNumberColumn()
           
 
Method Summary
 void addVerticalRulerListener(IVerticalRulerListener listener)
           
 void columnRemoved()
           
 Control createControl(CompositeRuler parentRuler, Composite parentControl)
           
 Control getControl()
           
 IAnnotationHover getHover()
           
 int getLineOfLastMouseButtonActivity()
           
 IAnnotationModel getModel()
           
 ISelectionProvider getRevisionSelectionProvider()
          Returns the selection provider of the revision column, null if none is available.
 int getWidth()
           
 void hideRevisionInformation()
          Hides revision information.
 void initializeLineNumberRulerColumn(LpexLineNumberChangeRulerColumn rulerColumn)
          Initializes the given line number ruler column from the preference store.
 boolean isShowingChangeInformation()
          Returns true if the ruler is showing change information, false if it is only showing line numbers.
 boolean isShowingLineNumbers()
          Returns true if the ruler is showing line numbers, false if it is only showing change information.
 boolean isShowingRevisionInformation()
          Returns true if the ruler is showing revision information, false if it is only showing line numbers.
 void redraw()
           
 void removeVerticalRulerListener(IVerticalRulerListener listener)
           
 void setFont(Font font)
           
 void setForwarder(LineNumberColumn.ICompatibilityForwarder forwarder)
          Sets the forwarder.
 void setModel(IAnnotationModel model)
           
 void showRevisionInformation(RevisionInformation info, String quickDiffProviderId)
          Shows revision information on the receiver.
 int toDocumentLineNumber(int y_coordinate)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final String ID
The contribution id of the quick diff / revision ruler.

See Also:
Constant Field Values
Constructor Detail

LineNumberColumn

public LineNumberColumn()
Method Detail

createControl

public Control createControl(CompositeRuler parentRuler,
                             Composite parentControl)

getControl

public Control getControl()

getWidth

public int getWidth()

redraw

public void redraw()

setFont

public void setFont(Font font)

setModel

public void setModel(IAnnotationModel model)

getLineOfLastMouseButtonActivity

public int getLineOfLastMouseButtonActivity()

toDocumentLineNumber

public int toDocumentLineNumber(int y_coordinate)

addVerticalRulerListener

public void addVerticalRulerListener(IVerticalRulerListener listener)

getHover

public IAnnotationHover getHover()

getModel

public IAnnotationModel getModel()

removeVerticalRulerListener

public void removeVerticalRulerListener(IVerticalRulerListener listener)

columnRemoved

public void columnRemoved()

setForwarder

public void setForwarder(LineNumberColumn.ICompatibilityForwarder forwarder)
Sets the forwarder. Used by AbstractDecoratedTextEditor to maintain the contract of its AbstractDecoratedTextEditor#createLineNumberRulerColumn method.

Parameters:
forwarder - the forwarder

initializeLineNumberRulerColumn

public void initializeLineNumberRulerColumn(LpexLineNumberChangeRulerColumn rulerColumn)
Initializes the given line number ruler column from the preference store.

Parameters:
rulerColumn - the ruler column to be initialized

isShowingLineNumbers

public boolean isShowingLineNumbers()
Returns true if the ruler is showing line numbers, false if it is only showing change information.

Returns:
true if line numbers are shown, false otherwise

isShowingChangeInformation

public boolean isShowingChangeInformation()
Returns true if the ruler is showing change information, false if it is only showing line numbers.

Returns:
true if change information is shown, false otherwise

showRevisionInformation

public void showRevisionInformation(RevisionInformation info,
                                    String quickDiffProviderId)
Shows revision information on the receiver.

Parameters:
info - the revision information to show
quickDiffProviderId - the id of the corresponding quick diff provider

hideRevisionInformation

public void hideRevisionInformation()
Hides revision information.


isShowingRevisionInformation

public boolean isShowingRevisionInformation()
Returns true if the ruler is showing revision information, false if it is only showing line numbers.

Returns:
true if revision information is shown, false otherwise

getRevisionSelectionProvider

public ISelectionProvider getRevisionSelectionProvider()
Returns the selection provider of the revision column, null if none is available.

Returns:
the revision selection provider

LPEX
4.4.0

Copyright � 2016 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.