Package org.adempiere.webui.adwindow
Class GridView
- java.lang.Object
-
- org.zkoss.zk.ui.AbstractComponent
-
- org.zkoss.zk.ui.HtmlBasedComponent
-
- org.zkoss.zul.Layout
-
- org.zkoss.zul.Vlayout
-
- org.adempiere.webui.adwindow.GridView
-
- All Implemented Interfaces:
Serializable
,Cloneable
,EventListener
,IFieldEditorContainer
,StateChangeListener
,org.zkoss.zk.ui.Component
,org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
,org.zkoss.zk.ui.ext.Scope
,org.zkoss.zk.ui.IdSpace
,org.zkoss.zk.ui.sys.ComponentCtrl
public class GridView extends org.zkoss.zul.Vlayout implements org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>, org.zkoss.zk.ui.IdSpace, IFieldEditorContainer, StateChangeListener
Grid view implemented using the Grid component.- Author:
- Low Heng Sin
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
COLUMN_WIDTH_ORIGINAL
protected Checkbox
selectAll
static String
ZERO_PX_WIDTH
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activate(GridTab gridTab)
call when tab is activatedprotected void
autoHideEmptyColumns()
auto hide empty columnsvoid
clear()
protected void
createListbox()
void
deactivate()
deactivate panelvoid
dynamicDisplay(int col)
Validate display properties of fields of current rowprotected void
echoOnPostSelectedRowChanged()
void
editorTraverse(Callback<WEditor> editorTaverseCallback)
helper method to loop thru editor collection of panel
can use on callout to check relative editorvoid
focus()
void
focusToFirstEditor()
focus to first field editorvoid
focusToNextEditor(WEditor ref)
focus to next field editor from refGridField[]
getFields()
list field display in grid mode, in case user customize grid this list container only customize list.Grid
getListbox()
void
init(GridTab gridTab)
void
invalidateGridView()
redraw grid viewboolean
isDetailPaneMode()
boolean
isInit()
boolean
isRefreshing()
boolean
isShowCurrentRowIndicatorColumn()
protected void
onADTabPanelParentChanged()
void
onEditCurrentRow()
void
onEditCurrentRow(org.zkoss.zk.ui.event.Event event)
boolean
onEnterKey()
Handle enter key eventvoid
onEvent(org.zkoss.zk.ui.event.Event event)
void
onPostSelectedRowChanged()
Event after the current selected row changevoid
refresh(GridTab gridTab)
refresh after switching from form viewvoid
reInit()
void
scrollToCurrentRow()
scroll grid to the current focus rowvoid
setADWindowPanel(AbstractADWindowContent winPanel)
void
setDetailPaneMode(boolean detailPaneMode, GridTab gridTab)
void
setFocusToField(String columnName)
void
setPageSize(int pageSize)
set paging sizevoid
setWindowNo(int windowNo)
void
stateChange(StateChangeEvent event)
void
updateListIndex()
Update current row from model-
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
addSclass, clone, evalCSSFlex, getAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getPropertyAccess, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZindex, getZIndex, removeSclass, removeSclass, service, setAction, setClass, setDraggable, setDroppable, setFocus, setHeight, setHeight0, setHeightDirectly, setHflex, setHflex0, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex, setVflex0, setVflexDirectly, setWidth, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectly
-
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, enableBindingAnnotation, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getCallback, getChildren, getClientAttribute, getClientDataAttribute, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, insertBefore, invalidate, invalidatePartial, isChildable, isInitialized, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, replace, response, response, response, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisible, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerialize
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.zkoss.zk.ui.IdSpace
getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, hasFellow, hasFellow
-
Methods inherited from interface org.adempiere.webui.adwindow.IFieldEditorContainer
editorTraverse
-
-
-
-
Field Detail
-
ZERO_PX_WIDTH
public static final String ZERO_PX_WIDTH
- See Also:
- Constant Field Values
-
COLUMN_WIDTH_ORIGINAL
public static final String COLUMN_WIDTH_ORIGINAL
- See Also:
- Constant Field Values
-
selectAll
protected Checkbox selectAll
-
-
Method Detail
-
createListbox
protected void createListbox()
-
setDetailPaneMode
public void setDetailPaneMode(boolean detailPaneMode, GridTab gridTab)
-
isDetailPaneMode
public boolean isDetailPaneMode()
-
init
public void init(GridTab gridTab)
- Parameters:
gridTab
-
-
isInit
public boolean isInit()
- Returns:
- boolean
-
activate
public void activate(GridTab gridTab)
call when tab is activated- Parameters:
gridTab
-
-
refresh
public void refresh(GridTab gridTab)
refresh after switching from form view- Parameters:
gridTab
-
-
isRefreshing
public boolean isRefreshing()
-
updateListIndex
public void updateListIndex()
Update current row from model
-
echoOnPostSelectedRowChanged
protected void echoOnPostSelectedRowChanged()
-
setPageSize
public void setPageSize(int pageSize)
set paging size- Parameters:
pageSize
-
-
clear
public void clear()
-
autoHideEmptyColumns
protected void autoHideEmptyColumns()
auto hide empty columns
-
deactivate
public void deactivate()
deactivate panel
-
onEvent
public void onEvent(org.zkoss.zk.ui.event.Event event) throws Exception
- Specified by:
onEvent
in interfaceorg.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
- Throws:
Exception
-
onPostSelectedRowChanged
public void onPostSelectedRowChanged()
Event after the current selected row change
-
scrollToCurrentRow
public void scrollToCurrentRow()
scroll grid to the current focus row
-
getListbox
public Grid getListbox()
- Returns:
- Grid
-
dynamicDisplay
public void dynamicDisplay(int col)
Validate display properties of fields of current row- Parameters:
col
-
-
setWindowNo
public void setWindowNo(int windowNo)
- Parameters:
windowNo
-
-
focus
public void focus()
- Overrides:
focus
in classorg.zkoss.zk.ui.HtmlBasedComponent
-
onEnterKey
public boolean onEnterKey()
Handle enter key event
-
setFocusToField
public void setFocusToField(String columnName)
- Parameters:
columnName
-
-
setADWindowPanel
public void setADWindowPanel(AbstractADWindowContent winPanel)
- Parameters:
winPanel
-
-
reInit
public void reInit()
-
invalidateGridView
public void invalidateGridView()
redraw grid view
-
getFields
public GridField[] getFields()
list field display in grid mode, in case user customize grid this list container only customize list.
-
onEditCurrentRow
public void onEditCurrentRow()
-
onEditCurrentRow
public void onEditCurrentRow(org.zkoss.zk.ui.event.Event event)
-
focusToFirstEditor
public void focusToFirstEditor()
Description copied from interface:IFieldEditorContainer
focus to first field editor- Specified by:
focusToFirstEditor
in interfaceIFieldEditorContainer
-
focusToNextEditor
public void focusToNextEditor(WEditor ref)
Description copied from interface:IFieldEditorContainer
focus to next field editor from ref- Specified by:
focusToNextEditor
in interfaceIFieldEditorContainer
-
stateChange
public void stateChange(StateChangeEvent event)
- Specified by:
stateChange
in interfaceStateChangeListener
-
onADTabPanelParentChanged
protected void onADTabPanelParentChanged()
-
editorTraverse
public void editorTraverse(Callback<WEditor> editorTaverseCallback)
Description copied from interface:IFieldEditorContainer
helper method to loop thru editor collection of panel
can use on callout to check relative editor- Specified by:
editorTraverse
in interfaceIFieldEditorContainer
-
isShowCurrentRowIndicatorColumn
public boolean isShowCurrentRowIndicatorColumn()
-
-