Package org.adempiere.webui.adwindow
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 Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
int
static final String
Editor component attribute to store row index (absolute)static final String
Component boolean attribute to indicate this component is own by QuickGridViewFields inherited from interface org.zkoss.zul.RowRendererExt
DETACH_ON_RENDER
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addRemovePropertyChangeListener
(boolean isAddListener, int col) If isAddListener is true add Property Change Listener, otherwise Remove Property Change Listenervoid
Clear editorsListmap on page change and dispose.void
void
void
doTry()
void
Enter edit mode for current focus row.int
getColumnIndex
(GridField field) int
org.zkoss.zul.Cell
org.zkoss.zul.Row
int
isAddRemoveListener
(int code) 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.boolean
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 data for row.void
setADWindowPanel
(AbstractADWindowContent windowPanel) Set AD window content part that own this renderer.void
setCurrentCell
(int row, int col, int code) Set current cellvoid
setCurrentCell
(org.zkoss.zul.Cell currentCell) Set current cellvoid
setCurrentRow
(org.zkoss.zul.Row row) Set current focus rowvoid
Set focus tocurrentCell
void
setGridPanel
(QuickGridView gridPanel) SetQuickGridView
that own this renderer.void
setPaging
(org.zkoss.zul.Paging paging) void
setRowTo
(int row) Set current row
-
Field Details
-
IS_QUICK_FORM_COMPONENT
Component boolean attribute to indicate this component is own by QuickGridView- See Also:
-
GRID_ROW_INDEX_ATTR
Editor component attribute to store row index (absolute)- See Also:
-
CURRENT_ROW_STYLE
- See Also:
-
CSS_READ_ONLY_COMPONENT
- See Also:
-
currentRowIndex
public int currentRowIndex -
editorsListMap
-
readOnlyEditorsListMap
-
-
Constructor Details
-
QuickGridTabRowRenderer
- Parameters:
gridTab
-windowNo
-
-
-
Method Details
-
getColumnIndex
- Parameters:
field
-- Returns:
- column index for field, -1 if not found
-
setPaging
public void setPaging(org.zkoss.zul.Paging paging) - Parameters:
paging
-
-
render
Render data for row. -
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
- 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 tocurrentCell
-
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 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
- 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()
-
setGridPanel
SetQuickGridView
that own this renderer.- Parameters:
gridPanel
-
-
isEditing
public boolean isEditing()- Returns:
- true if current row is in edit mode, false otherwise
-
setADWindowPanel
Set AD window content part that own this renderer.buttonListener
need this to callAbstractADWindowContent.actionPerformed(ActionEvent)
.- Parameters:
windowPanel
-
-
onEvent
- Specified by:
onEvent
in interfaceorg.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
- Throws:
Exception
-
clearMaps
public void clearMaps()Clear editorsListmap on page change and dispose.
-