org.netbeans.modules.editor.lib/1 1.28.0 8

org.netbeans.editor
Class Abbrev

java.lang.Object
  extended by org.netbeans.editor.Abbrev
All Implemented Interfaces:
PropertyChangeListener, EventListener

Deprecated. Use Editor Code Templates API instead. This class is no longer functional.

public class Abbrev
extends Object
implements PropertyChangeListener

Abbreviation support allowing to expand defined character sequences into the expanded strings or call the arbitrary action.


Field Summary
protected  EditorUI editorUI
          Deprecated. Extended UI to which this abbreviation is associated to
 
Constructor Summary
Abbrev(EditorUI editorUI, boolean checkDocText, boolean checkTextDelimiter)
          Deprecated.  
 
Method Summary
 void addChar(char ch)
          Deprecated. Add typed character to abbreviation accounting string.
 void checkAndExpand(ActionEvent evt)
          Deprecated.  
 boolean checkAndExpand(char typedChar, ActionEvent evt)
          Deprecated.  
 boolean checkReset(char typedChar)
          Deprecated.  
protected  boolean doExpansion(int dotPos, String expandStr, ActionEvent evt)
          Deprecated.  
 boolean expandString(char typedChar, String expandStr, ActionEvent evt)
          Deprecated.  
 boolean expandString(String expandStr, ActionEvent evt)
          Deprecated. Expand abbreviation on current caret position.
 Map getAbbrevMap()
          Deprecated. Get mapping table [abbrev, expanded-abbrev]
 String getAbbrevString()
          Deprecated. Get current abbreviation string
 String getExpandString()
          Deprecated.  
 String getExpandString(char typedChar)
          Deprecated. Checks whether there's valid string to expand and if so it returns it.
static boolean isAbbrevDisabled(JTextComponent component)
          Deprecated. Test whether the abbreviation expansion is disabled at the caret position in the given component's document.
 void propertyChange(PropertyChangeEvent evt)
          Deprecated.  
 void reset()
          Deprecated. Reset abbreviation accounting.
 Object translateAbbrev(String abbrev)
          Deprecated. 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

editorUI

protected EditorUI editorUI
Deprecated. 
Extended UI to which this abbreviation is associated to

Constructor Detail

Abbrev

public Abbrev(EditorUI editorUI,
              boolean checkDocText,
              boolean checkTextDelimiter)
Deprecated. 
Method Detail

isAbbrevDisabled

public static boolean isAbbrevDisabled(JTextComponent component)
Deprecated. 
Test whether the abbreviation expansion is disabled at the caret position in the given component's document.

Parameters:
component - non-null text component.
Returns:
true if the abbreviation can be expanded or false if not.

propertyChange

public void propertyChange(PropertyChangeEvent evt)
Deprecated. 
Specified by:
propertyChange in interface PropertyChangeListener

reset

public void reset()
Deprecated. 
Reset abbreviation accounting.


addChar

public void addChar(char ch)
Deprecated. 
Add typed character to abbreviation accounting string.


getAbbrevString

public String getAbbrevString()
Deprecated. 
Get current abbreviation string


getAbbrevMap

public Map getAbbrevMap()
Deprecated. 
Get mapping table [abbrev, expanded-abbrev]


translateAbbrev

public Object translateAbbrev(String abbrev)
Deprecated. 
Translate string using abbreviation table

Parameters:
abbrev - string to translate. Pass null to translate current abbreviation string
Returns:
expanded abbreviation

getExpandString

public String getExpandString(char typedChar)
Deprecated. 
Checks whether there's valid string to expand and if so it returns it.


getExpandString

public String getExpandString()
Deprecated. 

doExpansion

protected boolean doExpansion(int dotPos,
                              String expandStr,
                              ActionEvent evt)
                       throws BadLocationException
Deprecated. 
Throws:
BadLocationException

expandString

public boolean expandString(char typedChar,
                            String expandStr,
                            ActionEvent evt)
                     throws BadLocationException
Deprecated. 
Throws:
BadLocationException

expandString

public boolean expandString(String expandStr,
                            ActionEvent evt)
                     throws BadLocationException
Deprecated. 
Expand abbreviation on current caret position. Remove characters back to the word start and insert expanded abbreviation.

Returns:
whether the typed character should be added to the abbreviation or not
Throws:
BadLocationException

checkReset

public boolean checkReset(char typedChar)
Deprecated. 

checkAndExpand

public boolean checkAndExpand(char typedChar,
                              ActionEvent evt)
                       throws BadLocationException
Deprecated. 
Throws:
BadLocationException

checkAndExpand

public void checkAndExpand(ActionEvent evt)
                    throws BadLocationException
Deprecated. 
Throws:
BadLocationException

org.netbeans.modules.editor.lib/1 1.28.0 8

Built on August 28 2008.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.