Elexis API documentation as of September 4 2011

ch.elexis.text
Interface IRangeHandler

All Known Implementing Classes:
DefaultRenderer

public interface IRangeHandler

An IRangeHandler can add, display and act upon clicking on SSDRanges. It registers itself for one ore more types of SSDRanges It can display supported SSDRanges on zero or more output types An IRangeHandler is connected to the framework with the ExtensionPoint ch.elexis.ServiceRegistry as a Service with the name "TextContentsExtension".

Author:
Gerry Weirich

Nested Class Summary
static class IRangeHandler.OUTPUT
           
 
Method Summary
 boolean canRender(java.lang.String rangeType, IRangeHandler.OUTPUT outputType)
          Ask whether this IRangeRenderer can create output of a specific type
 java.lang.Object doRender(SSDRange range, IRangeHandler.OUTPUT outputType, IRichTextDisplay display)
          creaste a visual representation of a Range in a given type
 IAction[] getActions(java.lang.String rangeType)
          return an array of actions that are possible on these ranges
 void inserted(SSDRange range, java.lang.Object context)
          The user inserted a Range into a context (e.g. drag&drop)
 boolean onSelection(SSDRange range)
          The user double-clicked or selected the specified range
 void removed(SSDRange range, java.lang.Object context)
          The user removed a Range from a context
 

Method Detail

canRender

boolean canRender(java.lang.String rangeType,
                  IRangeHandler.OUTPUT outputType)
Ask whether this IRangeRenderer can create output of a specific type

Parameters:
rangeType - the type of the Range to render
outputType - teh type of desired output
Returns:

doRender

java.lang.Object doRender(SSDRange range,
                          IRangeHandler.OUTPUT outputType,
                          IRichTextDisplay display)
                          throws ElexisException
creaste a visual representation of a Range in a given type

Parameters:
range - the Range to render
outputType - the desired type of output
Returns:
an output specific result.
Throws:
ElexisException

getActions

IAction[] getActions(java.lang.String rangeType)
return an array of actions that are possible on these ranges

Parameters:
rangeType - the type of ranges in question
Returns:
an array of all Actions that can be done on this range. can be null. The first Action on index [0] will be executed if the user double-clicks on the range, the others will be presented in a context menu if the user right-clicks on the range. (that is: the user right-clicks or double clicks on some text between start and start+length of the range. A click on a separate window created by a range will not be handled by the framework)

onSelection

boolean onSelection(SSDRange range)
The user double-clicked or selected the specified range

Parameters:
range - the range that was selected by the user
Returns:

inserted

void inserted(SSDRange range,
              java.lang.Object context)
The user inserted a Range into a context (e.g. drag&drop)

Parameters:
range - the SSDRange that was inserted
context - the context the range was inserted into

removed

void removed(SSDRange range,
             java.lang.Object context)
The user removed a Range from a context

Parameters:
range - the range that was removed
context - the context it was removed from

Elexis API documentation as of September 4 2011

Copyright 2005-2010 by Gerry Weirich, Elexis