|
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.ObjectJob
ch.elexis.text.TextSaveDaemon
public class TextSaveDaemon
The TextSaveDaemnon can be set on a BaseRichTextDisplay. After "start" it will lock its resource. If the resource is already locked by a different process, it will put the BaseRichTExtDisplay into "read only" mode. The caller can setup a save-strategy. It is possible to save after each keystroke or on Focus lost or on stop() or never at all.
Field Summary | |
---|---|
static int |
STRATEGY_LOAD_ON_START
load contents on call to start() |
static int |
STRATEGY_SAVE_ON_FOCUS_LOST
save contents if component loses focus |
static int |
STRATEGY_SAVE_ON_KEYSTROKE
save contents after each keystroke |
static int |
STRATEGY_SAVE_ON_STOP
save contents on call to stop() |
static int |
STRATEGY_SAVE_ON_TIMER
save contents on timer ticks |
Constructor Summary | |
---|---|
TextSaveDaemon(BaseRichTextDisplay brd,
java.lang.String lockname)
Create a new TextSaveDaemon |
Method Summary | |
---|---|
void |
setStrategy(int strategy,
boolean bWriteHeaders,
java.lang.Object parameter,
int timerclicks)
Set a strategy for manamegemt of the contents. |
void |
start()
Begin protecting the resource. |
void |
stop()
Stop protecting the resource. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int STRATEGY_LOAD_ON_START
public static final int STRATEGY_SAVE_ON_STOP
public static final int STRATEGY_SAVE_ON_KEYSTROKE
public static final int STRATEGY_SAVE_ON_FOCUS_LOST
public static final int STRATEGY_SAVE_ON_TIMER
Constructor Detail |
---|
public TextSaveDaemon(BaseRichTextDisplay brd, java.lang.String lockname)
brd
- BaseRichTextDisplay to observelockname
- name of the resource to protect. Arbitrary name that identifies the resource. The
name must be the same for all clients competing for the same resource but must be
different for different resources.Method Detail |
---|
public void setStrategy(int strategy, boolean bWriteHeaders, java.lang.Object parameter, int timerclicks)
IPersistenceProvider
attached to the BaseRichTextDisplay's Contents.
strategy
- An OR'ed combination of the STRATEGY_xxx values explained abovebWriteHeaders
- if true will write an XML header to every entryparameter
- parameter for the IPersistenceProvider. May be nulltimerclicks
- save interval for STRATEGY_SAVE_ON_TIMER. Not used if this strategy is not chosen.public void start()
public void stop()
|
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 |