com.sap.ui.commons.client
Class Dialog

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.sap.ui.core.client.Element
          extended by com.sap.ui.core.client.Control
              extended by com.sap.ui.commons.client.Dialog

public class Dialog
extends com.sap.ui.core.client.Control

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.ui.commons.Dialog)

Constructor Summary
protected Dialog()
          constructs the class Dialog
hidden due to JavaScriptObject restriction
 
Method Summary
 Dialog addButton(com.sap.ui.core.client.Control button)
          Appends a button to the aggregation buttons.
 Dialog addContent(com.sap.ui.core.client.Control content)
          Appends a content to the aggregation content.
 Dialog 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.
static Dialog create()
          creates a new instance of the class Dialog
static Dialog create(String idOrConfig)
          creates a new instance of the class Dialog
static Dialog create(String id, String config)
          creates a new instance of the class Dialog
 Dialog destroyButtons()
          Destroys all the buttons in the Buttons-aggregation.
 Dialog destroyContent()
          Destroys all the content in the Content-aggregation.
 Dialog 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.
 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.
 Dialog insertButton(com.sap.ui.core.client.Control button, int index)
          Inserts some button into the aggregation named buttons.
 Dialog 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.
 com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.Control>> removeAllButtons()
          Removes all the items in the buttons-aggregation.
 com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.Control>> removeAllContent()
          Removes all the items in the content-aggregation.
 com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.Control> removeButton(int index)
          Removes a button from the aggregation named buttons.
 com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.Control> removeContent(int index)
          Removes a content from the aggregation named content.
 Dialog setAccessibleRole(com.sap.ui.core.client.AccessibleRole value)
          Setter for property accessibleRole
Default value is: Dialog
 Dialog setApplyContentPadding(boolean value)
          Setter for property applyContentPadding
Default value is: true
 Dialog setContentBorderDesign(BorderDesign value)
          Setter for property contentBorderDesign
Default value is: None
 Dialog setDefaultButton(Button defaultButton)
          Defines one of the buttons that have been provided via button aggregation to be the default button.
 Dialog setDefaultButton(String defaultButton)
          Defines one of the buttons that have been provided via button aggregation to be the default button.
 Dialog setHeight(String value)
          Setter for property height
 Dialog setInitialFocus(com.sap.ui.core.client.Control initialFocus)
          Defines the control that shall get the focus when the dialog is opened.
 Dialog setInitialFocus(String initialFocus)
          Defines the control that shall get the focus when the dialog is opened.
 Dialog setMaxHeight(String value)
          Setter for property maxHeight
 Dialog setMaxWidth(String value)
          Setter for property maxWidth
 Dialog setMinHeight(String value)
          Setter for property minHeight
 Dialog setMinWidth(String value)
          Setter for property minWidth
 Dialog setModal(boolean value)
          Setter for property modal
Default value is: false
 Dialog setResizable(boolean value)
          Setter for property resizable
Default value is: true
 Dialog setScrollLeft(int value)
          Setter for property scrollLeft
Default value is: 0
 Dialog setScrollTop(int value)
          Setter for property scrollTop
Default value is: 0
 Dialog setShowCloseButton(boolean value)
          Setter for property showCloseButton
Default value is: true
 Dialog setTitle(String value)
          Setter for property title
Default value is: ''
 Dialog setWidth(String value)
          Setter for property width
 
Methods inherited from class com.sap.ui.core.client.Control
addStyleClass, hasStyleClass, invalidate, placeAt, placeAt, removeStyleClass, rerender
 
Methods inherited from class com.sap.ui.core.client.Element
_convertArray, _convertArray, _convertArray, _convertArray, _convertArray, attachBrowserEvent, attachEvent, bindAggregation, bindContext, bindProperty, bindProperty, destroy, detachBrowserEvent, detachEvent, getDomRef, getElementName, getId, getLibraryName, getModel, getParent, getProperty, getTooltip_AsString, getTooltip_Text, getTooltip, isActive, setModel, setProperty, setTooltip, setTooltip, unbindAggregation, unbindContext, unbindProperty
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Dialog

protected Dialog()
constructs the class Dialog
hidden due to JavaScriptObject restriction

Method Detail

create

public static Dialog create()
creates a new instance of the class Dialog


create

public static Dialog create(String idOrConfig)
creates a new instance of the class Dialog

Parameters:
id - id of the Dialog or configuration JSON string

create

public static Dialog create(String id,
                            String config)
creates a new instance of the class Dialog

Parameters:
id - id of the Dialog
config - configuration JSON string

getWidth

public final 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 final Dialog setWidth(String value)
Setter for property width

Parameters:
value - String
Returns:
this to allow method chaining

getHeight

public final 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 final Dialog setHeight(String value)
Setter for property height

