Adempiere 3.5.2a

org.adempiere.webui.component
Class ConfirmPanel

java.lang.Object
  extended by org.zkoss.zk.ui.AbstractComponent
      extended by org.zkoss.zk.ui.HtmlBasedComponent
          extended by org.zkoss.zul.impl.XulElement
              extended by org.zkoss.zul.Box
                  extended by org.zkoss.zul.Hbox
                      extended by org.adempiere.webui.component.ConfirmPanel
All Implemented Interfaces:
Serializable, Cloneable, Component, ComponentCtrl

public final class ConfirmPanel
extends Hbox

Application Confirm Panel Web UI port of the rich client's ConfirmPanel by Jorg Janke

Author:
Sendy Yagambrum
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.zkoss.zk.ui.HtmlBasedComponent
HtmlBasedComponent.ExtraCtrl
 
Field Summary
 
Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent
RS_NO_DISPLAY, RS_NO_HEIGHT, RS_NO_WIDTH
 
Fields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
 
Constructor Summary
ConfirmPanel()
          Create confirm panel with Ok button only
ConfirmPanel(boolean withCancel)
          Create confirm panel with Ok and Cancel button
ConfirmPanel(boolean withCancelButton, boolean withRefreshButton, boolean withResetButton, boolean withCustomizeButton, boolean withHistoryButton, boolean withZoomButton)
          create confirm panel with multiple options
 
Method Summary
 void addActionListener(String event, EventListener listener)
          add action listener on the existing buttons
 void addComponentsLeft(Button button)
          add button to the left side of the confirm panel
 void addComponentsRight(Button button)
          add button to the right side of the confirm panel
 Button createButton(String name)
          Creates a button of the specified id
 Button getButton(String id)
          return button of the specified id
 boolean isVisible(String btnName)
          returns whether the specified button is visible or not
 void setEnabled(String id, boolean enabled)
          enable specific button
 void setEnabledAll(boolean enabled)
          enable all components
 void setVisible(String id, boolean visible)
          sets the visibility of the specified button
 
Methods inherited from class org.zkoss.zul.Box
getAlign, getCaveAttrs, getChildInnerAttrs, getChildOuterAttrs, getHeights, getOrient, getOuterAttrs, getPack, getSpacing, getValign, getWidths, insertBefore, isHorizontal, isVertical, onChildRemoved, onDrawNewChild, setAlign, setHeights, setOrient, setPack, setSpacing, setValign, setWidths
 
Methods inherited from class org.zkoss.zul.impl.XulElement
getAction, getActionAttrs, getAllOnClickAttrs, getContext, getCtrlKeys, getInnerAttrs, getPopup, getTooltip, setAction, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltip
 
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
focus, getAllOnClickAttrs, getDraggable, getDroppable, getHeight, getLeft, getRealSclass, getRealStyle, getRealStyleFlags, getSclass, getStyle, getTooltiptext, getTop, getWidth, getZIndex, newExtraCtrl, setClass, setDraggable, setDroppable, setFocus, setHeight, setLeft, setSclass, setStyle, setTooltiptext, setTop, setWidth, setZIndex
 
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addAnnotation, addEventHandler, addEventListener, addForward, addForward, addForward, addForward, addMoved, addSharedAnnotationMap, addSharedEventHandlerMap, appendAsapAttr, appendAsapAttr, appendChild, applyProperties, clone, containsVariable, detach, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttributes, getAttributes, getChildren, getCommand, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getExtraCtrl, getFellow, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getMoldURI, getNamespace, getNextSibling, getPage, getParent, getPreviousSibling, getPropagatee, getRoot, getSpaceOwner, getUuid, getVariable, invalidate, isAsapRequired, isChildable, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onPageAttached, onPageDetached, onWrongValue, redraw, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, response, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setComponentDefinition, setId, setMold, setPage, setPageBefore, setParent, setVariable, setVisible, smartUpdate, smartUpdate, smartUpdate, smartUpdateDeferred, smartUpdateValues, toString, unsetVariable
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConfirmPanel

public ConfirmPanel(boolean withCancelButton,
                    boolean withRefreshButton,
                    boolean withResetButton,
                    boolean withCustomizeButton,
                    boolean withHistoryButton,
                    boolean withZoomButton)
create confirm panel with multiple options

Parameters:
withCancelButton - with cancel
withRefreshButton - with refresh
withResetButton - with reset
withCustomizeButton - with customize
withHistoryButton - with history
withZoomButton - with zoom

ConfirmPanel

public ConfirmPanel()
Create confirm panel with Ok button only


ConfirmPanel

public ConfirmPanel(boolean withCancel)
Create confirm panel with Ok and Cancel button

Parameters:
withCancel - with cancel
Method Detail

createButton

public Button createButton(String name)
Creates a button of the specified id

Parameters:
id - button id
Returns:
button

The string can be any of the following and the corresponding button will be created:

Ok
Ok button
Cancel
Cancel button
Refresh
Refresh button
Reset
Reset button
History
History button
Process
Process button
New
New button
Customize
Customize button
Delete
Delete button
Save
Save button
Zoom
Zoom button
Help
Help button

addComponentsLeft

public void addComponentsLeft(Button button)
add button to the left side of the confirm panel

Parameters:
button - button

addComponentsRight

public void addComponentsRight(Button button)
add button to the right side of the confirm panel

Parameters:
button - button

getButton

public Button getButton(String id)
return button of the specified id

Parameters:
id - button id
Returns:
button or null if no button is found

The button id can be any of the following

Ok
Ok button
Cancel
Cancel button
Refresh
Refresh button
Reset
Reset button
History
History button
Process
Process button
New
New button
Customize
Customize button
Delete
Delete button
Save
Save button
Zoom
Zoom button
Help
Help button

setVisible

public void setVisible(String id,
                       boolean visible)
sets the visibility of the specified button

Parameters:
btnName - button name
visible - visibility

The button name can be any of the following

Ok
Ok button
Cancel
Cancel button
Refresh
Refresh button
Reset
Reset button
History
History button
Process
Process button
New
New button
Customize
Customize button
Delete
Delete button
Save
Save button
Zoom
Zoom button
Help
Help button

isVisible

public boolean isVisible(String btnName)
returns whether the specified button is visible or not

Parameters:
btnName -
Returns:
visibility of the button

The button name can be any of the following

Ok
Ok button
Cancel
Cancel button
Refresh
Refresh button
Reset
Reset button
History
History button
Process
Process button
New
New button
Customize
Customize button
Delete
Delete button
Save
Save button
Zoom
Zoom button
Help
Help button

setEnabled

public void setEnabled(String id,
                       boolean enabled)
enable specific button

Parameters:
id - button id
enabled - enabled

The button id can be any of the following

Ok
Ok button
Cancel
Cancel button
Refresh
Refresh button
Reset
Reset button
History
History button
Process
Process button
New
New button
Customize
Customize button
Delete
Delete button
Save
Save button
Zoom
Zoom button
Help
Help button

setEnabledAll

public void setEnabledAll(boolean enabled)
enable all components

Parameters:
enabled - enabled

addActionListener

public void addActionListener(String event,
                              EventListener listener)
add action listener on the existing buttons

Parameters:
event - event
listener - listener

Adempiere 3.5.2a

Adempiere® is a registered trademark of ADempiere Business Inc. ©2004-2008 HumanFlash.com All rights reserved.