Elexis: Das führende OpenSource-Arztpraxisprogamm
im deutschsprachigen Raum
Java doc for Elexis version 2.1.7.dev vom 17.03.2013

ag.ion.bion.officelayer.internal.text
Class TextFieldService

java.lang.Object
  extended by ag.ion.bion.officelayer.internal.text.TextFieldService
All Implemented Interfaces:
ITextFieldService

public class TextFieldService
extends java.lang.Object
implements ITextFieldService

Textfield service of a text document.


Field Summary
 
Fields inherited from interface ag.ion.bion.officelayer.text.ITextFieldService
ANNOTATION_TEXTFIELD_ID, PLACEHOLDER_TEXTFIELD_ID, USER_TEXTFIELD_ID, USER_TEXTFIELD_MASTER_ID, VARIABLES_TEXTFIELD_ID, VARIABLES_TEXTFIELD_MASTER_ID
 
Constructor Summary
TextFieldService(ITextDocument textDocument)
          Constructs new TextFieldService.
 
Method Summary
 ITextField addUserTextField(java.lang.String name, java.lang.String content)
          Adds new user textfield.
 ITextField createPlaceholderTextField(java.lang.String name, java.lang.String hint, short placeholderType)
          Creates a new placeholder textfield.
 IVariableTextFieldMaster createVariableTextFieldMaster(java.lang.String name, short variableType)
          Creates a new variable textfield master and returns it, or returns the one that already exists, if it does.
 ITextField[] getPlaceholderFields()
          Returns all available placeholder textfields.
 ITextFieldMaster getUserTextFieldMaster(java.lang.String name)
          Returns master of a user textfield with the submitted name.
 ITextFieldMaster[] getUserTextFieldMasters(java.lang.String prefix)
          Returns masters of the user textfields with the submitted name prefix.
 ITextFieldMaster[] getUserTextFieldMasters(java.lang.String prefix, java.lang.String suffix)
          Returns masters of the user textfields with the submitted name prefix and suffix.
 ITextField[] getUserTextFields()
          Returns all available user textfields.
 ITextField[] getVariableFields(java.lang.String prefix)
          Returns all available variable textfields with the submitted name prefix.
 IVariableTextFieldMaster getVariableTextFieldMaster(java.lang.String masterName)
          Returns master of the variables text fields with the submitted name, or null if not availbale.
 IVariableTextFieldMaster[] getVariableTextFieldMasters(java.lang.String prefix)
          Returns all masters of the variables text fields with the submitted name prefix.
 void refresh()
          Refreshes all textfields.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextFieldService

public TextFieldService(ITextDocument textDocument)
Constructs new TextFieldService.

Parameters:
textDocument - text document to be used
Throws:
java.lang.IllegalArgumentException - if the OpenOffice.org interface is not valid
Method Detail

getUserTextFieldMaster

public ITextFieldMaster getUserTextFieldMaster(java.lang.String name)
                                        throws TextException
Returns master of a user textfield with the submitted name. Returns null if a user textfield with the submitted name is not available.

Specified by:
getUserTextFieldMaster in interface ITextFieldService
Parameters:
name - name of the master of the user textfield
Returns:
master of a user textfield with the submitted name or null if a user textfield with the submitted name is not available
Throws:
TextException - if the user text field can not be provided

getUserTextFieldMasters

public ITextFieldMaster[] getUserTextFieldMasters(java.lang.String prefix)
                                           throws TextException
Returns masters of the user textfields with the submitted name prefix.

Specified by:
getUserTextFieldMasters in interface ITextFieldService
Parameters:
prefix - name prefix to be used
Returns:
masters of the user textfields with the submitted name prefix
Throws:
TextException - if the masters of the user textfields can not be constructed

getUserTextFieldMasters

public ITextFieldMaster[] getUserTextFieldMasters(java.lang.String prefix,
                                                  java.lang.String suffix)
                                           throws TextException
Returns masters of the user textfields with the submitted name prefix and suffix.

