com.sap.ui.commons.client
Class DialogWidget

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.sap.ui.core.client.ControlWidget
              extended by com.sap.ui.commons.client.DialogWidget
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.IsWidget

public class DialogWidget
extends com.sap.ui.core.client.ControlWidget

The class Dialog is the GWT wrapper for the Phoenix control: sap.ui.commons.Dialog.

An interactive window appearing on request displaying information to the user. The API supports features such as popups with fixed sizes, popups with unlimited width, scrolling bars for large windows, and control nesting (for example, a drop-down list can be included in the window).

Version:
0.18.0-SNAPSHOT
Author:
GENERATOR (JavaScript control: SAP AG)

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
  DialogWidget()
          constructs the class DialogWidget
protected DialogWidget(Dialog control)
          constructs the class DialogWidget
  DialogWidget(String id)
          constructs the class DialogWidget
 
Method Summary
 void addButton(com.sap.ui.core.client.Control button)
          Appends some button to the buttons-aggregation.
 void addContent(com.sap.ui.core.client.Control content)
          Appends some content to the content-aggregation.
 void attachClosedEvent(com.sap.ui.core.client.event.EventListener listener)
          attach an EventListener Event is fired when the user closes the dialog window.
 void close()
          Closes the dialog control instance.
 void destroyButtons()
          Destroys all the buttons in the Buttons-aggregation.
 void destroyContent()
          Destroys all the content in the Content-aggregation.
 void detachClosedEvent(com.sap.ui.core.client.event.EventListener listener)
          detach an EventListener Event is fired when the user closes the dialog window.
 com.sap.ui.core.client.AccessibleRole getAccessibleRole()
          Getter for property accessibleRole The ARIA role for the control.
 com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.Control> getButtons()
          Getter for aggregation buttons Aggregating the buttons to display at the bottom of the dialog, for example OK and Cancel.
 com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.Control> getContent()
          Getter for aggregation content Aggregating the content of the dialog (one or more controls).
 BorderDesign getContentBorderDesign()
          Getter for property contentBorderDesign Border design is theme-dependent.
 Dialog getControl()
          returns the reference to the Phoenix Control
 String getDefaultButton()
          Defines one of the buttons that have been provided via button aggregation to be the default button.
 String getHeight()
          Getter for property height Outer height of dialog window.
 String getInitialFocus()
          Defines the control that shall get the focus when the dialog is opened.
 String getMaxHeight()
          Getter for property maxHeight Maximum outer height of the dialog window.
 String getMaxWidth()
          Getter for property maxWidth Maximum outer width of the dialog window.
 String getMinHeight()
          Getter for property minHeight Minimum outer height of the dialog window.
 String getMinWidth()
          Getter for property minWidth Minimum outer width of the dialog window.
 int getScrollLeft()
          Getter for property scrollLeft Scroll position from left to right. "0" means leftmost position.
 int getScrollTop()
          Getter for property scrollTop Scroll position from top to buttom. "0" means topmost position.
 String getTitle()
          Getter for property title Dialog title displayed in the header.
 String getWidth()
          Getter for property width Outer width of dialog window.
 int indexOfButton(com.sap.ui.core.client.Control button)
          Checks for the provided com.sap.ui.core.client.Control in the buttons-aggregation and returns its index if found or -1 otherwise.
 int indexOfContent(com.sap.ui.core.client.Control content)
          Checks for the provided com.sap.ui.core.client.Control in the content-aggregation and returns its index if found or -1 otherwise.
 void insertButton(com.sap.ui.core.client.Control button, int index)
          Inserts some button into the aggregation named buttons.
 void insertContent(com.sap.ui.core.client.Control content, int index)
          Inserts some content into the aggregation named content.
 boolean isApplyContentPadding()
          Getter for property applyContentPadding Padding is theme-dependent.
 boolean isModal()
          Getter for property modal Specify whether the dialog should be modal, or not.
 boolean isOpen()
          Returns a value for the current status of the dialog control instance.
 boolean isResizable()
          Getter for property resizable Specifies whether the dialog window can be resized by the user.
 boolean isShowCloseButton()
          Getter for property showCloseButton Displays a close button in the title bar.
 void open()
          Opens the dialog control instance.
 void removeAllButtons()
          Removes all the items in the buttons-aggregation.
 void removeAllContent()
          Removes all the items in the content-aggregation.
 void removeButton(int index)
          Removes the button at position index in the buttons-aggregation named.
 void removeContent(int index)
          Removes the content at position index in the content-aggregation named.
 void setAccessibleRole(com.sap.ui.core.client.AccessibleRole value)
          Setter for property accessibleRole
