public class SC
extends java.lang.Object
| Constructor and Description |
|---|
SC() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
_getPromptAnimationsEnabled() |
static void |
_maybeInit() |
static void |
ask(java.lang.String message,
BooleanCallback callback)
Show a modal dialog with a message, possibly an icon, and "Yes" and "No" buttons.
|
static void |
ask(java.lang.String title,
java.lang.String message,
BooleanCallback callback)
Show a modal dialog with a message, possibly an icon, and "Yes" and "No" buttons.
|
static void |
askforValue(java.lang.String title,
java.lang.String message,
ValueCallback callback)
Show a modal dialog with a text entry box, asking the user to enter a value.
|
static void |
askforValue(java.lang.String message,
ValueCallback callback)
Show a modal dialog with a text entry box, asking the user to enter a value.
|
static void |
clearPrompt()
Clear the modal prompt being shown to the user.
|
static void |
confirm(java.lang.String message,
BooleanCallback callback)
Show a modal dialog with a message, possibly an icon, and "OK" and "Cancel" buttons.
|
static void |
confirm(java.lang.String title,
java.lang.String message,
BooleanCallback callback)
Show a modal dialog with a message, possibly an icon, and "OK" and "Cancel" buttons.
|
static void |
enablePromptAnimations(java.lang.Boolean enablePromptAnimations)
Sets whether to enable or disable showing/hiding animations on built-in prompt/say/warn
dialogs.
|
static void |
logEcho(java.lang.Object value) |
static void |
logEcho(java.lang.Object value,
java.lang.String message) |
static void |
logWarn(java.lang.String message) |
static void |
logWarn(java.lang.String message,
java.lang.String category) |
static void |
say(java.lang.String message)
Show a modal dialog with a message, possibly an icon, and "OK" button.
|
static void |
say(java.lang.String message,
BooleanCallback callback)
Show a modal dialog with a message, possibly an icon, and "OK" button.
|
static void |
say(java.lang.String title,
java.lang.String message)
Show a modal dialog with a message, possibly an icon, and "OK" button.
|
static void |
say(java.lang.String title,
java.lang.String message,
BooleanCallback callback)
Show a modal dialog with a message, possibly an icon, and "OK" button.
|
static void |
showPrompt(java.lang.String message)
Show a modal prompt to the user.
|
static void |
showPrompt(java.lang.String title,
java.lang.String message) |
static void |
warn(java.lang.String message)
Show a modal dialog with a message, possibly an icon, and "OK" button.
|
static void |
warn(java.lang.String message,
BooleanCallback callback)
Show a modal dialog with a message, possibly an icon, and "OK" button.
|
@SGWTInternal public static void _maybeInit()
@SGWTInternal public static boolean _getPromptAnimationsEnabled()
public static void enablePromptAnimations(java.lang.Boolean enablePromptAnimations)
enablePromptAnimations - whether to enable or disable animations. If true or null,
then built-in prompt animations are enabled. Default value: null.public static void say(java.lang.String message)
message - the messagepublic static void say(java.lang.String title,
java.lang.String message)
title - the title of the message boxmessage - the messagepublic static void say(java.lang.String message,
BooleanCallback callback)
message - the messagecallback - the callback to fire when the user dismisses the dialog.public static void say(java.lang.String title,
java.lang.String message,
BooleanCallback callback)
title - the title of the message boxmessage - the messagecallback - the callback to fire when the user dismisses the dialog.public static void ask(java.lang.String message,
BooleanCallback callback)
message - the messagecallback - the callback to fire when the user dismisses the dialog.public static void ask(java.lang.String title,
java.lang.String message,
BooleanCallback callback)
title - the title of the message boxmessage - the messagecallback - the callback to fire when the user dismisses the dialog.public static void askforValue(java.lang.String message,
ValueCallback callback)
properties.defaultValue
Keyboard focus is automatically placed in the text entry field, and hitting the enter key is the equivalent of pressing OK.
message - message to displaycallback - Callback to fire when the user clicks a button to dismiss the dialog. This has the single parameter 'value',
indicating the user entry, or null if cancel was pressed or the window closedpublic static void askforValue(java.lang.String title,
java.lang.String message,
ValueCallback callback)
Keyboard focus is automatically placed in the text entry field, and hitting the enter key is the equivalent of pressing OK.
title - the title of the dialogmessage - message to displaycallback - Callback to fire when the user clicks a button to dismiss the dialog. This has the single parameter 'value',
indicating the user entry, or null if cancel was pressed or the window closedpublic static void showPrompt(java.lang.String message)
Note: If this prompt is to be shown to the user during some slow logic, we advise
temporarily disabling prompt animations via SC.enablePromptAnimations(false),
calling this method, then using a Timer to kick off
the slow logic in a separate thread. In Mobile Safari, the timeout set on the Timer
should be more than 1ms (50ms recommended) to give the browser time to repaint the screen.
These steps ensure that the prompt is showing before the lengthy execution begins.
message - message to displayclearPrompt()public static void showPrompt(java.lang.String title,
java.lang.String message)
public static void clearPrompt()
public static void confirm(java.lang.String message,
BooleanCallback callback)
message - message to displaycallback - Callback to fire when the user clicks a button to dismiss the dialog.public static void confirm(java.lang.String title,
java.lang.String message,
BooleanCallback callback)
title - the title of the dialogmessage - message to displaycallback - Callback to fire when the user clicks a button to dismiss the dialog.public static void warn(java.lang.String message)
message - the messagepublic static void warn(java.lang.String message,
BooleanCallback callback)
message - the messagecallback - Optional Callback to fire when the user dismisses the dialog.public static void logEcho(java.lang.Object value)
public static void logEcho(java.lang.Object value,
java.lang.String message)
public static void logWarn(java.lang.String message)
public static void logWarn(java.lang.String message,
java.lang.String category)