Specified by:
getUserTextFieldMasters in interface ITextFieldService
Parameters:
prefix - name prefix to be used
suffix - name suffix to be used
Returns:
masters of the user textfields with the submitted name prefix and suffix
Throws:
TextException - if the masters of the user textfields can not be constructed

addUserTextField

public ITextField addUserTextField(java.lang.String name,
                                   java.lang.String content)
                            throws TextException
Adds new user textfield.

Specified by:
addUserTextField in interface ITextFieldService
Parameters:
name - name of the textfield
content - content of the textfield
Returns:
new textfield
Throws:
TextException - if any error occurs during textfield creation

getUserTextFields

public ITextField[] getUserTextFields()
                               throws TextException
Returns all available user textfields.

Specified by:
getUserTextFields in interface ITextFieldService
Returns:
all available user textfields
Throws:
TextException - if the user textfields can not be constructed

getPlaceholderFields

public ITextField[] getPlaceholderFields()
                                  throws TextException
Returns all available placeholder textfields.

Specified by:
getPlaceholderFields in interface ITextFieldService
Returns:
all available placeholder textfields
Throws:
TextException - if the placeholder textfields can not be constructed

createPlaceholderTextField

public ITextField createPlaceholderTextField(java.lang.String name,
                                             java.lang.String hint,
                                             short placeholderType)
                                      throws TextException
Creates a new placeholder textfield.

Specified by:
createPlaceholderTextField in interface ITextFieldService
Parameters:
name - name of the placeholder textfield
hint - the hint of the placeholder textfield, may be null
placeholderType - the type of the placeholder found in static members of com.sun.star.text.PlaceholderType (i.e. PlaceholderType.TEXT)
Returns:
new placeholder textfield
Throws:
TextException - if any error occurs during placeholder textfield creation

getVariableTextFieldMaster

public IVariableTextFieldMaster getVariableTextFieldMaster(java.lang.String masterName)
                                                    throws TextException
Returns master of the variables text fields with the submitted name, or null if not availbale.

Specified by:
getVariableTextFieldMaster in interface ITextFieldService
Parameters:
masterName - name of the master to return
Returns:
master of the variables text fields with the submitted name, or null
Throws:
TextException - if the master can not be returned

getVariableTextFieldMasters

public IVariableTextFieldMaster[] getVariableTextFieldMasters(java.lang.String prefix)
                                                       throws TextException
Returns all masters of the variables text fields with the submitted name prefix.

Specified by:
getVariableTextFieldMasters in interface ITextFieldService
Parameters:
prefix - name prefix to be used
Returns:
all masters of the variables text fields
Throws:
TextException - if the masters can not be returned

createVariableTextFieldMaster

public IVariableTextFieldMaster createVariableTextFieldMaster(java.lang.String name,
                                                              short variableType)
                                                       throws TextException
Creates a new variable textfield master and returns it, or returns the one that already exists, if it does. TODO maybe some more parameters are needed???

Specified by:
createVariableTextFieldMaster in interface ITextFieldService
Parameters:
name - name of the variable textfield master
variableType - the type of the variable master found in static members of com.sun.star.text.SetVariableType (i.e. SetVariableType.STRING)
Returns:
the variable textfield master with the given name
Throws:
TextException - if any error occurs during variable textfield master creation

getVariableFields

public ITextField[] getVariableFields(java.lang.String prefix)
                               throws TextException
Returns all available variable textfields with the submitted name prefix.

Specified by:
getVariableFields in interface ITextFieldService
Parameters:
prefix - name prefix to be used
Returns:
all available variable textfields
Throws:
TextException - if the variable textfields can not be constructed

refresh

public void refresh()
             throws TextException
Refreshes all textfields.

Specified by:
refresh in interface ITextFieldService
Throws:
TextException - if refresh fails

Elexis: Das führende OpenSource-Arztpraxisprogamm
im deutschsprachigen Raum
Java doc for Elexis version 2.1.7.dev vom 17.03.2013