Package org.adempiere.webui.adwindow
Class DetailPane
- java.lang.Object
-
- org.zkoss.zk.ui.AbstractComponent
-
- org.zkoss.zk.ui.HtmlBasedComponent
-
- org.zkoss.zul.impl.XulElement
-
- org.zkoss.zul.Div
-
- org.adempiere.webui.component.Panel
-
- org.adempiere.webui.adwindow.DetailPane
-
- All Implemented Interfaces:
Serializable
,Cloneable
,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 DetailPane extends Panel implements org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>, org.zkoss.zk.ui.IdSpace
- Author:
- hengsin
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DetailPane.Tabpanel
tabpanel for adtabpanel
-
Field Summary
Fields Modifier and Type Field Description static String
BTN_CUSTOMIZE_ID
static String
BTN_DELETE_ID
static String
BTN_EDIT_ID
static String
BTN_NEW_ID
static String
BTN_PROCESS_ID
static String
BTN_QUICK_FORM_ID
static String
BTN_SAVE_ID
static String
ON_ACTIVATE_DETAIL_EVENT
static String
ON_DELETE_EVENT
static String
ON_EDIT_EVENT
static String
ON_NEW_EVENT
static String
ON_QUICK_FORM_EVENT
static String
ON_RECORD_NAVIGATE_EVENT
static String
ON_SAVE_EVENT
-
Fields inherited from class org.adempiere.webui.component.Panel
HORIZONTAL, VERTICAL
-
-
Constructor Summary
Constructors Constructor Description DetailPane()
default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addADTabpanel(IADTabpanel tabPanel, ADTabListModel.ADTabLabel tabLabel)
void
addADTabpanel(IADTabpanel tabPanel, ADTabListModel.ADTabLabel tabLabel, boolean enabled)
protected void
createPopupContent(String status)
void
disableToolbar()
disable toolbarvoid
fireActivateDetailEvent()
fire the on activate detail eventIADTabpanel
getADTabpanel(int index)
IADTabpanel
getSelectedADTabpanel()
int
getSelectedIndex()
DetailPane.Tabpanel
getSelectedPanel()
int
getTabcount()
boolean
isTabEnabled(int tabIndex)
boolean
isTabVisible(int tabIndex)
protected void
onCustomize(org.zkoss.zk.ui.event.Event e)
open customize grid dialogvoid
onEdit(boolean formView)
Edit current recordvoid
onEvent(org.zkoss.zk.ui.event.Event event)
void
onNew()
add new recordvoid
onPageAttached(org.zkoss.zk.ui.Page newpage, org.zkoss.zk.ui.Page oldpage)
void
onPageDetached(org.zkoss.zk.ui.Page page)
protected void
onProcess(org.zkoss.zk.ui.Component button)
open process dropdownprotected void
onToggle(org.zkoss.zk.ui.event.Event e)
toggle between grid and form viewvoid
refresh()
redraw tabboxvoid
reset()
remove all tabs and tabpanelsvoid
setADTabpanel(int index, IADTabpanel tabPanel, ADTabListModel.ADTabLabel tabLabel)
replace of addvoid
setADTabpanel(int index, IADTabpanel tabPanel, ADTabListModel.ADTabLabel tabLabel, boolean enabled)
replace or addvoid
setEventListener(org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event> listener)
void
setSelectedIndex(int curTabIndex)
set selected tab indexvoid
setStatusMessage(String status, boolean error)
void
setTabEnabled(int tabIndex, boolean enabled)
void
setTabVisibility(int tabIndex, boolean visible)
void
setVflex(String flex)
void
undoLastTabSelection()
undo last tab selectionvoid
updateToolbar(boolean changed, boolean readOnly)
update toolbar button state-
Methods inherited from class org.zkoss.zul.impl.XulElement
clone, getContext, getCtrlKeys, getPopup, getPropertyAccess, getTooltip, setContext, setContext, setContextAttributes, setCtrlKeys, setPopup, setPopup, setPopupAttributes, setTooltip, setTooltip, setTooltipAttributes
-
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
addSclass, evalCSSFlex, focus, getAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZclass, 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, 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, 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
-
-
-
-
Field Detail
-
BTN_PROCESS_ID
public static final String BTN_PROCESS_ID
- See Also:
- Constant Field Values
-
BTN_DELETE_ID
public static final String BTN_DELETE_ID
- See Also:
- Constant Field Values
-
BTN_EDIT_ID
public static final String BTN_EDIT_ID
- See Also:
- Constant Field Values
-
BTN_NEW_ID
public static final String BTN_NEW_ID
- See Also:
- Constant Field Values
-
BTN_SAVE_ID
public static final String BTN_SAVE_ID
- See Also:
- Constant Field Values
-
BTN_QUICK_FORM_ID
public static final String BTN_QUICK_FORM_ID
- See Also:
- Constant Field Values
-
BTN_CUSTOMIZE_ID
public static final String BTN_CUSTOMIZE_ID
- See Also:
- Constant Field Values
-
ON_ACTIVATE_DETAIL_EVENT
public static final String ON_ACTIVATE_DETAIL_EVENT
- See Also:
- Constant Field Values
-
ON_DELETE_EVENT
public static final String ON_DELETE_EVENT
- See Also:
- Constant Field Values
-
ON_NEW_EVENT
public static final String ON_NEW_EVENT
- See Also:
- Constant Field Values
-
ON_EDIT_EVENT
public static final String ON_EDIT_EVENT
- See Also:
- Constant Field Values
-
ON_SAVE_EVENT
public static final String ON_SAVE_EVENT
- See Also:
- Constant Field Values
-
ON_QUICK_FORM_EVENT
public static final String ON_QUICK_FORM_EVENT
- See Also:
- Constant Field Values
-
ON_RECORD_NAVIGATE_EVENT
public static final String ON_RECORD_NAVIGATE_EVENT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getSelectedIndex
public int getSelectedIndex()
- Returns:
- selected tab index
-
setSelectedIndex
public void setSelectedIndex(int curTabIndex)
set selected tab index- Parameters:
curTabIndex
-
-
getTabcount
public int getTabcount()
- Returns:
- number of tabs
-
undoLastTabSelection
public void undoLastTabSelection()
undo last tab selection
-
refresh
public void refresh()
redraw tabbox
-
setADTabpanel
public void setADTabpanel(int index, IADTabpanel tabPanel, ADTabListModel.ADTabLabel tabLabel)
replace of add- Parameters:
index
-tabPanel
-tabLabel
-
-
setADTabpanel
public void setADTabpanel(int index, IADTabpanel tabPanel, ADTabListModel.ADTabLabel tabLabel, boolean enabled)
replace or add- Parameters:
index
-tabPanel
-tabLabel
-enabled
-
-
addADTabpanel
public void addADTabpanel(IADTabpanel tabPanel, ADTabListModel.ADTabLabel tabLabel)
- Parameters:
tabPanel
-tabLabel
-
-
addADTabpanel
public void addADTabpanel(IADTabpanel tabPanel, ADTabListModel.ADTabLabel tabLabel, boolean enabled)
- Parameters:
tabPanel
-tabLabel
-enabled
-
-
onToggle
protected void onToggle(org.zkoss.zk.ui.event.Event e)
toggle between grid and form view- Parameters:
e
-
-
onCustomize
protected void onCustomize(org.zkoss.zk.ui.event.Event e)
open customize grid dialog- Parameters:
e
-
-
onProcess
protected void onProcess(org.zkoss.zk.ui.Component button)
open process dropdown- Parameters:
button
-
-
setEventListener
public void setEventListener(org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event> listener)
- Parameters:
listener
-
-
reset
public void reset()
remove all tabs and tabpanels
-
getADTabpanel
public IADTabpanel getADTabpanel(int index)
- Parameters:
index
-- Returns:
- adtabpanel at index
-
getSelectedADTabpanel
public IADTabpanel getSelectedADTabpanel()
- Returns:
- selected adtabpanel
-
getSelectedPanel
public DetailPane.Tabpanel getSelectedPanel()
- Returns:
DetailPane.Tabpanel
-
setStatusMessage
public void setStatusMessage(String status, boolean error)
- Parameters:
status
-error
-
-
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
-
createPopupContent
protected void createPopupContent(String status)
-
onPageDetached
public void onPageDetached(org.zkoss.zk.ui.Page page)
- Specified by:
onPageDetached
in interfaceorg.zkoss.zk.ui.sys.ComponentCtrl
- Overrides:
onPageDetached
in classorg.zkoss.zk.ui.AbstractComponent
-
onPageAttached
public void onPageAttached(org.zkoss.zk.ui.Page newpage, org.zkoss.zk.ui.Page oldpage)
- Specified by:
onPageAttached
in interfaceorg.zkoss.zk.ui.sys.ComponentCtrl
- Overrides:
onPageAttached
in classorg.zkoss.zk.ui.AbstractComponent
-
setVflex
public void setVflex(String flex)
- Overrides:
setVflex
in classorg.zkoss.zk.ui.HtmlBasedComponent
-
updateToolbar
public void updateToolbar(boolean changed, boolean readOnly)
update toolbar button state- Parameters:
changed
-readOnly
-
-
onEdit
public void onEdit(boolean formView) throws Exception
Edit current record- Parameters:
formView
-- Throws:
Exception
-
fireActivateDetailEvent
public void fireActivateDetailEvent()
fire the on activate detail event
-
setTabVisibility
public void setTabVisibility(int tabIndex, boolean visible)
- Parameters:
tabIndex
-visible
-
-
isTabVisible
public boolean isTabVisible(int tabIndex)
- Parameters:
tabIndex
-- Returns:
- true if tab at tabIndex is visible
-
isTabEnabled
public boolean isTabEnabled(int tabIndex)
- Parameters:
tabIndex
-- Returns:
- true if tab at tabIndex is enable
-
setTabEnabled
public void setTabEnabled(int tabIndex, boolean enabled)
- Parameters:
tabIndex
-enabled
-
-
disableToolbar
public void disableToolbar()
disable toolbar
-
-