|
org.netbeans.modules.editor.lib/1 1.14.0 3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.editor.Abbrev
public class Abbrev
Abbreviation support allowing to expand defined character sequences into the expanded strings or call the arbitrary action.
Field Summary | |
---|---|
protected EditorUI |
editorUI
Extended UI to which this abbreviation is associated to |
Constructor Summary | |
---|---|
Abbrev(EditorUI editorUI,
boolean checkDocText,
boolean checkTextDelimiter)
|
Method Summary | |
---|---|
void |
addChar(char ch)
Add typed character to abbreviation accounting string. |
void |
checkAndExpand(ActionEvent evt)
|
boolean |
checkAndExpand(char typedChar,
ActionEvent evt)
|
boolean |
checkReset(char typedChar)
|
protected boolean |
doExpansion(int dotPos,
String expandStr,
ActionEvent evt)
|
boolean |
expandString(char typedChar,
String expandStr,
ActionEvent evt)
|
boolean |
expandString(String expandStr,
ActionEvent evt)
Expand abbreviation on current caret position. |
Map |
getAbbrevMap()
Get mapping table [abbrev, expanded-abbrev] |
String |
getAbbrevString()
Get current abbreviation string |
String |
getExpandString()
|
String |
getExpandString(char typedChar)
Checks whether there's valid string to expand and if so it returns it. |
static boolean |
isAbbrevDisabled(JTextComponent component)
Test whether the abbreviation expansion is disabled at the caret position in the given component's document. |
void |
propertyChange(PropertyChangeEvent evt)
|
void |
reset()
Reset abbreviation accounting. |
void |
settingsChange(SettingsChangeEvent evt)
Called when settings were changed. |
Object |
translateAbbrev(String abbrev)
Translate string using abbreviation table |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected EditorUI editorUI
Constructor Detail |
---|
public Abbrev(EditorUI editorUI, boolean checkDocText, boolean checkTextDelimiter)
Method Detail |
---|
public static boolean isAbbrevDisabled(JTextComponent component)
component
- non-null text component.
public void settingsChange(SettingsChangeEvent evt)
settingsChange
in interface SettingsChangeListener
public void propertyChange(PropertyChangeEvent evt)
propertyChange
in interface PropertyChangeListener
public void reset()
public void addChar(char ch)
public String getAbbrevString()
public Map getAbbrevMap()
public Object translateAbbrev(String abbrev)
abbrev
- string to translate. Pass null to translate current abbreviation
string
public String getExpandString(char typedChar)
public String getExpandString()
protected boolean doExpansion(int dotPos, String expandStr, ActionEvent evt) throws BadLocationException
BadLocationException
public boolean expandString(char typedChar, String expandStr, ActionEvent evt) throws BadLocationException
BadLocationException
public boolean expandString(String expandStr, ActionEvent evt) throws BadLocationException
BadLocationException
public boolean checkReset(char typedChar)
public boolean checkAndExpand(char typedChar, ActionEvent evt) throws BadLocationException
BadLocationException
public void checkAndExpand(ActionEvent evt) throws BadLocationException
BadLocationException
|
org.netbeans.modules.editor.lib/1 1.14.0 3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |