Adempiere 3.5.2a

org.adempiere.webui.component
Class WConfirmPanel

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.Div
                  extended by org.adempiere.webui.component.Panel
                      extended by org.adempiere.webui.component.WConfirmPanel
All Implemented Interfaces:
Serializable, Cloneable, Component, EventListener, ComponentCtrl

public class WConfirmPanel
extends Panel
implements EventListener

Author:
Andrew Kimball
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.zkoss.zk.ui.HtmlBasedComponent
HtmlBasedComponent.ExtraCtrl
 
Field Summary
static String A_CANCEL
          Action String Cancel.
static String A_CUSTOMIZE
          Action String Customize.
static String A_DELETE
          Action String Delete.
static String A_EXPORT
          Action String Export.
static String A_HELP
          Action String Help.
static String A_HISTORY
          Action String History.
static String A_NEW
          Action String New.
static String A_OK
          Action String OK.
static String A_PATTRIBUTE
          Action String PAttribute.
static String A_PRINT
          Action String Print.
static String A_PROCESS
          Action String Process.
static String A_REFRESH
          Action String Refresh.
static String A_RESET
          Action String Reset.
static String A_ZOOM
          Action String Zoom.
 
Fields inherited from class org.adempiere.webui.component.Panel
HORIZONTAL, VERTICAL
 
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
WConfirmPanel()
          Create Confirmation Panel with OK Button.
WConfirmPanel(boolean withCancelButton)
          Create Confirmation Panel with OK and Cancel Button.
WConfirmPanel(boolean withCancelButton, boolean withRefreshButton, boolean withResetButton, boolean withCustomizeButton, boolean withHistoryButton, boolean withZoomButton, boolean withText)
          Create Confirmation Panel with different buttons.
 
Method Summary
 void addEventListener(EventListener listener)
          Add Event Listener.
static WAppsAction createCancelButton(boolean withText)
          Create Cancel Button wlth Standard text.
static WAppsAction createCancelButton(String text)
          Create Cancel Button wlth label text and register ESC as KeyStroke.
static WAppsAction createCustomizeButton(boolean withText)
          Create Customize Button wlth Standard text.
static WAppsAction createCustomizeButton(String text)
          Create Customize Button wlth label text.
static WAppsAction createDeleteButton(boolean withText)
          Create Delete Button with Standard text.
static WAppsAction createDeleteButton(String text)
          Create Delete Button with label text - F3.
static WAppsAction createExportButton(boolean withText)
          Create Export Button wlth Standard text.
static WAppsAction createExportButton(String text)
          Create Export Button wlth label text.
static WAppsAction createHelpButton(boolean withText)
          Create Help Button wlth Standard text.
static WAppsAction createHelpButton(String text)
          Create Help Button wlth label text.
static WAppsAction createHistoryButton(boolean withText)
          Create History Button wlth Standard text.
static WAppsAction createHistoryButton(String text)
          Create History Button wlth label text.
static WAppsAction createNewButton(boolean withText)
          Create New Button with Standard text.
static WAppsAction createNewButton(String text)
          Create New Button with label text - F2.
static WAppsAction createOKButton(boolean withText)
          Create OK Button with Standard text.
static WAppsAction createOKButton(String text)
          Create OK Button with label text and F4 Shortcut.
static WAppsAction createPAttributeButton(boolean withText)
          Create Product Attribute Button with Standard text.
static WAppsAction createPAttributeButton(String text)
          Create Product Attribute Button with label text.
static WAppsAction createPrintButton(boolean withText)
          Create Print Button wlth Standard text.
static WAppsAction createPrintButton(String text)
          Create Print Button wlth label text.
static WAppsAction createProcessButton(boolean withText)
          Create Process Button wlth Standard text.
static WAppsAction createProcessButton(String text)
          Create Process Button wlth label text Shift-F4.
static WAppsAction createRefreshButton(boolean withText)
          Create Refresh Button wlth Standard text.
static WAppsAction createRefreshButton(String text)
          Create Refresh Button wlth label text and F5.
static WAppsAction createResetButton(boolean withText)
          Create Reset Button wlth Standard text.
static WAppsAction createResetButton(String text)
          Create Reset Button wlth label text.
static WAppsAction createZoomButton(boolean withText)
          Create Zoom Button wlth Standard text.
static WAppsAction createZoomButton(String text)
          Create Zoom Button wlth label text.
 void onEvent(Event event)
           
 void setCancelVisible(Button button, boolean value)
          Show Cancel button.
 
