Class WDatetimeEditor

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

public class WDatetimeEditor extends WEditor implements ContextMenuListener
Default editor for DisplayType.DateTime and DisplayType.TimestampWithTimeZone. Implemented with DatetimeBox component.
Author:
Low Heng Sin
  • Constructor Details

    • WDatetimeEditor

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

      public WDatetimeEditor(GridField gridField, boolean tableEditor, IEditorConfiguration editorConfiguration)
      Parameters:
      gridField -
      tableEditor -
      editorConfiguration -
    • WDatetimeEditor

      public WDatetimeEditor(String label, String description, boolean mandatory, boolean readonly, boolean updateable)
      Constructor for use if a grid field is unavailable
      Parameters:
      label - field label
      description - field description
      mandatory - whether a field is mandatory
      readonly - whether or not the editor is read only
      updateable - whether the editor contents can be changed
    • WDatetimeEditor

      public WDatetimeEditor()
      Default constructor
    • WDatetimeEditor

      public WDatetimeEditor(String columnName, boolean mandatory, boolean readonly, boolean updateable, String title)
      Parameters:
      columnName -
      mandatory -
      readonly -
      updateable -
      title - field label
  • Method Details

    • onEvent

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

      public String getDisplay()
      Specified by:
      getDisplay in class WEditor
      Returns:
      display text
    • getValue

      public Object getValue()
      Specified by:
      getValue in class WEditor
      Returns:
      Object, current value of editor
    • setValue

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

      public DatetimeBox 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
    • getEvents

      public String[] getEvents()
      Overrides:
      getEvents in class WEditor
      Returns:
      list of WEditor.component events that this editor will listen to
    • onMenu

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

      protected void setFieldStyle(String style)
      Description copied from class: WEditor
      Set field style
      Overrides:
      setFieldStyle in class WEditor
      Parameters:
      style - sclass name (@sclass=) or zclass name (@zclass=) or css style string