| 
Elexis API documentation as of September 4 2011 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ITextPlugin
Contract for embedding a text plugin Warning: Preliminary interface
| Nested Class Summary | |
|---|---|
static interface | 
ITextPlugin.ICallback
Callback interface for save operations  | 
static class | 
ITextPlugin.PageFormat
 | 
| Field Summary | |
|---|---|
static java.lang.String | 
ENTRY_TYPE_TABLE
 | 
static java.lang.String | 
ENTRY_TYPE_TEXT
 | 
static int | 
FIRST_ROW_IS_HEADER
 | 
static int | 
GRID_VISIBLE
 | 
| Method Summary | |
|---|---|
 boolean | 
clear()
clear the document  | 
 Composite | 
createContainer(Composite parent,
                ITextPlugin.ICallback handler)
Create and return an SWT Coomposite that holds the editor  | 
 boolean | 
createEmptyDocument()
Create an empty document inside the container  | 
 void | 
dispose()
Text component is disposed.  | 
 boolean | 
findOrReplace(java.lang.String pattern,
              ReplaceCallback cb)
Find a pattern (regular expression) in the document, and call ReplaceCallback with each match.  | 
 ITextPlugin.PageFormat | 
getFormat()
Return format of the page  | 
 java.lang.String | 
getMimeType()
Default Mimettype of the documents that this implementation creates  | 
 boolean | 
insertTable(java.lang.String place,
            int properties,
            java.lang.String[][] contents,
            int[] columnSizes)
Insert a table in the document  | 
 java.lang.Object | 
insertText(java.lang.Object pos,
           java.lang.String text,
           int adjust)
Insert text at the position described by the implemetation specific cursor  | 
 java.lang.Object | 
insertText(java.lang.String marke,
           java.lang.String text,
           int adjust)
Insert text at a position specified by a regular expression  | 
 java.lang.Object | 
insertTextAt(int x,
             int y,
             int w,
             int h,
             java.lang.String text,
             int adjust)
Position text into a rectangular area.  | 
 boolean | 
isDirectOutput()
does the plugin want to output the document immediately after creating  | 
 boolean | 
loadFromByteArray(byte[] bs,
                  boolean asTemplate)
create a document from a byte array.  | 
 boolean | 
loadFromStream(java.io.InputStream is,
               boolean asTemplate)
create a document from an InputStream that vontains the contents in the specific formar of the text component.  | 
 boolean | 
print(java.lang.String toPrinter,
      java.lang.String toTray,
      boolean waitUntilFinished)
Print the document  | 
 void | 
setFocus()
The text component receives the focus  | 
 boolean | 
setFont(java.lang.String name,
        int style,
        float size)
Set font for all following operations (until the next call to setFont)  | 
 void | 
setFormat(ITextPlugin.PageFormat f)
Set Format of the page  | 
 void | 
setSaveOnFocusLost(boolean bSave)
Save contents on focus lost  | 
 boolean | 
setStyle(int style)
Set style for all following operations (until the next call to setFont or setStyle)  | 
 void | 
showMenu(boolean b)
Show or hide the component specific menu bar  | 
 void | 
showToolbar(boolean b)
Show or hide the component specific toolbar  | 
 byte[] | 
storeToByteArray()
Store the document into the byte array.  | 
| Field Detail | 
|---|
static final int FIRST_ROW_IS_HEADER
static final int GRID_VISIBLE
static final java.lang.String ENTRY_TYPE_TABLE
static final java.lang.String ENTRY_TYPE_TEXT
| Method Detail | 
|---|
ITextPlugin.PageFormat getFormat()
void setFormat(ITextPlugin.PageFormat f)
Composite createContainer(Composite parent,
                          ITextPlugin.ICallback handler)
parent - parent componenthandler - Handler for saving the document
void setFocus()
void dispose()
void showMenu(boolean b)
b - true: showvoid showToolbar(boolean b)
void setSaveOnFocusLost(boolean bSave)
bSave - true: yes, else no.boolean createEmptyDocument()
boolean loadFromByteArray(byte[] bs,
                          boolean asTemplate)
bs - the byte array with the document in a fotmat the compnent can interpretasTemplate - tru if the byte array is a template.
boolean loadFromStream(java.io.InputStream is,
                       boolean asTemplate)
boolean findOrReplace(java.lang.String pattern,
                      ReplaceCallback cb)
pattern - a regular expressioncb - a ReplaceCallback or null if no Replacement should be performed
byte[] storeToByteArray()
boolean insertTable(java.lang.String place,
                    int properties,
                    java.lang.String[][] contents,
                    int[] columnSizes)
place - a regular expression in the document, that will be replaced by the table. Only the
            first match will be used.properties - OR'ed property valuescontents - the contents of the tablecolumnSizes - width of the columns or null: Autofit all columns.
java.lang.Object insertTextAt(int x,
                              int y,
                              int w,
                              int h,
                              java.lang.String text,
                              int adjust)
adjust - SWT.LEFT, SWT.RIGHT, SWT.CENTERx - ,y,w,h position and size of the rectangle relative to the page bounds. Measured as
            millimeters. The effective position and size must match the given values at +-
            2mm.text - the text to insert, which can contain '\n' that must be honored.
boolean setFont(java.lang.String name,
                int style,
                float size)
name - name of the fontstyle - SWT.MIN, SWT.NORMAL, SWT.BOLD (thin, normal or bold)size - font height in Pt
boolean setStyle(int style)
style - SWT.MIN, SWT.NORMAL, SWT.BOLD (thin, normal or bold)
java.lang.Object insertText(java.lang.String marke,
                            java.lang.String text,
                            int adjust)
marke - regular expression, that describes the insertion point. Only the first match will
            be used, and the inserted Text will replace the found string.adjust - SWT.LEFT oder SWT.RIGHT
java.lang.Object insertText(java.lang.Object pos,
                            java.lang.String text,
                            int adjust)
pos - an implementation specific cursoradjust - SWT.LEFT, SWT.CENTER, SWT.RIGHT
boolean clear()
boolean print(java.lang.String toPrinter,
              java.lang.String toTray,
              boolean waitUntilFinished)
toPrinter - Name of the Printers or null (then to default printer)toTray - Name of the tray or null (then tray as defined y the driver or the template)waitUntilFinished - if true: return after the printJob ist finished
java.lang.String getMimeType()
boolean isDirectOutput()
  | 
Elexis API documentation as of September 4 2011 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||