Methods inherited from class org.zkoss.zul.Div
getAlign, getOuterAttrs, setAlign
 
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, insertBefore, invalidate, isAsapRequired, isChildable, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onDrawNewChild, 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
 

Field Detail

A_OK

public static final String A_OK
Action String OK.

See Also:
Constant Field Values

A_CANCEL

public static final String A_CANCEL
Action String Cancel.

See Also:
Constant Field Values

A_REFRESH

public static final String A_REFRESH
Action String Refresh.

See Also:
Constant Field Values

A_RESET

public static final String A_RESET
Action String Reset.

See Also:
Constant Field Values

A_CUSTOMIZE

public static final String A_CUSTOMIZE
Action String Customize.

See Also:
Constant Field Values

A_HISTORY

public static final String A_HISTORY
Action String History.

See Also:
Constant Field Values

A_ZOOM

public static final String A_ZOOM
Action String Zoom.

See Also:
Constant Field Values

A_PROCESS

public static final String A_PROCESS
Action String Process.

See Also:
Constant Field Values

A_PRINT

public static final String A_PRINT
Action String Print.

See Also:
Constant Field Values

A_EXPORT

public static final String A_EXPORT
Action String Export.

See Also:
Constant Field Values

A_HELP

public static final String A_HELP
Action String Help.

See Also:
Constant Field Values

A_DELETE

public static final String A_DELETE
Action String Delete.

See Also:
Constant Field Values

A_PATTRIBUTE

public static final String A_PATTRIBUTE
Action String PAttribute.

See Also:
Constant Field Values

A_NEW

public static final String A_NEW
Action String New.

See Also:
Constant Field Values
Constructor Detail

WConfirmPanel

public WConfirmPanel()
Create Confirmation Panel with OK Button.


WConfirmPanel

public WConfirmPanel(boolean withCancelButton)
Create Confirmation Panel with OK and Cancel Button.

Parameters:
withCancelButton - with cancel

WConfirmPanel

public WConfirmPanel(boolean withCancelButton,
                     boolean withRefreshButton,
                     boolean withResetButton,
                     boolean withCustomizeButton,
                     boolean withHistoryButton,
                     boolean withZoomButton,
                     boolean withText)
Create Confirmation Panel with different buttons.

Parameters:
withCancelButton - with cancel
withRefreshButton - with refresh
withResetButton - with reset
withCustomizeButton - with customize
withHistoryButton - with history
withZoomButton - with zoom
withText - with tool tip text
Method Detail

createOKButton

public static final WAppsAction createOKButton(boolean withText)
                                        throws IOException
Create OK Button with Standard text.

Parameters:
withText - with text
Returns:
OK Button
Throws:
IOException

createOKButton

public static final WAppsAction createOKButton(String text)
                                        throws IOException
Create OK Button with label text and F4 Shortcut.

Parameters:
text - text
Returns:
OK Button
Throws:
IOException

createCancelButton

public static final WAppsAction createCancelButton(String text)
                                            throws IOException
Create Cancel Button wlth label text and register ESC as KeyStroke.

Parameters:
text - text
Returns:
Cancel Button
Throws:
IOException

createCancelButton

public static final WAppsAction createCancelButton(boolean withText)
                                            throws IOException
Create Cancel Button wlth Standard text.

Parameters:
withText - with text
Returns:
Button
Throws:
IOException

createRefreshButton

public static final WAppsAction createRefreshButton(String text)
                                             throws IOException
Create Refresh Button wlth label text and F5.

Parameters:
text - text
Returns:
button
Throws:
IOException

createRefreshButton

public static final WAppsAction createRefreshButton(boolean withText)
                                             throws IOException
Create Refresh Button wlth Standard text.

Parameters:
withText - with text
Returns:
Button
Throws:
IOException

createResetButton

public static final WAppsAction createResetButton(String text)
                                           throws IOException
Create Reset Button wlth label text.

Parameters:
text - text
Returns:
button
Throws:
IOException

createResetButton

public static final WAppsAction createResetButton(boolean withText)
                                           throws IOException
Create Reset Button wlth Standard text.

Parameters:
withText - with text
Returns:
Button
Throws:
IOException

createCustomizeButton

public static final WAppsAction createCustomizeButton(String text)
                                               throws IOException
Create Customize Button wlth label text.

Parameters:
text - text
Returns:
button
Throws:
IOException

createCustomizeButton

public static final WAppsAction createCustomizeButton(boolean withText)
                                               throws IOException
