Class GridTabRowRenderer

  • 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 GridTabRowRenderer
    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 GridTab grid.
    Author:
    hengsin, Teo Sarca, teo.sarca@gmail.com
  • BF [ 2996608 ] GridPanel is not displaying time https://sourceforge.net/p/adempiere/zk-web-client/420/
    • Constructor Detail

      • GridTabRowRenderer

        public GridTabRowRenderer​(GridTab gridTab,
                                  int windowNo)
        Parameters:
        gridTab -
        windowNo -
    • Method Detail

      • getColumnIndex

        public int getColumnIndex​(GridField field)
      • getDisplayTextWithEditorCheck

        protected String getDisplayTextWithEditorCheck​(Object value,
                                                       GridField gridField,
                                                       int rowIndex)
        Check existence of readonly editor and return display text
        Parameters:
        value -
        gridField -
        rowIndex -
        Returns:
        display text
      • setComponentStyle

        protected void setComponentStyle​(org.zkoss.zk.ui.HtmlBasedComponent component,
                                         String style)
      • getEditors

        public List<WEditor> getEditors()
        Returns:
        active editor list
      • setPaging

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

        public void stopEditing​(boolean updateCellLabel)
        Detach all editor and optionally set the current value of the editor as cell label.
        Parameters:
        updateCellLabel -
      • render

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

        public void setCurrentRow​(org.zkoss.zul.Row 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
      • 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()
      • focusToFirstEditor

        public void focusToFirstEditor()
        set focus to first active editor
      • focusToEditor

        protected void focusToEditor​(WEditor toFocus)
      • focusToNextEditor

        public void focusToNextEditor​(WEditor ref)
        set focus to next readwrite editor from ref
        Parameters:
        ref -
      • setGridPanel

        public void setGridPanel​(GridView gridPanel)
        Parameters:
        gridPanel -
      • isEditing

        public boolean isEditing()
        Returns:
        boolean
      • setADWindowPanel

        public void setADWindowPanel​(AbstractADWindowContent windowPanel)
        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