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 int
C_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 boolean
containsKey(Object key)
The Lookup contains the keyboolean
containsKeyNoDirect(Object key)
The Lookup contains the key, do not push directvoid
dispose()
Disposevoid
dynamicDisplay(Properties ctx)
NamePair
get(Object key)
Get valueString
getColumnName()
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 ArrayListNamePair
getDirect(Object keyValue, boolean saveInCache, String trxName)
Get Data Direct from TableString
getDisplay(Object value)
Get Display valueMLocator
getMLocator(Object keyValue, String trxName)
Get Data Direct from Tableint
getOnly_Product_ID()
Get Only Productint
getOnly_Warehouse_ID()
Get Only Wahrehouseboolean
isValid(Object key)
Is Locator with key valid (Warehouse)boolean
isValid(MLocator locator)
Is Locator with key valid (Warehouse)void
loadComplete()
Wait until async Load Completeint
refresh()
Refresh Valuesint
refreshIfNeeded()
void
setOnly_Product_ID(int only_Product_ID)
Set Product restrictionvoid
setOnly_Warehouse_ID(int only_Warehouse_ID)
Set Warehouse restrictionString
toString()
-
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:
loadComplete
in classLookup
-
getDisplay
public String getDisplay(Object value)
Get Display value- Specified by:
getDisplay
in classLookup
- Parameters:
value
- value- Returns:
- String to display
-
containsKey
public boolean containsKey(Object key)
The Lookup contains the key- Specified by:
containsKey
in classLookup
- Parameters:
key
- key- Returns:
- true, if lookup contains key
-
containsKeyNoDirect
public boolean containsKeyNoDirect(Object key)
Description copied from class:Lookup
The Lookup contains the key, do not push direct- Specified by:
containsKeyNoDirect
in 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:
getColumnName
in classLookup
- Returns:
- Table.ColumnName
-
dynamicDisplay
public void dynamicDisplay(Properties ctx)
-
-