org.compiere.grid.ed
Class AutoCompletion
java.lang.Object
javax.swing.text.AbstractDocument
javax.swing.text.PlainDocument
org.compiere.grid.ed.AutoCompletion
- All Implemented Interfaces:
- Serializable, Document
public class AutoCompletion
- extends PlainDocument
Auto completion behaviour for a combo box
- Author:
- phib: this is from http://www.orbital-computer.de/JComboBox
with some minor revisions for Adempiere, Teo Sarca, SC ARHIPAC SERVICE SRL
- BF [ 1735043 ] AutoCompletion: drop down box is showed even if i press Caps
- FR [ 1820783 ] AutoCompletion: posibility to toggle strict mode
- BF [ 1820778 ] ESC(cancel editing) key not working if you are on VComboBox
- See Also:
- Serialized Form
| Methods inherited from class javax.swing.text.AbstractDocument |
addDocumentListener, addUndoableEditListener, createBranchElement, createLeafElement, createPosition, dump, fireChangedUpdate, fireInsertUpdate, fireRemoveUpdate, fireUndoableEditUpdate, getAsynchronousLoadPriority, getAttributeContext, getBidiRootElement, getContent, getCurrentWriter, getDocumentFilter, getDocumentListeners, getDocumentProperties, getEndPosition, getLength, getListeners, getProperty, getRootElements, getStartPosition, getText, getText, getUndoableEditListeners, postRemoveUpdate, putProperty, readLock, readUnlock, removeDocumentListener, removeUndoableEditListener, render, replace, setAsynchronousLoadPriority, setDocumentFilter, setDocumentProperties, writeLock, writeUnlock |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AutoCompletion
public AutoCompletion(CComboBox comboBox)
enable
public static void enable(CComboBox comboBox)
- Enable auto completion for a combo box (strict mode)
- Parameters:
comboBox -
enable
public static void enable(CComboBox comboBox,
boolean strictMode)
- Enable auto completion for a combo box
- Parameters:
comboBox - strictMode - true if you want to set strict mode
remove
public void remove(int offs,
int len)
throws BadLocationException
- Specified by:
remove in interface Document- Overrides:
remove in class AbstractDocument
- Throws:
BadLocationException
insertString
public void insertString(int offs,
String str,
AttributeSet a)
throws BadLocationException
- Specified by:
insertString in interface Document- Overrides:
insertString in class PlainDocument
- Throws:
BadLocationException
setText
public void setText(String text)
- Set text
- Parameters:
text -
setStrictMode
public void setStrictMode(boolean mode)
- Set strict mode. If the strict mode is enabled, you can't enter any other values than the
ones from combo box list.
- Parameters:
mode - true if strict mode
Adempiere® is a registered trademark of ADempiere Business Inc. ©2004-2008 HumanFlash.com All rights reserved.