Parameters:
value - String
Returns:
this to allow method chaining

getScrollLeft

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

Returns:
the value of property scrollLeft

setScrollLeft

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

Parameters:
value - int
Returns:
this to allow method chaining

getScrollTop

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

Returns:
the value of property scrollTop

setScrollTop

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

Parameters:
value - int
Returns:
this to allow method chaining

getTitle

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

Returns:
the value of property title

setTitle

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

Parameters:
value - String
Returns:
this to allow method chaining

isApplyContentPadding

public final 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 final Dialog setApplyContentPadding(boolean value)
Setter for property applyContentPadding
Default value is: true

Parameters:
value - boolean
Returns:
this to allow method chaining

isShowCloseButton

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

Returns:
the value of property showCloseButton

setShowCloseButton

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

Parameters:
value - boolean
Returns:
this to allow method chaining

isResizable

public final 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 final Dialog setResizable(boolean value)
Setter for property resizable
Default value is: true

Parameters:
value - boolean
Returns:
this to allow method chaining

getMinWidth

public final 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 final Dialog setMinWidth(String value)
Setter for property minWidth

Parameters:
value - String
Returns:
this to allow method chaining

getMinHeight

public final 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 final Dialog setMinHeight(String value)
Setter for property minHeight

Parameters:
value - String
Returns:
this to allow method chaining

getMaxWidth

public final 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 final Dialog setMaxWidth(String value)
Setter for property maxWidth

Parameters:
value - String
Returns:
this to allow method chaining

getMaxHeight

public final 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 final Dialog setMaxHeight(String value)
Setter for property maxHeight

Parameters:
value - String
Returns:
this to allow method chaining

getContentBorderDesign

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

Returns:
the value of property contentBorderDesign

setContentBorderDesign

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

Parameters:
value - com.sap.ui.commons.client.enums.BorderDesign
Returns:
this to allow method chaining

isModal

public final 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 final Dialog setModal(boolean value)
Setter for property modal
Default value is: false

Parameters:
value - boolean
Returns:
this to allow method chaining

getAccessibleRole

public final 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 final Dialog setAccessibleRole(com.sap.ui.core.client.AccessibleRole value)
Setter for property accessibleRole
Default value is: Dialog

Parameters:
value - com.sap.ui.core.client.AccessibleRole
Returns:
this to allow method chaining

getButtons

public final 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 final Dialog 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.
Returns:
this to allow method chaining

addButton

public final Dialog addButton(com.sap.ui.core.client.Control button)
Appends a button to the aggregation buttons.

Parameters:
button - com.sap.ui.core.client.Control the button to add
Returns:
this to allow method chaining

removeButton

public final com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.Control> removeButton(int index)
Removes a button from the aggregation named buttons.

Parameters:
index - int the position of the button to remove.
Returns:
reference to this instance

removeAllButtons

public final com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.Control>> removeAllButtons()
Removes all the items in the buttons-aggregation.

Returns:
an array of the removed elements (might be empty)

indexOfButton

public final 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 final Dialog destroyButtons()
Destroys all the buttons in the Buttons-aggregation.

Returns:
this to allow method chaining

getContent

public final 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 final Dialog 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.
Returns:
this to allow method chaining

addContent

public final Dialog addContent(com.sap.ui.core.client.Control content)
Appends a content to the aggregation content.

Parameters:
content - com.sap.ui.core.client.Control the content to add
Returns:
this to allow method chaining

removeContent

public final com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.Control> removeContent(int index)
Removes a content from the aggregation named content.

Parameters:
index - int the position of the content to remove.
Returns:
reference to this instance

removeAllContent

public final com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.Control>> removeAllContent()
Removes all the items in the content-aggregation.

Returns:
an array of the removed elements (might be empty)

indexOfContent

public final 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 final Dialog destroyContent()
Destroys all the content in the Content-aggregation.

Returns:
this to allow method chaining

getDefaultButton

public final 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 final Dialog 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 - id of the associated com.sap.ui.commons.client.Button or null
Returns:
this to allow method chaining

setDefaultButton

public final Dialog 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
Returns:
this to allow method chaining

getInitialFocus

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


setInitialFocus

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

Parameters:
initialFocus - id of the associated com.sap.ui.core.client.Control or null
Returns:
this to allow method chaining

setInitialFocus

public final Dialog 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
Returns:
this to allow method chaining

attachClosedEvent

public final Dialog 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
Returns:
this to allow method chaining

detachClosedEvent

public final Dialog 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
Returns:
this to allow method chaining

open

public final void open()
Opens the dialog control instance.


close

public final void close()
Closes the dialog control instance.


isOpen

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



Copyright © 2011 SAP. All Rights Reserved.