Elexis API documentation as of September 4 2011

ch.elexis.text
Class DefaultRenderer

java.lang.Object
  extended by ch.elexis.text.DefaultRenderer
All Implemented Interfaces:
IRangeHandler

public class DefaultRenderer
extends java.lang.Object
implements IRangeHandler

An IRangeRenderer that handles only some markups

Author:
Gerry Weirich

Nested Class Summary
 
Nested classes/interfaces inherited from interface ch.elexis.text.IRangeHandler
IRangeHandler.OUTPUT
 
Constructor Summary
DefaultRenderer()
           
 
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 rt)
          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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultRenderer

public DefaultRenderer()
Method Detail

canRender

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

Specified by:
canRender in interface IRangeHandler
Parameters:
rangeType - the type of the Range to render
outputType - teh type of desired output
Returns:

doRender

public java.lang.Object doRender(SSDRange range,
                                 IRangeHandler.OUTPUT outputType,
                                 IRichTextDisplay rt)
                          throws ElexisException
Description copied from interface: IRangeHandler
creaste a visual representation of a Range in a given type

Specified by:
doRender in interface IRangeHandler
Parameters:
range - the Range to render
outputType - the desired type of output
Returns:
an output specific result.
Throws:
ElexisException

getActions

public IAction[] getActions(java.lang.String rangeType)
Description copied from interface: IRangeHandler
return an array of actions that are possible on these ranges

Specified by:
getActions in interface IRangeHandler
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

public boolean onSelection(SSDRange range)
Description copied from interface: IRangeHandler
The user double-clicked or selected the specified range

Specified by:
onSelection in interface IRangeHandler
Parameters:
range - the range that was selected by the user
Returns:

inserted

public void inserted(SSDRange range,
                     java.lang.Object context)
Description copied from interface: IRangeHandler
The user inserted a Range into a context (e.g. drag&drop)

Specified by:
inserted in interface IRangeHandler
Parameters:
range - the SSDRange that was inserted
context - the context the range was inserted into

removed

public void removed(SSDRange range,
                    java.lang.Object context)
Description copied from interface: IRangeHandler
The user removed a Range from a context

Specified by:
removed in interface IRangeHandler
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