|
Elexis API documentationVersion 2.1.6 as of December 11 2011 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectch.elexis.textplugin.ElexisTextPlugin
public class ElexisTextPlugin
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface ch.elexis.text.ITextPlugin |
|---|
ITextPlugin.ICallback, ITextPlugin.PageFormat |
| Field Summary | |
|---|---|
static ElexisTextPlugin |
tempInstance
|
| Fields inherited from interface ch.elexis.text.ITextPlugin |
|---|
ENTRY_TYPE_TABLE, ENTRY_TYPE_TEXT, FIRST_ROW_IS_HEADER, GRID_VISIBLE |
| Constructor Summary | |
|---|---|
ElexisTextPlugin()
|
|
| 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 |
setInitializationData(IConfigurationElement config,
java.lang.String propertyName,
java.lang.Object data)
|
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. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static ElexisTextPlugin tempInstance
| Constructor Detail |
|---|
public ElexisTextPlugin()
| Method Detail |
|---|
public boolean clear()
ITextPlugin
clear in interface ITextPlugin
public Composite createContainer(Composite parent,
ITextPlugin.ICallback handler)
ITextPlugin
createContainer in interface ITextPluginparent - parent componenthandler - Handler for saving the document
public boolean createEmptyDocument()
ITextPlugin
createEmptyDocument in interface ITextPluginpublic java.lang.String getMimeType()
ITextPlugin
getMimeType in interface ITextPlugin
public boolean insertTable(java.lang.String place,
int properties,
java.lang.String[][] contents,
int[] columnSizes)
ITextPlugin
insertTable in interface ITextPluginplace - 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.
public java.lang.Object insertText(java.lang.String marke,
java.lang.String text,
int adjust)
ITextPlugin
insertText in interface ITextPluginmarke - 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
public java.lang.Object insertText(java.lang.Object pos,
java.lang.String text,
int adjust)
ITextPlugin
insertText in interface ITextPluginpos - an implementation specific cursoradjust - SWT.LEFT, SWT.CENTER, SWT.RIGHT
public java.lang.Object insertTextAt(int x,
int y,
int w,
int h,
java.lang.String text,
int adjust)
ITextPlugin
insertTextAt in interface ITextPluginx - ,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.adjust - SWT.LEFT, SWT.RIGHT, SWT.CENTER
public boolean loadFromStream(java.io.InputStream is,
boolean asTemplate)
ITextPlugin
loadFromStream in interface ITextPlugin
public boolean print(java.lang.String toPrinter,
java.lang.String toTray,
boolean waitUntilFinished)
ITextPlugin
print in interface ITextPlugintoPrinter - 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
public boolean setFont(java.lang.String name,
int style,
float size)
ITextPlugin
setFont in interface ITextPluginname - name of the fontstyle - SWT.MIN, SWT.NORMAL, SWT.BOLD (thin, normal or bold)size - font height in Pt
public boolean setStyle(int style)
ITextPlugin
setStyle in interface ITextPluginstyle - SWT.MIN, SWT.NORMAL, SWT.BOLD (thin, normal or bold)
public void showMenu(boolean b)
ITextPlugin
showMenu in interface ITextPluginb - true: showpublic void showToolbar(boolean b)
ITextPlugin
showToolbar in interface ITextPluginpublic byte[] storeToByteArray()
ITextPlugin
storeToByteArray in interface ITextPlugin
public boolean loadFromByteArray(byte[] bs,
boolean asTemplate)
ITextPlugin
loadFromByteArray in interface ITextPluginbs - the byte array with the document in a fotmat the compnent can interpretasTemplate - tru if the byte array is a template.
public boolean findOrReplace(java.lang.String pattern,
ReplaceCallback cb)
ITextPlugin
findOrReplace in interface ITextPluginpattern - a regular expressioncb - a ReplaceCallback or null if no Replacement should be performed
public ITextPlugin.PageFormat getFormat()
ITextPlugin
getFormat in interface ITextPluginpublic void setFocus()
ITextPlugin
setFocus in interface ITextPluginpublic void setFormat(ITextPlugin.PageFormat f)
ITextPlugin
setFormat in interface ITextPluginpublic void dispose()
ITextPlugin
dispose in interface ITextPlugin
public void setInitializationData(IConfigurationElement config,
java.lang.String propertyName,
java.lang.Object data)
throws CoreException
CoreExceptionpublic void setSaveOnFocusLost(boolean bSave)
ITextPlugin
setSaveOnFocusLost in interface ITextPluginbSave - true: yes, else no.public boolean isDirectOutput()
ITextPlugin
isDirectOutput in interface ITextPlugin
|
Elexis API documentationVersion 2.1.6 as of December 11 2011 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||