Elexis API documentation
Version 2.1.6 as of December 11 2011

ch.elexis.text
Interface IRangeHandler

All Known Implementing Classes:
DefaultRenderer, ExternalLink, LaborLink, RangeHandlerImpl, RangeHandlerImpl, RangeHandlerImpl, SearchAction, TextRangeHandlerImpl

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
 java.lang.String attached(IRichTextDisplay ird)
           
 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
 boolean inserted(SSDRange range, IPersistentObject object, java.lang.Object context)
          The user inserted an Object into a context (e.g. drag&drop)
 boolean onSelection(Composite target, 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

attached

java.lang.String attached(IRichTextDisplay ird)

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

onSelection

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

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

inserted

boolean inserted(SSDRange range,
                 IPersistentObject object,
                 java.lang.Object context)
The user inserted an Object into a context (e.g. drag&drop)

Parameters:
range - the SSDRange describing the place of insertion
context - the context the range was inserted into
Returns:
if this handler consumed the object

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
Version 2.1.6 as of December 11 2011

Copyright 2005-2011 by Gerry Weirich, Elexis