Default value is: Dialog
 void setApplyContentPadding(boolean value)
          Setter for property applyContentPadding
Default value is: true
 void setContentBorderDesign(BorderDesign value)
          Setter for property contentBorderDesign
Default value is: None
 void setDefaultButton(Button defaultButton)
          Defines one of the buttons that have been provided via button aggregation to be the default button.
 void setDefaultButton(String defaultButton)
          Defines one of the buttons that have been provided via button aggregation to be the default button.
 void setHeight(String value)
          Setter for property height
 void setInitialFocus(com.sap.ui.core.client.Control initialFocus)
          Defines the control that shall get the focus when the dialog is opened.
 void setInitialFocus(String initialFocus)
          Defines the control that shall get the focus when the dialog is opened.
 void setMaxHeight(String value)
          Setter for property maxHeight
 void setMaxWidth(String value)
          Setter for property maxWidth
 void setMinHeight(String value)
          Setter for property minHeight
 void setMinWidth(String value)
          Setter for property minWidth
 void setModal(boolean value)
          Setter for property modal
Default value is: false
 void setResizable(boolean value)
          Setter for property resizable
Default value is: true
 void setScrollLeft(int value)
          Setter for property scrollLeft
Default value is: 0
 void setScrollTop(int value)
          Setter for property scrollTop
Default value is: 0
 void setShowCloseButton(boolean value)
          Setter for property showCloseButton
Default value is: true
 void setTitle(String value)
          Setter for property title
Default value is: ''
 void setWidth(String value)
          Setter for property width
 
Methods inherited from class com.sap.ui.core.client.ControlWidget
destroy, doAttachChildren, doDetachChildren, isDesignTime, wrap
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, setVisible, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DialogWidget

public DialogWidget()
constructs the class DialogWidget


DialogWidget

public DialogWidget(String id)
constructs the class DialogWidget

Parameters:
id - id of the DialogWidget

DialogWidget

protected DialogWidget(Dialog control)
constructs the class DialogWidget

Parameters:
control - reference to an existing Dialog
Method Detail

getControl

public Dialog getControl()
returns the reference to the Phoenix Control

Overrides:
getControl in class com.sap.ui.core.client.ControlWidget
Returns:
reference to the Phoenix Control

getWidth

public String getWidth()
Getter for property width Outer width of dialog window. When not set and not constrained by one of the width parameters (minWidth/maxWidth), the window size is automatically adapted to the content.

Returns:
the value of property width

setWidth

public void setWidth(String value)
Setter for property width

Overrides:
setWidth in class com.google.gwt.user.client.ui.UIObject
Parameters:
value - String

getHeight

public String getHeight()
Getter for property height Outer height of dialog window. When not set and not constrained by one of the height parameters (minHeight/maxHeight), the window size is automatically adapted to the content.

Returns:
the value of property height

setHeight

public void setHeight(String value)
Setter for property height

Overrides:
setHeight in class com.google.gwt.user.client.ui.UIObject
Parameters:
value - String

getScrollLeft

public int getScrollLeft()
Getter for property scrollLeft Scroll position from left to right. "0" means leftmost position.

Returns:
the value of property scrollLeft

setScrollLeft

public void setScrollLeft(int value)
Setter for property scrollLeft
Default value is: 0

Parameters:
value - int

getScrollTop

public int getScrollTop()
Getter for property scrollTop Scroll position from top to buttom. "0" means topmost position.

Returns:
the value of property scrollTop

setScrollTop

public void setScrollTop(int value)
Setter for property scrollTop
Default value is: 0

Parameters:
value - int

getTitle

public String getTitle()
Getter for property title Dialog title displayed in the header.

Overrides:
getTitle in class com.google.gwt.user.client.ui.UIObject
Returns:
the value of property title

setTitle

public void setTitle(String value)
Setter for property title
Default value is: ''

Overrides:
setTitle in class com.google.gwt.user.client.ui.UIObject
Parameters:
value - String

