nl.coderight.jazz.form.field.lookup
Class LookupField<V>
java.lang.Object
nl.coderight.jazz.form.FormField<V>
nl.coderight.jazz.form.FormControl<V>
nl.coderight.jazz.form.field.scrollable.ScrollableField<V>
nl.coderight.jazz.form.field.selectable.SelectableField<V>
nl.coderight.jazz.form.field.selectable.ListSelectableField<V>
nl.coderight.jazz.form.field.lookup.LookupField<V>
- All Implemented Interfaces:
- ClipboardSupport, Editable, Validation
- Direct Known Subclasses:
- LookupComboField, LookupTextField
public abstract class LookupField<V>
- extends ListSelectableField<V>
- implements Validation, Editable, ClipboardSupport
Base class for lookup fields (auto-complete).
- See Also:
LookupTextField,
LookupComboField
| Methods inherited from class nl.coderight.jazz.form.field.selectable.ListSelectableField |
createSortComparator, delete, getFilterCount, getIndex, getListOfValues, getValue, getValueAt, getValueCount, insert, onFilterChanged, onRebuildFinished, onRebuildProgress, onRebuildStart, setListOfValues, setValueAt, sort, update |
| Methods inherited from class nl.coderight.jazz.form.field.selectable.SelectableField |
addFilter, dispose, filter, getBindID, getFilters, getRelationID, getSelectedIndex, getSelectID, getSelectionBackground, getSelectionCount, getSelectionForeground, getSortComparator, getSortID, getSortOrder, isSortingEnabled, onFocusGained, onPopup, onSearchFinished, onSearchProgress, onSearchStart, search, search, searchAll, setOnSelectAction, setOnSelectCondition, setOnSelectEvent, setOnSelectGroup, setRelationID, setSelectedIndex, setSelectID, setSelectionBackground, setSelectionForeground, setSortComparator, setSortID, setSortingEnabled, setSortOrder |
| Methods inherited from class nl.coderight.jazz.form.field.scrollable.ScrollableField |
getComponent, getFocusComponent, getPreferredSize, getPreferredViewportSize, getViewportSize, isOpaque, onViewportChanged, setBackground, setBackgroundImage, setBorder, setColumnHeader, setComponent, setComponent, setCorner, setEnabled, setForeground, setOpaque, setPreferredSize, setRowHeader, setScrollable, setScrollBarPolicy, setTitle |
| Methods inherited from class nl.coderight.jazz.form.FormField |
dispatchEvent, focusNextField, focusPreviousField, getBackground, getBorder, getCursor, getDataBinding, getForeground, getForm, getLabel, getParent, getToolTipText, isBindable, isChanged, isEnabled, isFocusable, isReadonly, isShowing, isValueChanged, isVisible, onClick, onDoubleClick, onFocusLost, onMouseEnter, onMouseLeave, setBindID, setChanged, setCursor, setDataBinding, setFocusable, setOnFocusGainedEvent, setOnFocusLostEvent, setPopupMenu, setReadonly, setToolTipText, setVisible, translate |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LookupField
public LookupField(String bindID,
String selectID)
getField
protected JTextField getField()
setIcon
public void setIcon(Icon icon)
- Since:
- 1.6
setInputPrompt
public void setInputPrompt(String text)
- Since:
- 1.6
hasFocus
public boolean hasFocus()
- Overrides:
hasFocus in class FormControl<V>
getLookupID
public String getLookupID()
setLookupID
public void setLookupID(String lookupID)
- Sets the match property.
- Parameters:
lookupID -
getDisplayID
public String getDisplayID()
setDisplayID
public void setDisplayID(String displayID)
setLength
public void setLength(int length)
setCopyAction
public void setCopyAction(Action action)
setCutAction
public void setCutAction(Action action)
setPasteAction
public void setPasteAction(Action action)
copy
public void copy()
- Specified by:
copy in interface ClipboardSupport
cut
public void cut()
- Specified by:
cut in interface ClipboardSupport
paste
public void paste()
- Specified by:
paste in interface ClipboardSupport
getText
public String getText()
locationToIndex
public final int locationToIndex(Point point)
- Specified by:
locationToIndex in class SelectableField<V>
isScrollable
public final boolean isScrollable()
- Overrides:
isScrollable in class ScrollableField<V>
setLookupIgnoreCase
public void setLookupIgnoreCase(boolean ignoreCase)
- Turn case-sensitive lookup on/off.
setLookupMinimumLength
public void setLookupMinimumLength(int length)
- Sets the minimum characters for the popup to become visible.
isEditable
public boolean isEditable()
- Specified by:
isEditable in interface Editable
setEditable
public void setEditable(boolean editable)
- Specified by:
setEditable in interface Editable
setOnChangeEvent
public void setOnChangeEvent(Event onChangeEvent)
- Overrides:
setOnChangeEvent in class SelectableField<V>
setRequired
public void setRequired(boolean required)
setRequiredMessage
public void setRequiredMessage(Message message)
validate
public void validate()
throws ValidationException
- Specified by:
validate in interface Validation
- Throws:
ValidationException
isValid
public boolean isValid()
- Specified by:
isValid in interface Validation
getError
public ValidationError getError()
- Specified by:
getError in interface Validation
getValue
public V getValue()
- Description copied from class:
FormField
- Returns field value.
- Overrides:
getValue in class SelectableField<V>
setValue
public void setValue(V value)
- Description copied from class:
FormField
- Sets field value.
- Overrides:
setValue in class SelectableField<V>
setRenderer
protected abstract void setRenderer(ListCellRenderer renderer)
configPopupComponent
protected abstract void configPopupComponent(LookupField.ListModel model)
isPopupVisible
protected abstract boolean isPopupVisible()
showPopup
protected abstract void showPopup()
hidePopup
protected abstract void hidePopup()
onSelect
protected void onSelect()
- Overrides:
onSelect in class SelectableField<V>
onChange
protected void onChange()
- Overrides:
onChange in class SelectableField<V>
onKeyTyped
protected void onKeyTyped(KeyEvent evt)
notifyDataChanged
protected void notifyDataChanged()
- Specified by:
notifyDataChanged in class ListSelectableField<V>
backupSelection
protected final void backupSelection()
- Overrides:
backupSelection in class ListSelectableField<V>
restoreSelection
protected final void restoreSelection()
- Overrides:
restoreSelection in class ListSelectableField<V>
Copyright 2010 CodeRight, All rights reserved.