Package org.adempiere.webui.adwindow
Class GridTabRowRenderer
- java.lang.Object
-
- org.adempiere.webui.adwindow.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/
-
-
Field Summary
Fields Modifier and Type Field Description static String
GRID_ROW_INDEX_ATTR
-
Constructor Summary
Constructors Constructor Description GridTabRowRenderer(GridTab gridTab, int windowNo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doCatch(Throwable ex)
void
doFinally()
void
doTry()
void
editCurrentRow()
Enter edit modeprotected void
focusToEditor(WEditor toFocus)
void
focusToFirstEditor()
set focus to first active editorvoid
focusToNextEditor(WEditor ref)
set focus to next readwrite editor from refint
getColumnIndex(GridField field)
int
getControls()
org.zkoss.zul.Row
getCurrentRow()
int
getCurrentRowIndex()
String
getDisplayText(Object value, GridField gridField, int rowIndex)
callgetDisplayText(Object, GridField, int, boolean)
with isForceGetValue = falseprotected String
getDisplayTextWithEditorCheck(Object value, GridField gridField, int rowIndex)
Check existence of readonly editor and return display textList<WEditor>
getEditors()
boolean
isEditing()
org.zkoss.zk.ui.Component
newCell(org.zkoss.zul.Row row)
org.zkoss.zul.Row
newRow(org.zkoss.zul.Grid grid)
void
onEvent(org.zkoss.zk.ui.event.Event event)
void
render(org.zkoss.zul.Row row, Object[] data, int index)
void
setADWindowPanel(AbstractADWindowContent windowPanel)
protected void
setComponentStyle(org.zkoss.zk.ui.HtmlBasedComponent component, String style)
void
setCurrentRow(org.zkoss.zul.Row row)
void
setGridPanel(GridView gridPanel)
void
setPaging(org.zkoss.zul.Paging paging)
void
stopEditing(boolean updateCellLabel)
Detach all editor and optionally set the current value of the editor as cell label.
-
-
-
Field Detail
-
GRID_ROW_INDEX_ATTR
public static final String GRID_ROW_INDEX_ATTR
- See Also:
- Constant Field Values
-
-
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
-
getDisplayText
public String getDisplayText(Object value, GridField gridField, int rowIndex)
callgetDisplayText(Object, GridField, int, boolean)
with isForceGetValue = false- Parameters:
value
-gridField
-rowIndex
-- Returns:
- display text
-
setComponentStyle
protected void setComponentStyle(org.zkoss.zk.ui.HtmlBasedComponent component, String style)
-
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
-
-
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 interfaceorg.zkoss.zul.RowRendererExt
- See Also:
RowRendererExt.getControls()
-
newCell
public org.zkoss.zk.ui.Component newCell(org.zkoss.zul.Row row)
- Specified by:
newCell
in interfaceorg.zkoss.zul.RowRendererExt
- See Also:
RowRendererExt.newCell(Row)
-
newRow
public org.zkoss.zul.Row newRow(org.zkoss.zul.Grid grid)
- Specified by:
newRow
in interfaceorg.zkoss.zul.RowRendererExt
- See Also:
RowRendererExt.newRow(Grid)
-
doCatch
public void doCatch(Throwable ex) throws Throwable
- Specified by:
doCatch
in interfaceorg.zkoss.zul.RendererCtrl
- Throws:
Throwable
- See Also:
RendererCtrl.doCatch(Throwable)
-
doFinally
public void doFinally()
- Specified by:
doFinally
in interfaceorg.zkoss.zul.RendererCtrl
- See Also:
RendererCtrl.doFinally()
-
doTry
public void doTry()
- Specified by:
doTry
in interfaceorg.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
-
-
-