isApplyContentPadding

public boolean isApplyContentPadding()
Getter for property applyContentPadding Padding is theme-dependent. When set to "false", the content extends to the dialog borders.

Returns:
the value of property applyContentPadding

setApplyContentPadding

public void setApplyContentPadding(boolean value)
Setter for property applyContentPadding
Default value is: true

Parameters:
value - boolean

isShowCloseButton

public boolean isShowCloseButton()
Getter for property showCloseButton Displays a close button in the title bar.

Returns:
the value of property showCloseButton

setShowCloseButton

public void setShowCloseButton(boolean value)
Setter for property showCloseButton
Default value is: true

Parameters:
value - boolean

isResizable

public boolean isResizable()
Getter for property resizable Specifies whether the dialog window can be resized by the user. The dialog frame contains the visual symbol.

Returns:
the value of property resizable

setResizable

public void setResizable(boolean value)
Setter for property resizable
Default value is: true

Parameters:
value - boolean

getMinWidth

public String getMinWidth()
Getter for property minWidth Minimum outer width of the dialog window. When set, neither the user nor some layout settings can make the window smaller.

Returns:
the value of property minWidth

setMinWidth

public void setMinWidth(String value)
Setter for property minWidth

Parameters:
value - String

getMinHeight

public String getMinHeight()
Getter for property minHeight Minimum outer height of the dialog window. When set, neither the user nor some layout settings can make the window smaller.

Returns:
the value of property minHeight

setMinHeight

public void setMinHeight(String value)
Setter for property minHeight

Parameters:
value - String

getMaxWidth

public String getMaxWidth()
Getter for property maxWidth Maximum outer width of the dialog window. If set, neither the user nor some layout settings can make the window larger.

Returns:
the value of property maxWidth

setMaxWidth

public void setMaxWidth(String value)
Setter for property maxWidth

Parameters:
value - String

getMaxHeight

public String getMaxHeight()
Getter for property maxHeight Maximum outer height of the dialog window. If set, neither the user nor some layout settings can make the window larger.

Returns:
the value of property maxHeight

setMaxHeight

public void setMaxHeight(String value)
Setter for property maxHeight

Parameters:
value - String

getContentBorderDesign

public BorderDesign getContentBorderDesign()
Getter for property contentBorderDesign Border design is theme-dependent.

Returns:
the value of property contentBorderDesign

setContentBorderDesign

public void setContentBorderDesign(BorderDesign value)
Setter for property contentBorderDesign
Default value is: None

Parameters:
value - com.sap.ui.commons.client.enums.BorderDesign

isModal

public boolean isModal()
Getter for property modal Specify whether the dialog should be modal, or not. In case of true the focus is kept inside the dialog.

Returns:
the value of property modal

setModal

public void setModal(boolean value)
Setter for property modal
Default value is: false

Parameters:
value - boolean

getAccessibleRole

public com.sap.ui.core.client.AccessibleRole getAccessibleRole()
Getter for property accessibleRole The ARIA role for the control. E.g. for alert-style Dialogs this can be set to "AlertDialog".

Returns:
the value of property accessibleRole

setAccessibleRole

public void setAccessibleRole(com.sap.ui.core.client.AccessibleRole value)
Setter for property accessibleRole
Default value is: Dialog

Parameters:
value - com.sap.ui.core.client.AccessibleRole

getButtons

public com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.Control> getButtons()
Getter for aggregation buttons Aggregating the buttons to display at the bottom of the dialog, for example OK and Cancel. Association defaultButton can be used for one of the defined buttons.

Returns:
com.sap.ui.core.client.Control[]

insertButton

public void insertButton(com.sap.ui.core.client.Control button,
                         int index)
Inserts some button into the aggregation named buttons.

Parameters:
button - the button to insert
index - int the 0-based index the button should be inserted at.

addButton

public void addButton(com.sap.ui.core.client.Control button)
Appends some button to the buttons-aggregation.

Parameters:
button - com.sap.ui.core.client.Control the button to add

removeButton

public void removeButton(int index)
Removes the button at position index in the buttons-aggregation named.

Parameters:
index - int the position of the button to remove.

removeAllButtons

public void removeAllButtons()
Removes all the items in the buttons-aggregation.


