Elexis API documentation
Version 2.1.6 as of December 11 2011

ch.elexis.text
Interface IRichTextDisplay

All Known Implementing Classes:
BaseRichTextDisplay

public interface IRichTextDisplay

A Control to display formatted text with links and cross references

Author:
gerry

Method Summary
 void addMenuListener(IMenuListener listener)
          Add a listener to the context menu of the control.
 GenericRange getCaretRange()
          find the position of the caret and the selected Range (if any)
 SimpleStructuredDocument getContents()
          Retrieve the Contents of the View
 int getTextLocationAt(int x, int y)
          Find the caret position matching a given coordinate in the control
 void removeMenuListener(IMenuListener listener)
          remove a Menu listener
 void setCaretRange(GenericRange gr)
           
 void updateDisplay()
           
 

Method Detail

getContents

SimpleStructuredDocument getContents()
Retrieve the Contents of the View

Returns:

getCaretRange

GenericRange getCaretRange()
find the position of the caret and the selected Range (if any)

Returns:
a GenericRange with the caret Position and the length of the selected text (may be 0).

setCaretRange

void setCaretRange(GenericRange gr)

getTextLocationAt

int getTextLocationAt(int x,
                      int y)
Find the caret position matching a given coordinate in the control

Parameters:
x - number of pixels from the left upper corner to the right
y - number of pixels from the left upper corner down
Returns:
the caret location. If the coordinates wre outside the text, returns the end of the text.

addMenuListener

void addMenuListener(IMenuListener listener)
Add a listener to the context menu of the control. The listener will be called immerdiately before the menu opens.

Parameters:
listener -

removeMenuListener

void removeMenuListener(IMenuListener listener)
remove a Menu listener

Parameters:
listener -

updateDisplay

void updateDisplay()
                   throws ElexisException
Throws:
ElexisException

Elexis API documentation
Version 2.1.6 as of December 11 2011

Copyright 2005-2011 by Gerry Weirich, Elexis