Class WLocatorEditor

java.lang.Object
org.adempiere.webui.editor.WEditor
org.adempiere.webui.editor.WLocatorEditor
All Implemented Interfaces:
PropertyChangeListener, EventListener, IInputValidator, IZoomableEditor, ContextMenuListener, org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>

public class WLocatorEditor extends WEditor implements org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>, PropertyChangeListener, ContextMenuListener, IZoomableEditor
Default editor for DisplayType.Locator.
Implemented with EditorBox component and WLocatorDialog.
Author:
Niraj Sohun
  • Constructor Details

    • WLocatorEditor

      public WLocatorEditor()
      Default Constructor
    • WLocatorEditor

      public WLocatorEditor(String columnName, boolean mandatory, boolean isReadOnly, boolean isUpdateable, MLocatorLookup mLocator, int windowNo)
      Constructor
      Parameters:
      columnName - ColumnName
      mandatory - mandatory
      isReadOnly - read only
      isUpdateable - updateable
      mLocator - locator (lookup) model
      windowNo - window no
    • WLocatorEditor

      public WLocatorEditor(GridField gridField)
      Parameters:
      gridField -
    • WLocatorEditor

      public WLocatorEditor(GridField gridField, boolean tableEditor, IEditorConfiguration editorConfiguration)
      Parameters:
      gridField -
      tableEditor -
      editorConfiguration -
  • Method Details

    • setValue

      public void setValue(Object value)
      Description copied from class: WEditor
      Set editor value
      Specified by:
      setValue in class WEditor
      Parameters:
      value -
    • getValue

      public Object getValue()
      Return Editor value
      Specified by:
      getValue in class WEditor
      Returns:
      value
    • getComponent

      public EditorBox getComponent()
      Overrides:
      getComponent in class WEditor
      Returns:
      Component
    • isReadWrite

      public boolean isReadWrite()
      Specified by:
      isReadWrite in class WEditor
      Returns:
      true if editable
    • setReadWrite

      public void setReadWrite(boolean readWrite)
      Specified by:
      setReadWrite in class WEditor
    • getM_Locator_ID

      public int getM_Locator_ID()
      Get M_Locator_ID
      Returns:
      M_Locator_ID
    • getDisplay

      public String getDisplay()
      Return Display text
      Specified by:
      getDisplay in class WEditor
      Returns:
      display text
    • onEvent

      public void onEvent(org.zkoss.zk.ui.event.Event event) throws Exception
      Specified by:
      onEvent in interface org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
      Throws:
      Exception
    • actionRefresh

      public void actionRefresh()
      Refresh MLocator lookup
    • actionZoom

      public void actionZoom()
      Description copied from interface: IZoomableEditor
      Zoom to AD window
      Specified by:
      actionZoom in interface IZoomableEditor
    • onMenu

      public void onMenu(ContextMenuEvent evt)
      Specified by:
      onMenu in interface ContextMenuListener
    • setField

      @Deprecated(forRemoval=true, since="11") public void setField(GridField mField)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set Field/WindowNo for ValuePreference (NOP)
      Parameters:
      mField - Model Field
    • getOnly_Warehouse_ID

      protected int getOnly_Warehouse_ID()
      Get Warehouse restriction if any.
      Returns:
      M_Warehouse_ID or 0
    • getOnly_Product_ID

      protected int getOnly_Product_ID()
      Get Product restriction if any.
      Returns:
      M_Product_ID or 0
    • getEvents

      public String[] getEvents()
      return listener events to be associated with editor component
      Overrides:
      getEvents in class WEditor
      Returns:
      list of WEditor.component events that this editor will listen to
    • setTableEditor

      public void setTableEditor(boolean b)
      Description copied from class: WEditor
      Set grid view mode. Have no effect if editor doesn't has a separate grid view mode.
      Overrides:
      setTableEditor in class WEditor
    • dynamicDisplay

      public void dynamicDisplay(Properties ctx)
      Description copied from class: WEditor
      Dynamic update of component state
      Overrides:
      dynamicDisplay in class WEditor
    • getMLocatorLookup

      public MLocatorLookup getMLocatorLookup()
      Returns:
      MLocatorLookup