indexOfButton

public int indexOfButton(com.sap.ui.core.client.Control button)
Checks for the provided com.sap.ui.core.client.Control in the buttons-aggregation and returns its index if found or -1 otherwise.

Parameters:
button - the button whose index is looked for.
Returns:
the index of the provided control in the aggregation.

destroyButtons

public void destroyButtons()
Destroys all the buttons in the Buttons-aggregation.


getContent

public com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.Control> getContent()
Getter for aggregation content Aggregating the content of the dialog (one or more controls). Caveat: when content is added with width given as a percentage, the Dialog itself should have a width set.

Returns:
com.sap.ui.core.client.Control[]

insertContent

public void insertContent(com.sap.ui.core.client.Control content,
                          int index)
Inserts some content into the aggregation named content.

Parameters:
content - the content to insert
index - int the 0-based index the content should be inserted at.

addContent

public void addContent(com.sap.ui.core.client.Control content)
Appends some content to the content-aggregation.

Parameters:
content - com.sap.ui.core.client.Control the content to add

removeContent

public void removeContent(int index)
Removes the content at position index in the content-aggregation named.

Parameters:
index - int the position of the content to remove.

removeAllContent

public void removeAllContent()
Removes all the items in the content-aggregation.


indexOfContent

public int indexOfContent(com.sap.ui.core.client.Control content)
Checks for the provided com.sap.ui.core.client.Control in the content-aggregation and returns its index if found or -1 otherwise.

Parameters:
content - the content whose index is looked for.
Returns:
the index of the provided control in the aggregation.

destroyContent

public void destroyContent()
Destroys all the content in the Content-aggregation.


getDefaultButton

public String getDefaultButton()
Defines one of the buttons that have been provided via button aggregation to be the default button. This default button is initially selected, if no control is set via the initialFocus association explicitly. The default button is activated when Enter is pressed in the context of the dialog and when the currently selected element does not handle the Enter event itself.


setDefaultButton

public void setDefaultButton(String defaultButton)
Defines one of the buttons that have been provided via button aggregation to be the default button. This default button is initially selected, if no control is set via the initialFocus association explicitly. The default button is activated when Enter is pressed in the context of the dialog and when the currently selected element does not handle the Enter event itself.

Parameters:
defaultButton - String id of the associated com.sap.ui.commons.client.Button or null

setDefaultButton

public void setDefaultButton(Button defaultButton)
Defines one of the buttons that have been provided via button aggregation to be the default button. This default button is initially selected, if no control is set via the initialFocus association explicitly. The default button is activated when Enter is pressed in the context of the dialog and when the currently selected element does not handle the Enter event itself.

Parameters:
defaultButton - An associated com.sap.ui.commons.client.Button or null

getInitialFocus

public String getInitialFocus()
Defines the control that shall get the focus when the dialog is opened.


setInitialFocus

public void setInitialFocus(String initialFocus)
Defines the control that shall get the focus when the dialog is opened.

Parameters:
initialFocus - String id of the associated com.sap.ui.core.client.Control or null

setInitialFocus

public void setInitialFocus(com.sap.ui.core.client.Control initialFocus)
Defines the control that shall get the focus when the dialog is opened.

Parameters:
initialFocus - An associated com.sap.ui.core.client.Control or null

attachClosedEvent

public void attachClosedEvent(com.sap.ui.core.client.event.EventListener listener)
attach an EventListener Event is fired when the user closes the dialog window. Event parameters provide information about last position and last size.
Event Parameters:
{sap.ui.core/int} width the width of the dialog when closed
{sap.ui.core/int} height the height of the dialog when closed
{sap.ui.core/int} top the top position of the dialog when closed
{sap.ui.core/int} left the left position of the dialog when closed

Parameters:
listener - reference to the EventListener

detachClosedEvent

public void detachClosedEvent(com.sap.ui.core.client.event.EventListener listener)
detach an EventListener Event is fired when the user closes the dialog window. Event parameters provide information about last position and last size.

Parameters:
listener - reference to the EventListener

open

public void open()
Opens the dialog control instance.


close

public void close()
Closes the dialog control instance.


isOpen

public boolean isOpen()
Returns a value for the current status of the dialog control instance.



Copyright © 2011 SAP. All Rights Reserved.