|
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.rgw.oowrapper.OOText
public class OOText
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface ch.elexis.text.ITextPlugin |
---|
ITextPlugin.ICallback, ITextPlugin.PageFormat |
Field Summary | |
---|---|
static java.lang.String |
MIMETYPE_OO2
|
Fields inherited from interface ch.elexis.text.ITextPlugin |
---|
ENTRY_TYPE_TABLE, ENTRY_TYPE_TEXT, FIRST_ROW_IS_HEADER, GRID_VISIBLE |
Constructor Summary | |
---|---|
OOText()
|
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 marke,
int properties,
java.lang.String[][] values,
int[] columnSizes)
Eine Tabelle einfügen. |
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. |
java.lang.Object |
insertTextAt(int x,
int y,
int w,
int h,
java.lang.String text,
int adjust,
int verticalAdjust)
|
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 printer,
java.lang.String tray,
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 final java.lang.String MIMETYPE_OO2
Constructor Detail |
---|
public OOText()
Method Detail |
---|
public Composite createContainer(Composite parent, ITextPlugin.ICallback handler)
ITextPlugin
createContainer
in interface ITextPlugin
parent
- parent componenthandler
- Handler for saving the document
public void setFocus()
ITextPlugin
setFocus
in interface ITextPlugin
public void dispose()
ITextPlugin
dispose
in interface ITextPlugin
public void showMenu(boolean b)
ITextPlugin
showMenu
in interface ITextPlugin
b
- true: showpublic void showToolbar(boolean b)
ITextPlugin
showToolbar
in interface ITextPlugin
public boolean createEmptyDocument()
ITextPlugin
createEmptyDocument
in interface ITextPlugin
public boolean loadFromByteArray(byte[] bs, boolean asTemplate)
ITextPlugin
loadFromByteArray
in interface ITextPlugin
bs
- 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 ITextPlugin
pattern
- a regular expressioncb
- a ReplaceCallback or null if no Replacement should be performed
public byte[] storeToByteArray()
ITextPlugin
storeToByteArray
in interface ITextPlugin
public boolean clear()
ITextPlugin
clear
in interface ITextPlugin
public boolean loadFromStream(java.io.InputStream is, boolean asTemplate)
ITextPlugin
loadFromStream
in interface ITextPlugin
public void setInitializationData(IConfigurationElement config, java.lang.String propertyName, java.lang.Object data) throws CoreException
CoreException
public boolean print(java.lang.String printer, java.lang.String tray, boolean waitUntilFinished)
ITextPlugin
print
in interface ITextPlugin
printer
- Name of the Printers or null (then to default printer)tray
- 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 insertTable(java.lang.String marke, int properties, java.lang.String[][] values, int[] columnSizes)
insertTable
in interface ITextPlugin
properties
- Eigenschafen der Tabelle, mit | verknüpftmarke
- Ein Text als Platzhalter innerhalb des Texts. Die Tabelle wird anstellecolumnSizes
- ein Array mit der relativen Breite der Spalten (muss zusammen 100 ergeben) dieses
Platzhalters gesetztvalues
- Inhalt der Tabelle
public ITextPlugin.PageFormat getFormat()
ITextPlugin
getFormat
in interface ITextPlugin
public void setFormat(ITextPlugin.PageFormat f)
ITextPlugin
setFormat
in interface ITextPlugin
public java.lang.Object insertTextAt(int x, int y, int w, int h, java.lang.String text, int adjust)
ITextPlugin
insertTextAt
in interface ITextPlugin
x
- ,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 java.lang.Object insertTextAt(int x, int y, int w, int h, java.lang.String text, int adjust, int verticalAdjust)
public java.lang.Object insertText(java.lang.String marke, java.lang.String text, int adjust)
ITextPlugin
insertText
in interface ITextPlugin
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
public java.lang.Object insertText(java.lang.Object pos, java.lang.String text, int adjust)
ITextPlugin
insertText
in interface ITextPlugin
pos
- an implementation specific cursoradjust
- SWT.LEFT, SWT.CENTER, SWT.RIGHT
public boolean setFont(java.lang.String name, int style, float size)
ITextPlugin
setFont
in interface ITextPlugin
name
- 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 ITextPlugin
style
- SWT.MIN, SWT.NORMAL, SWT.BOLD (thin, normal or bold)
public java.lang.String getMimeType()
ITextPlugin
getMimeType
in interface ITextPlugin
public void setSaveOnFocusLost(boolean bSave)
ITextPlugin
setSaveOnFocusLost
in interface ITextPlugin
bSave
- 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 |