|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.AbstractListModel
org.compiere.framework.Lookup
public abstract class Lookup
Base Class for MLookup, MLocator. as well as for MLocation, MAccount (only single value) Maintains selectable data as NamePairs in ArrayList The objects itself may be shared by the lookup implementation (ususally HashMap)
| Field Summary | |
|---|---|
protected CLogger |
log
Logger |
protected int |
m_WindowNo
Window No |
protected ArrayList<NamePair> |
p_data
The Data List |
| Fields inherited from class javax.swing.AbstractListModel |
|---|
listenerList |
| Constructor Summary | |
|---|---|
Lookup(Ctx ctx,
int windowNo,
int displayType)
Lookup |
|
| Method Summary | |
|---|---|
void |
addElement(NamePair anObject)
Add Element at the end |
void |
addElement(Object anObject)
Add Element at the end |
abstract boolean |
containsKey(Object key)
The Lookup contains the key |
void |
disableValidation()
Disable Validation |
void |
dispose()
Dispose - clear items w/o firing events |
void |
fillComboBox(boolean restore)
Fill ComboBox with old saved data (if exists) or all data available |
void |
fillComboBox(boolean mandatory,
boolean onlyValidated,
boolean onlyActive,
boolean temporary)
Fill ComboBox with lookup data (async using Worker) |
abstract NamePair |
get(Object key)
Get Object of Key Value |
abstract String |
getColumnName()
Get underlying fully qualified Table.Column Name. |
Ctx |
getCtx()
Get Ctx |
abstract ArrayList<NamePair> |
getData(boolean mandatory,
boolean onlyValidated,
boolean onlyActive,
boolean temporary)
Fill ComboBox with Data (Value/KeyNamePair) |
NamePair |
getDirect(Object key,
boolean saveInCache,
boolean cacheLocal)
Get Data Direct from Table. |
abstract String |
getDisplay(Object key)
Get Display of Key Value |
int |
getDisplayType()
Get Display Type |
Object |
getElementAt(int index)
Get Element at Index |
int |
getIndexOf(Object anObject)
Returns the index-position of the specified object in the list. |
Object |
getSelectedItem()
Return previously selected Item |
int |
getSize()
Get Size of Model |
String |
getValidation()
Get dynamic Validation SQL (none) |
int |
getWindowNo()
Get Window No |
Query |
getZoomQuery()
Get Zoom Query String - default implementation |
int |
getZoomWindow()
Get Zoom - default implementation |
int |
getZoomWindow(Query query)
Get Zoom - default implementation |
boolean |
hasInactive()
Has Inactive records - default implementation |
void |
insertElementAt(NamePair anObject,
int index)
Insert Element At |
void |
insertElementAt(Object anObject,
int index)
Insert Element At |
boolean |
isValidated()
Is Validated - default implementation |
boolean |
isValidationDisabled()
Is Validation Disabled |
void |
loadComplete()
Wait until async Load Complete |
void |
put(int key,
String value)
Put Value |
void |
put(String key,
String value)
Put Value |
int |
refresh()
Refresh Values - default implementation |
void |
removeAllElements()
Empties the list. |
void |
removeElement(Object anObject)
Remove Item |
void |
removeElementAt(int index)
Remove Item at index |
void |
setContext(Ctx ctx,
int windowNo)
Set Context |
void |
setDisplayType(int displayType)
Set Display Type |
void |
setSelectedItem(Object anObject)
Set the value of the selected item. |
void |
setSelectedItemAlways(Object anObject)
Set the value of the selected item. |
String |
toString()
String Representation |
| Methods inherited from class javax.swing.AbstractListModel |
|---|
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.swing.ListModel |
|---|
addListDataListener, removeListDataListener |
| Field Detail |
|---|
protected volatile ArrayList<NamePair> p_data
protected CLogger log
protected int m_WindowNo
| Constructor Detail |
|---|
public Lookup(Ctx ctx,
int windowNo,
int displayType)
ctx - contextwindowNo - window nodisplayType - display type| Method Detail |
|---|
public void setContext(Ctx ctx,
int windowNo)
ctx - contextwindowNo - windowpublic Ctx getCtx()
public int getWindowNo()
public int getDisplayType()
public void setDisplayType(int displayType)
displayType - display typepublic void setSelectedItem(Object anObject)
setSelectedItem in interface ComboBoxModelanObject - The combo box value or null for no selection.public void setSelectedItemAlways(Object anObject)
anObject - The combo box value or null for no selection.public Object getSelectedItem()
getSelectedItem in interface ComboBoxModelpublic int getSize()
getSize in interface ListModelpublic Object getElementAt(int index)
getElementAt in interface ListModelindex - index
public int getIndexOf(Object anObject)
anObject - object
public void addElement(NamePair anObject)
anObject - objectpublic void addElement(Object anObject)
addElement in interface MutableComboBoxModelanObject - object
public void insertElementAt(NamePair anObject,
int index)
anObject - objectindex - index
public void insertElementAt(Object anObject,
int index)
insertElementAt in interface MutableComboBoxModelanObject - objectindex - indexpublic void removeElementAt(int index)
removeElementAt in interface MutableComboBoxModelindex - indexpublic void removeElement(Object anObject)
removeElement in interface MutableComboBoxModelanObject - objectpublic void removeAllElements()
public void put(String key,
String value)
key - keyvalue - value
public void put(int key,
String value)
key - keyvalue - value
public void fillComboBox(boolean mandatory,
boolean onlyValidated,
boolean onlyActive,
boolean temporary)
mandatory - has mandatory data only (i.e. no "null" selection)onlyValidated - only validatedonlyActive - onlt activetemporary - save current values - restore via fillComboBox (true)public void fillComboBox(boolean restore)
restore - if true, use saved data - else fill it with all datapublic abstract String getDisplay(Object key)
key - key
public abstract NamePair get(Object key)
key - key
public abstract ArrayList<NamePair> getData(boolean mandatory,
boolean onlyValidated,
boolean onlyActive,
boolean temporary)
mandatory - has mandatory data only (i.e. no "null" selection)onlyValidated - only validatedonlyActive - only activetemporary - force load for temporary display
public abstract String getColumnName()
public abstract boolean containsKey(Object key)
key - key
public int refresh()
public void disableValidation()
public boolean isValidationDisabled()
public boolean isValidated()
public String getValidation()
public boolean hasInactive()
public int getZoomWindow()
public int getZoomWindow(Query query)
query - query
public Query getZoomQuery()
public NamePair getDirect(Object key,
boolean saveInCache,
boolean cacheLocal)
key - keysaveInCache - save in cache for r/wcacheLocal - cache locally for r/o
public void dispose()
public void loadComplete()
public String toString()
toString in class Object
|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||