com.gwtext.client.widgets
Class MessageBoxConfig

java.lang.Object
  extended by com.gwtext.client.core.JsObject
      extended by com.gwtext.client.core.BaseConfig
          extended by com.gwtext.client.widgets.MessageBoxConfig

public class MessageBoxConfig
extends BaseConfig

MessageBox configuration class.

See Also:
MessageBox.show(MessageBoxConfig)

Field Summary
 
Fields inherited from class com.gwtext.client.core.JsObject
jsObj
 
Constructor Summary
MessageBoxConfig()
           
 
Method Summary
 void setAnimEl(java.lang.String animEl)
          An id from which the message box should animate as it opens and closes (defaults to undefined).
 void setButtons(boolean buttons)
          False to not show any buttons.
 void setButtons(MessageBox.Button buttons)
          The button to display.
 void setButtons(NameValuePair[] buttons)
          name = button id, value = button label Name has to be one of 'ok, cancel, yes, no, and value is the label to be dispalyed
 void setCallback(MessageBox.PromptCallback cb)
          A callback function to execute after closing the dialog.
 void setClosable(boolean closable)
          False to hide the top-right close button (defaults to true).
 void setCls(java.lang.String cls)
          A custom CSS class to apply to the message box element.
 void setDefaultTextHeight(int defaultTextHeight)
          The default height in pixels of the message box's multiline textarea if displayed (defaults to 75).
 void setIconCls(java.lang.String iconCls)
          A CSS class that provides a background image to be used as an icon for the dialog (e.g., Ext.MessageBox.WARNING or 'custom-class', defaults to '').
 void setMaxWidth(int maxWidth)
          The maximum width in pixels of the message box (defaults to 600).
 void setMinProgressWidth(int minProgressWidth)
          The minimum width in pixels of the message box if it is a progress-style dialog.
 void setMinWidth(int minWidth)
          The minimum width in pixels of the message box (defaults to 100).
 void setModal(boolean modal)
          False to allow user interaction with the page while the message box is displayed (defaults to true).
 void setMsg(java.lang.String msg)
          The string that will replace the existing message box body text (defaults to the XHTML-compliant non-breaking space character ' ')
 void setMultiline(boolean multiline)
          True to prompt the user to enter multi-line text (defaults to false).
 void setProgress(boolean progress)
          True to display a progress bar (defaults to false)
 void setProgressText(java.lang.String progressText)
          The text to display inside the progress bar if progress = true (defaults to '').
 void setPrompt(boolean prompt)
          True to prompt the user to enter single-line text (defaults to false).
 void setProxyDrag(boolean proxyDrag)
          True to display a lightweight proxy while dragging (defaults to false).
 void setTitle(java.lang.String title)
          The title text.
 void setValue(java.lang.String value)
          he string value to set into the active textbox element if displayed.
 void setWait(boolean wait)
          True to display a progress bar (defaults to false).
 void setWaitConfig(WaitConfig waitConfig)
          Applies a wait with the specified waitConfig object (applies only if wait = true).
 void setWidth(int width)
          The width of the dialog in pixels.
 
Methods inherited from class com.gwtext.client.core.JsObject
getJsObj, getProperties, isCreated, setJsObj
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageBoxConfig

public MessageBoxConfig()
Method Detail

setAnimEl

public void setAnimEl(java.lang.String animEl)
An id from which the message box should animate as it opens and closes (defaults to undefined).

Parameters:
animEl - the anim elem ID

setTitle

public void setTitle(java.lang.String title)
The title text.

Parameters:
title - the title

setClosable

public void setClosable(boolean closable)
False to hide the top-right close button (defaults to true). Note that progress and wait dialogs will ignore this property and always hide the close button as they can only be closed programmatically.

Parameters:
closable - true for closable

setCls

public void setCls(java.lang.String cls)
A custom CSS class to apply to the message box element.

Parameters:
cls - the css class

setDefaultTextHeight

public void setDefaultTextHeight(int defaultTextHeight)
The default height in pixels of the message box's multiline textarea if displayed (defaults to 75).

Parameters:
defaultTextHeight - the default text height

setPrompt

public void setPrompt(boolean prompt)
True to prompt the user to enter single-line text (defaults to false).

Parameters:
prompt - true to prompt

setMultiline

public void setMultiline(boolean multiline)
True to prompt the user to enter multi-line text (defaults to false).

Parameters:
multiline - true for multiline prompt

setProgress

public void setProgress(boolean progress)
True to display a progress bar (defaults to false)

Parameters:
progress - true for progress bar

setProgressText

public void setProgressText(java.lang.String progressText)
The text to display inside the progress bar if progress = true (defaults to '').

Parameters:
progressText - the progress text

setValue

public void setValue(java.lang.String value)
he string value to set into the active textbox element if displayed.

Parameters:
value - the value text

setButtons

public void setButtons(MessageBox.Button buttons)
The button to display.

Parameters:
buttons - the buttons

setButtons

public void setButtons(boolean buttons)
False to not show any buttons.

Parameters:
buttons - display buttons

setCallback

public void setCallback(MessageBox.PromptCallback cb)
A callback function to execute after closing the dialog. The arguments to the function will be btn (the name of the button that was clicked, if applicable, e.g. "ok"), and text (the value of the active text field, if applicable). Progress and wait dialogs will ignore this option since they do not respond to user actions and can only be closed programmatically, so any required function should be called by the same code after it closes the dialog.

Parameters:
cb - the callback

setButtons

public void setButtons(NameValuePair[] buttons)
name = button id, value = button label Name has to be one of 'ok, cancel, yes, no, and value is the label to be dispalyed

Parameters:
buttons - the nambe value pairs for the buttons

setMsg

public void setMsg(java.lang.String msg)
The string that will replace the existing message box body text (defaults to the XHTML-compliant non-breaking space character ' ')

Parameters:
msg - the message

setIconCls

public void setIconCls(java.lang.String iconCls)
A CSS class that provides a background image to be used as an icon for the dialog (e.g., Ext.MessageBox.WARNING or 'custom-class', defaults to '').

Parameters:
iconCls - the icon CSS class

setProxyDrag

public void setProxyDrag(boolean proxyDrag)
True to display a lightweight proxy while dragging (defaults to false).

Parameters:
proxyDrag - true for proxy drag

setModal

public void setModal(boolean modal)
False to allow user interaction with the page while the message box is displayed (defaults to true).

Parameters:
modal - false for non modal

setMinWidth

public void setMinWidth(int minWidth)
The minimum width in pixels of the message box (defaults to 100).

Parameters:
minWidth - the min width

setMaxWidth

public void setMaxWidth(int maxWidth)
The maximum width in pixels of the message box (defaults to 600).

Parameters:
maxWidth - the max width

setMinProgressWidth

public void setMinProgressWidth(int minProgressWidth)
The minimum width in pixels of the message box if it is a progress-style dialog. This is useful for setting a different minimum width than text-only dialogs may need (defaults to 250)

Parameters:
minProgressWidth - the minimum width in pixels of the message box if it is a progress-style dialog.

setWait

public void setWait(boolean wait)
True to display a progress bar (defaults to false).

Parameters:
wait - true to display progress bar

setWaitConfig

public void setWaitConfig(WaitConfig waitConfig)
Applies a wait with the specified waitConfig object (applies only if wait = true).

Parameters:
waitConfig - the wait config

setWidth

public void setWidth(int width)
The width of the dialog in pixels.

Parameters:
width - the dialog width