Create Customize Button wlth Standard text.

Parameters:
withText - with text
Returns:
aa
Throws:
IOException

createHistoryButton

public static final WAppsAction createHistoryButton(String text)
                                             throws IOException
Create History Button wlth label text.

Parameters:
text - text
Returns:
aa
Throws:
IOException

createHistoryButton

public static final WAppsAction createHistoryButton(boolean withText)
                                             throws IOException
Create History Button wlth Standard text.

Parameters:
withText - with text
Returns:
aa
Throws:
IOException

createZoomButton

public static final WAppsAction createZoomButton(String text)
                                          throws IOException
Create Zoom Button wlth label text.

Parameters:
text - text
Returns:
aa
Throws:
IOException

createZoomButton

public static final WAppsAction createZoomButton(boolean withText)
                                          throws IOException
Create Zoom Button wlth Standard text.

Parameters:
withText - with text
Returns:
aa
Throws:
IOException

createProcessButton

public static final WAppsAction createProcessButton(String text)
                                             throws IOException
Create Process Button wlth label text Shift-F4.

Parameters:
text - text
Returns:
aa
Throws:
IOException

createProcessButton

public static final WAppsAction createProcessButton(boolean withText)
                                             throws IOException
Create Process Button wlth Standard text.

Parameters:
withText - with text
Returns:
aa
Throws:
IOException

createPrintButton

public static final WAppsAction createPrintButton(String text)
                                           throws IOException
Create Print Button wlth label text.

Parameters:
text - text
Returns:
aa
Throws:
IOException

createPrintButton

public static final WAppsAction createPrintButton(boolean withText)
                                           throws IOException
Create Print Button wlth Standard text.

Parameters:
withText - with text
Returns:
aa
Throws:
IOException

createHelpButton

public static final WAppsAction createHelpButton(String text)
                                          throws IOException
Create Help Button wlth label text.

Parameters:
text - text
Returns:
aa
Throws:
IOException

createHelpButton

public static final WAppsAction createHelpButton(boolean withText)
                                          throws IOException
Create Help Button wlth Standard text.

Parameters:
withText - with text
Returns:
aa
Throws:
IOException

createExportButton

public static final WAppsAction createExportButton(String text)
                                            throws IOException
Create Export Button wlth label text.

Parameters:
text - text
Returns:
aa
Throws:
IOException

createExportButton

public static final WAppsAction createExportButton(boolean withText)
                                            throws IOException
Create Export Button wlth Standard text.

Parameters:
withText - with text
Returns:
aa
Throws:
IOException

createDeleteButton

public static final WAppsAction createDeleteButton(String text)
                                            throws IOException
Create Delete Button with label text - F3.

Parameters:
text - text
Returns:
Delete Button
Throws:
IOException

createDeleteButton

public static final WAppsAction createDeleteButton(boolean withText)
                                            throws IOException
Create Delete Button with Standard text.

Parameters:
withText - with text
Returns:
Delete Button
Throws:
IOException

createPAttributeButton

public static final WAppsAction createPAttributeButton(boolean withText)
                                                throws IOException
Create Product Attribute Button with Standard text.

Parameters:
withText - with text
Returns:
Product Attribute Button
Throws:
IOException

createPAttributeButton

public static final WAppsAction createPAttributeButton(String text)
                                                throws IOException
Create Product Attribute Button with label text.

Parameters:
text - text
Returns:
Product Attribute Button
Throws:
IOException

createNewButton

public static final WAppsAction createNewButton(boolean withText)
                                         throws IOException
Create New Button with Standard text.

Parameters:
withText - with text
Returns:
New Button
Throws:
IOException

createNewButton

public static final WAppsAction createNewButton(String text)
                                         throws IOException
Create New Button with label text - F2.

Parameters:
text - text
Returns:
Product Attribute Button
Throws:
IOException

setCancelVisible

public void setCancelVisible(Button button,
                             boolean value)
Show Cancel button.

Parameters:
value - trie for visible

addEventListener

public void addEventListener(EventListener listener)
Add Event Listener. if (e.getActionCommand().equals(ConfirmPanel.A_OK)) In order to respond to keystrokes, the EventListener should be a Window. If the listener is not a window the panel will only respond to onClick events.

Parameters:
listener - the event listener

onEvent

public void onEvent(Event event)
             throws Exception
Specified by:
onEvent in interface EventListener
Throws:
Exception

Adempiere 3.5.2a

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