Class VLookup

  • All Implemented Interfaces:
    ActionListener, FocusListener, ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener, VEditor, CEditor

    public class VLookup
    extends JComponent
    implements VEditor, ActionListener, FocusListener
    Lookup Visual Field.

    When r/o - display a Label When STABLE - display a ComboBox Otherwise show Selection Dialog

    Special handling of BPartner and Product

    Version:
    $Id: VLookup.java,v 1.5 2006/10/06 00:42:38 jjanke Exp $
    Author:
    Jorg Janke, Teo Sarca, SC ARHIPAC SERVICE SRL
  • BF [ 1740835 ] NPE when closing a window
  • BF [ 1817768 ] Isolate hardcoded table direct columns
  • BF [ 1834399 ] VLookup: pressing enter twice has a annoying behaviour
  • BF [ 1979213 ] VLookup.getDirectAccessSQL issue
  • BF [ 2552901 ] VLookup: TAB is not working OK, Michael Judd (MultiSelect), hengsin, hengsin.low@idalica.com
  • See Also:
    [2887701] https://sourceforge.net/tracker/?func=detail=879335=2887701=176962, Serialized Form
    • Field Detail

      • DISPLAY_LENGTH

        public static final int DISPLAY_LENGTH
        Display Length for Lookups (15)
        See Also:
        Constant Field Values
      • FIELD_HIGHT

        public static int FIELD_HIGHT
        Field Height
    • Constructor Detail

      • VLookup

        public VLookup​(String columnName,
                       boolean mandatory,
                       boolean isReadOnly,
                       boolean isUpdateable,
                       Lookup lookup)
        Detail Constructor
        Parameters:
        columnName - column
        mandatory - mandatory
        isReadOnly - read only
        isUpdateable - updateable
        lookup - lookup
    • Method Detail

      • createBPartner

        public static VLookup createBPartner​(int WindowNo)
        Create Optional BPartner Search Lookup
        Parameters:
        WindowNo - window
        Returns:
        VLookup
      • createProduct

        public static VLookup createProduct​(int WindowNo)
        Create Optional Product Search Lookup
        Parameters:
        WindowNo - window
        Returns:
        VLookup
      • createUser

        public static VLookup createUser​(int WindowNo)
        Create Optional User Search Lookup
        Parameters:
        WindowNo - window
        Returns:
        VLookup
      • dispose

        public void dispose()
        Dispose
        Specified by:
        dispose in interface VEditor
      • setReadWrite

        public void setReadWrite​(boolean value)
        Set ReadWrite
        Specified by:
        setReadWrite in interface CEditor
        Parameters:
        value - ReadWrite
      • isReadWrite

        public boolean isReadWrite()
        IsEditable
        Specified by:
        isReadWrite in interface CEditor
        Returns:
        is lookup ReadWrite
      • setMandatory

        public void setMandatory​(boolean mandatory)
        Set Mandatory (and back color)
        Specified by:
        setMandatory in interface CEditor
        Parameters:
        mandatory - mandatory
      • isMandatory

        public boolean isMandatory()
        Is it mandatory
        Specified by:
        isMandatory in interface CEditor
        Returns:
        true if mandatory
      • setBackground

        public void setBackground​(Color color)
        Set Background
        Overrides:
        setBackground in class JComponent
        Parameters:
        color - color
      • setBackground

        public void setBackground​(boolean error)
        Set Background
        Specified by:
        setBackground in interface CEditor
        Parameters:
        error - error
      • requestFocusInWindow

        public boolean requestFocusInWindow()
        Request Focus In Window
        Overrides:
        requestFocusInWindow in class JComponent
        Returns:
        focus request
      • setValue

        public void setValue​(Object value)
        Set Editor to value
        Specified by:
        setValue in interface CEditor
        Parameters:
        value - new Value
      • getValue

        public Object getValue()
        Return Editor value (Integer)
        Specified by:
        getValue in interface CEditor
        Returns:
        value
      • getDisplay

        public String getDisplay()
        Return editor display
        Specified by:
        getDisplay in interface CEditor
        Returns:
        display value
      • setField

        public void setField​(GridField mField)
        Set Field/WindowNo for ValuePreference
        Specified by:
        setField in interface VEditor
        Parameters:
        mField - Model Field for Lookup
      • getField

        public GridField getField()
        Description copied from interface: VEditor
        Get Field/WindowNo for ValuePreference
        Specified by:
        getField in interface VEditor
        Returns:
        mField
      • addActionListener

        public void addActionListener​(ActionListener listener)
        Action Listener Interface
        Specified by:
        addActionListener in interface VEditor
        Parameters:
        listener - listener
      • focusGained

        public void focusGained​(FocusEvent e)
        Focus Listener for ComboBoxes with missing Validation or invalid entries - Requery listener for updated list
        Specified by:
        focusGained in interface FocusListener
        Parameters:
        e - FocusEvent
      • setToolTipText

        public void setToolTipText​(String text)
        Set ToolTip
        Overrides:
        setToolTipText in class JComponent
        Parameters:
        text - tool tip text
      • refresh

        public int refresh()
        Refresh Query
        Returns:
        count
      • setStopEditing

        public void setStopEditing​(boolean stopediting)
        Use by vcelleditor to indicate editing is off and don't invoke databinding
        Parameters:
        stopediting -
      • setComboShortList

        public void setComboShortList​(boolean shortList)
      • isComboShortList

        public boolean isComboShortList()