Class QuickGridTabRowRenderer

java.lang.Object
org.adempiere.webui.adwindow.QuickGridTabRowRenderer
All Implemented Interfaces:
org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>, org.zkoss.zul.RendererCtrl, org.zkoss.zul.RowRenderer<Object[]>, org.zkoss.zul.RowRendererExt

public class QuickGridTabRowRenderer extends Object implements org.zkoss.zul.RowRenderer<Object[]>, org.zkoss.zul.RowRendererExt, org.zkoss.zul.RendererCtrl, org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
Row renderer for Quick GridTab grid (Base on GridTabRowRenderer)
Since:
Nov 03, 2017
Author:
Logilite Technologies
  • Field Details

    • IS_QUICK_FORM_COMPONENT

      public static final String IS_QUICK_FORM_COMPONENT
      Component boolean attribute to indicate this component is own by QuickGridView
      See Also:
    • GRID_ROW_INDEX_ATTR

      public static final String GRID_ROW_INDEX_ATTR
      Editor component attribute to store row index (absolute)
      See Also:
    • CURRENT_ROW_STYLE

      public static final String CURRENT_ROW_STYLE
      See Also:
    • CSS_READ_ONLY_COMPONENT

      public static final String CSS_READ_ONLY_COMPONENT
      See Also:
    • currentRowIndex

      public int currentRowIndex
    • editorsListMap

      public Map<org.zkoss.zul.Row,ArrayList<WEditor>> editorsListMap
    • readOnlyEditorsListMap

      public Map<org.zkoss.zul.Row,ArrayList<WEditor>> readOnlyEditorsListMap
  • Constructor Details

    • QuickGridTabRowRenderer

      public QuickGridTabRowRenderer(GridTab gridTab, int windowNo)
      Parameters:
      gridTab -
      windowNo -
  • Method Details

    • getColumnIndex

      public int getColumnIndex(GridField field)
      Parameters:
      field -
      Returns:
      column index for field, -1 if not found
    • setPaging

      public void setPaging(org.zkoss.zul.Paging paging)
      Parameters:
      paging -
    • render

      public void render(org.zkoss.zul.Row row, Object[] data, int index) throws Exception
      Render data for row.
      Specified by:
      render in interface org.zkoss.zul.RowRenderer<Object[]>
      Parameters:
      row -
      data -
      index -
      Throws:
      Exception
    • isDisableReadonlyComponent

      public boolean isDisableReadonlyComponent(org.zkoss.zk.ui.Component component, boolean isDisable)
      Disable Read-only components for while pressing tab button focus goes to read-only component. Enable Read-only component before display Logic update. Add/Remove CSS Class from read-only component
      Parameters:
      component -
      isDisable -
      Returns:
      true if component is read only
    • getCurrentCell

      public org.zkoss.zul.Cell getCurrentCell()
      Returns:
      current Cell
    • setCurrentCell

      public void setCurrentCell(org.zkoss.zul.Cell currentCell)
      Set current cell
      Parameters:
      currentCell -
    • setCurrentCell

      public void setCurrentCell(int row, int col, int code)
      Set current cell
      Parameters:
      row -
      col -
      code - cell navigation code (right, left, down, up, next)
    • addRemovePropertyChangeListener

      public void addRemovePropertyChangeListener(boolean isAddListener, int col)
      If isAddListener is true add Property Change Listener, otherwise Remove Property Change Listener
      Parameters:
      isAddListener -
      col -
    • isAddRemoveListener

      public Boolean isAddRemoveListener(int code)
      Parameters:
      code - cell navigation code
      Returns:
      true to add property change listener, false otherwise
    • setRowTo

      public void setRowTo(int row)
      Set current row
      Parameters:
      row - absolute row index
    • setFocusOnCurrentCell

      public void setFocusOnCurrentCell()
      Set focus to currentCell
    • setCurrentRow

      public void setCurrentRow(org.zkoss.zul.Row row)
      Set current focus row
      Parameters:
      row -
    • getCurrentRow

      public org.zkoss.zul.Row getCurrentRow()
      Returns:
      Row
    • getCurrentRowIndex

      public int getCurrentRowIndex()
      Returns:
      current row index ( absolute )
    • editCurrentRow

      public void editCurrentRow()
      Enter edit mode for current focus row.
    • getControls

      public int getControls()
      Specified by:
      getControls in interface org.zkoss.zul.RowRendererExt
      See Also:
      • RowRendererExt.getControls()
    • newCell

      public org.zkoss.zk.ui.Component newCell(org.zkoss.zul.Row row)
      Specified by:
      newCell in interface org.zkoss.zul.RowRendererExt
      See Also:
      • RowRendererExt.newCell(Row)
    • newRow

      public org.zkoss.zul.Row newRow(org.zkoss.zul.Grid grid)
      Specified by:
      newRow in interface org.zkoss.zul.RowRendererExt
      See Also:
      • RowRendererExt.newRow(Grid)
    • doCatch

      public void doCatch(Throwable ex) throws Throwable
      Specified by:
      doCatch in interface org.zkoss.zul.RendererCtrl
      Throws:
      Throwable
      See Also:
      • RendererCtrl.doCatch(Throwable)
    • doFinally

      public void doFinally()
      Specified by:
      doFinally in interface org.zkoss.zul.RendererCtrl
      See Also:
      • RendererCtrl.doFinally()
    • doTry

      public void doTry()
      Specified by:
      doTry in interface org.zkoss.zul.RendererCtrl
      See Also:
      • RendererCtrl.doTry()
    • setGridPanel

      public void setGridPanel(QuickGridView gridPanel)
      Set QuickGridView that own this renderer.
      Parameters:
      gridPanel -
    • isEditing

      public boolean isEditing()
      Returns:
      true if current row is in edit mode, false otherwise
    • setADWindowPanel

      public void setADWindowPanel(AbstractADWindowContent windowPanel)
      Set AD window content part that own this renderer. buttonListener need this to call AbstractADWindowContent.actionPerformed(ActionEvent).
      Parameters:
      windowPanel -
    • 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
    • clearMaps

      public void clearMaps()
      Clear editorsListmap on page change and dispose.