public class Preference
extends java.util.Observable
Constructor and Description |
---|
Preference()
Initializes a newly created Preference object so that it represents an
empty Preference object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Return true if, and only if the object argument has the same attribute values
with this preference object.
|
int |
getDelayTrigger()
Get the delay(in ms) to trigger the suggestion popup.
|
java.lang.String |
getEnableACP()
Get the hotkey enable and disable acp.
|
int |
getEntriesInView()
Return the number of entries to display on the auto-completion box (without scrolling).
|
java.lang.String |
getExtendParagraph()
Get the hotkey of extend suggestion by paragraph.
|
java.lang.String |
getExtendSentence()
Get the hotkey of extend suggestion by sentence.
|
java.lang.String |
getExtendWord()
Get the hotkey of extend suggestion by word.
|
java.lang.String |
getReduceParagraph()
Get the hotkey of reduce suggestion by paragraph.
|
java.lang.String |
getReduceSentence()
Get the hotkey of reduce suggestion by sentence.
|
java.lang.String |
getReduceWord()
Get the hotkey of reduce suggestion by word.
|
int |
getThreshold()
Return the threshold for the number of suggestion to auto-trigger auto-completion.
|
java.lang.String |
getTriggerSuggestionPopUp()
Get the hotkey of Trigger Suggestion PopUp.
|
boolean |
isAutoTrigger()
Return the trigger mode for auto-completion in text-editor add-in.
|
boolean |
isDoNotPromptExit()
Return true if, and only if user do not wish to see a prompt during exit.
|
boolean |
isEnableDisable()
Return the status of ACP during application launch.
|
boolean |
isOnStartUp()
Return true if, and only if ACP is set to launch during computer startup.
|
void |
setAutoTrigger(boolean autoTrigger)
Change the trigger mode for auto-completion of this preference.
|
void |
setDelayTrigger(int triggerDelay)
Set the delay(in ms) to trigger the suggestion popup.
|
void |
setDoNotPromptExit(boolean doNotPromptExit)
Change the exit prompt status of this preference.
|
void |
setEnableACP(java.lang.String enableACP)
Set the hotkey of enable and disable acp.
|
void |
setEnableDisable(boolean enableDisable)
Change the status of ACP during application launch of this preference.
|
void |
setEntriesInView(int entriesInView)
Change the number of entries of this preference.
|
void |
setExtendParagraph(java.lang.String extendParagraph)
Set the hotkey of extend suggestion by paragraph.
|
void |
setExtendSentence(java.lang.String extendSentence)
Set the hotkey of extend suggestion by sentence.
|
void |
setExtendWord(java.lang.String extendWord)
Set the hotkey of extend suggestion by word.
|
void |
setOnStartUp(boolean onStartUp)
Change the ACP startup option of this preference.
|
void |
setReduceParagraph(java.lang.String reduceParagraph)
Set the hotkey of reduce suggestion by paragraph.
|
void |
setReduceSentence(java.lang.String reduceSentence)
Set the hotkey of reduce suggestion by sentence.
|
void |
setReduceWord(java.lang.String reduceWord)
Set the hotkey of reduce suggestion by word.
|
void |
setThreshold(int threshold)
Change the threshold for the number of suggestion of this preference
|
void |
setTriggerSuggestionPopUp(java.lang.String triggerSuggestionPopUp)
Set the hotkey Trigger Suggestion PopUp.
|
public Preference()
public int getEntriesInView()
public void setEntriesInView(int entriesInView)
entriesInView
- the number of entries to display on the auto-completion box.public boolean isEnableDisable()
Return true if, and only if ACP is enable during application launch.
public void setEnableDisable(boolean enableDisable)
enableDisable
- the status of ACP during application launch.
Set to true to enable ACP during application launch.public boolean isAutoTrigger()
If the trigger mode is in manual mode, this method returns false. User need to press a hotkey to trigger auto-completion in the respective text-editor.
If the trigger mode is in auto mode, this method returns true. User does not need to press a hotkey to trigger auto-completion. It is triggered when user is typing new characters.
public void setAutoTrigger(boolean autoTrigger)
autoTrigger
- the trigger mode for auto-completion.
Set to true for automatic mode, set to false for manual mode.public boolean isOnStartUp()
public void setOnStartUp(boolean onStartUp)
onStartUp
- the ACP startup option.
Set to true to launch ACP during computer startup;
set to false to prevent it from been launch during startup.public boolean isDoNotPromptExit()
public void setDoNotPromptExit(boolean doNotPromptExit)
doNotPromptExit
- the exit prompt status.
Set to true if user wish to see the prompt during exit;
set to false if user do no wish to see the prompt during exit.public int getThreshold()
When user request for suggestion, a list of suggestions will be returned. If, and only if the number of suggestion in the list is higher than the threshold defined, an empty list of suggestion will be returned to prevent auto-completion from triggering.
ACPLogic.requestSuggestion(String, boolean)
public void setThreshold(int threshold)
threshold
- the threshold for the number of suggestion.public java.lang.String getTriggerSuggestionPopUp()
public void setTriggerSuggestionPopUp(java.lang.String triggerSuggestionPopUp)
triggerSuggestionPopUp
- the hotkey for Trigger Suggestion PopUppublic java.lang.String getEnableACP()
public void setEnableACP(java.lang.String enableACP)
enableACP
- the hotkey for enable and disable acppublic java.lang.String getExtendWord()
public void setExtendWord(java.lang.String extendWord)
extendWord
- the hotkey of extend suggestion by wordpublic java.lang.String getReduceWord()
public void setReduceWord(java.lang.String reduceWord)
reduceWord
- the hotkey of reduce suggestion by wordpublic java.lang.String getExtendSentence()
public void setExtendSentence(java.lang.String extendSentence)
extendSentence
- the hotkey of extend suggestion by sentencepublic java.lang.String getReduceSentence()
public void setReduceSentence(java.lang.String reduceSentence)
reduceSentence
- the hotkey of reduce suggestion by sentencepublic java.lang.String getExtendParagraph()
public void setExtendParagraph(java.lang.String extendParagraph)
extendParagraph
- the hotkey of extend suggestion by paragraphpublic java.lang.String getReduceParagraph()
public void setReduceParagraph(java.lang.String reduceParagraph)
reduceParagraph
- the hotkey of reduce suggestion by paragraphpublic int getDelayTrigger()
public void setDelayTrigger(int triggerDelay)
triggerDelay
- the delay to trigger suggestion popuppublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object