Package org.compiere.model
Class MLocatorLookup
- java.lang.Object
-
- javax.swing.AbstractListModel<Object>
-
- org.compiere.model.Lookup
-
- org.compiere.model.MLocatorLookup
-
- All Implemented Interfaces:
Serializable,ComboBoxModel<Object>,ListModel<Object>,MutableComboBoxModel<Object>
public final class MLocatorLookup extends Lookup implements Serializable
Warehouse Locator Lookup Model. (Lookup Model is model.Lookup.java)- Version:
- $Id: MLocatorLookup.java,v 1.3 2006/07/30 00:58:04 jjanke Exp $
- Author:
- Jorg Janke, Teo Sarca, SC ARHIPAC SERVICE SRL
- BF [ 1892920 ] Locators fieldshould be ordered by Warehouse/Value
- FR [ 2306161 ] Removed limit of 200 on max number of locators.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected intC_Locator_ID-
Fields inherited from class javax.swing.AbstractListModel
listenerList
-
-
Constructor Summary
Constructors Constructor Description MLocatorLookup(Properties ctx, int WindowNo)ConstructorMLocatorLookup(Properties ctx, int WindowNo, String validationCode)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsKey(Object key)The Lookup contains the keybooleancontainsKeyNoDirect(Object key)The Lookup contains the key, do not push directvoiddispose()DisposevoiddynamicDisplay(Properties ctx)NamePairget(Object key)Get valueStringgetColumnName()Get underlying fully qualified Table.Column NameCollection<MLocator>getData()Return info as ArrayList containing Locator, waits for the loader to finishArrayList<Object>getData(boolean mandatory, boolean onlyValidated, boolean onlyActive, boolean temporary, boolean shortlist)Return data as sorted ArrayListNamePairgetDirect(Object keyValue, boolean saveInCache, String trxName)Get Data Direct from TableStringgetDisplay(Object value)Get Display valueMLocatorgetMLocator(Object keyValue, String trxName)Get Data Direct from TableintgetOnly_Product_ID()Get Only ProductintgetOnly_Warehouse_ID()Get Only WahrehousebooleanisValid(Object key)Is Locator with key valid (Warehouse)booleanisValid(MLocator locator)Is Locator with key valid (Warehouse)voidloadComplete()Wait until async Load Completeintrefresh()Refresh ValuesintrefreshIfNeeded()voidsetOnly_Product_ID(int only_Product_ID)Set Product restrictionvoidsetOnly_Warehouse_ID(int only_Warehouse_ID)Set Warehouse restrictionStringtoString()-
Methods inherited from class org.compiere.model.Lookup
addElement, fillComboBox, fillComboBox, getDirect, getDirect, getDirect, getDisplayType, getElementAt, getIndexOf, getSelectedItem, getSize, getValidation, getWindowNo, getZoom, getZoom, getZoom, getZoomQuery, hasInactive, insertElementAt, isLoaded, isMandatory, isShortList, isValidated, put, put, removeAllElements, removeElement, removeElementAt, setMandatory, setSelectedItem, setShortList
-
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
-
-
-
-
Constructor Detail
-
MLocatorLookup
public MLocatorLookup(Properties ctx, int WindowNo)
Constructor- Parameters:
ctx- contextWindowNo- window no
-
MLocatorLookup
public MLocatorLookup(Properties ctx, int WindowNo, String validationCode)
Constructor- Parameters:
ctx- contextWindowNo- window novalidationCode- Lookup validation code
-
-
Method Detail
-
setOnly_Warehouse_ID
public void setOnly_Warehouse_ID(int only_Warehouse_ID)
Set Warehouse restriction- Parameters:
only_Warehouse_ID- warehouse
-
getOnly_Warehouse_ID
public int getOnly_Warehouse_ID()
Get Only Wahrehouse- Returns:
- warehouse
-
setOnly_Product_ID
public void setOnly_Product_ID(int only_Product_ID)
Set Product restriction- Parameters:
only_Product_ID- Product
-
getOnly_Product_ID
public int getOnly_Product_ID()
Get Only Product- Returns:
- Product
-
loadComplete
public void loadComplete()
Wait until async Load Complete- Overrides:
loadCompletein classLookup
-
getDisplay
public String getDisplay(Object value)
Get Display value- Specified by:
getDisplayin classLookup- Parameters:
value- value- Returns:
- String to display
-
containsKey
public boolean containsKey(Object key)
The Lookup contains the key- Specified by:
containsKeyin classLookup- Parameters:
key- key- Returns:
- true, if lookup contains key
-
containsKeyNoDirect
public boolean containsKeyNoDirect(Object key)
Description copied from class:LookupThe Lookup contains the key, do not push direct- Specified by:
containsKeyNoDirectin classLookup- Parameters:
key- key- Returns:
- true if contains key
-
getDirect
public NamePair getDirect(Object keyValue, boolean saveInCache, String trxName)
Get Data Direct from Table- Parameters:
keyValue- integer key valuesaveInCache- save in cachetrxName- transaction- Returns:
- Object directly loaded
-
getMLocator
public MLocator getMLocator(Object keyValue, String trxName)
Get Data Direct from Table- Parameters:
keyValue- integer key valuetrxName- transaction- Returns:
- Object directly loaded
-
toString
public String toString()
-
isValid
public boolean isValid(Object key)
Is Locator with key valid (Warehouse)- Parameters:
key- key- Returns:
- true if valid
-
isValid
public boolean isValid(MLocator locator)
Is Locator with key valid (Warehouse)- Parameters:
locator- locator- Returns:
- true if valid
-
getData
public Collection<MLocator> getData()
Return info as ArrayList containing Locator, waits for the loader to finish- Returns:
- Collection of lookup values
-
getData
public ArrayList<Object> getData(boolean mandatory, boolean onlyValidated, boolean onlyActive, boolean temporary, boolean shortlist)
Return data as sorted ArrayList
-
refresh
public int refresh()
Refresh Values
-
refreshIfNeeded
public int refreshIfNeeded()
-
getColumnName
public String getColumnName()
Get underlying fully qualified Table.Column Name- Specified by:
getColumnNamein classLookup- Returns:
- Table.ColumnName
-
dynamicDisplay
public void dynamicDisplay(Properties ctx)
-
-