Compiere 3.1

org.compiere.grid
Class XLookup

java.lang.Object
  extended by javax.swing.AbstractListModel
      extended by org.compiere.framework.Lookup
          extended by org.compiere.grid.XLookup
All Implemented Interfaces:
Serializable, ComboBoxModel, ListModel, MutableComboBoxModel

public class XLookup
extends Lookup

Manual Lookup (Model)- loaded by the put method

Version:
$Id: XLookup.java,v 1.2 2006/07/30 00:51:28 jjanke Exp $
Author:
Jorg Janke
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.compiere.framework.Lookup
log, m_WindowNo, p_data
 
Fields inherited from class javax.swing.AbstractListModel
listenerList
 
Constructor Summary
XLookup(Ctx ctx, int WindowNo, String keyColumn)
          Manual Lookup
 
Method Summary
 boolean containsKey(Object key)
          The Lookup contains the key
 NamePair get(Object key)
          Get Object of Key Value
 String getColumnName()
          Get underlying fully qualified Table.Column Name
 ArrayList<NamePair> getData(boolean mandatory, boolean onlyValidated, boolean onlyActive, boolean temporary)
          Return data as sorted Array
 String getDisplay(Object key)
          Get Display String of key value
 int refresh()
          Refresh Values (nop)
 
Methods inherited from class org.compiere.framework.Lookup
addElement, addElement, disableValidation, dispose, fillComboBox, fillComboBox, getCtx, getDirect, getDisplayType, getElementAt, getIndexOf, getSelectedItem, getSize, getValidation, getWindowNo, getZoomQuery, getZoomWindow, getZoomWindow, hasInactive, insertElementAt, insertElementAt, isValidated, isValidationDisabled, loadComplete, put, put, removeAllElements, removeElement, removeElementAt, setContext, setDisplayType, setSelectedItem, setSelectedItemAlways, toString
 
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

XLookup

public XLookup(Ctx ctx,
               int WindowNo,
               String keyColumn)
Manual Lookup

Parameters:
ctx - context
WindowNo - window
keyColumn - key Column
Method Detail

getDisplay

public String getDisplay(Object key)
Get Display String of key value

Specified by:
getDisplay in class Lookup
Parameters:
key - key
Returns:
display

containsKey

public boolean containsKey(Object key)
The Lookup contains the key

Specified by:
containsKey in class Lookup
Parameters:
key - key
Returns:
true if contains key

get

public NamePair get(Object key)
Get Object of Key Value

Specified by:
get in class Lookup
Parameters:
key - key
Returns:
Object or null

getData

public ArrayList<NamePair> getData(boolean mandatory,
                                   boolean onlyValidated,
                                   boolean onlyActive,
                                   boolean temporary)
Return data as sorted Array

Specified by:
getData in class Lookup
Parameters:
mandatory - mandatory
onlyValidated - only validated
onlyActive - only active
temporary - force load for temporary display
Returns:
list of data

refresh

public int refresh()
Refresh Values (nop)

Overrides:
refresh in class Lookup
Returns:
number of cache

getColumnName

public String getColumnName()
Get underlying fully qualified Table.Column Name

Specified by:
getColumnName in class Lookup
Returns:
column name

Compiere 3.1

Compiere® is a registered trademark of ComPiere, Inc. ©2004-2008 HumanFlash.com All rights reserved.