|
Spiffy UI Framework | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectDialogBox
org.spiffyui.client.widgets.dialog.Dialog
public abstract class Dialog
This is a common ancestor class where we can change the behavior or look of all Dialogs. It handles the ESC key and the close X icon. Buttons are added to a button bar.
| Constructor Summary | |
|---|---|
Dialog(java.lang.String id,
java.lang.String title,
java.lang.String titleStyle)
Constructor defaulting to autohide false and modal true. |
|
Dialog(java.lang.String id,
java.lang.String title,
java.lang.String titleStyle,
boolean autohide,
boolean modal)
Create a new dialog with the specified parameters |
|
| Method Summary | |
|---|---|
void |
addButton(java.lang.String id,
java.lang.String text,
java.lang.String buttonClickedValue)
A convenient way to add a button to the button bar. |
Button |
addButton(java.lang.String id,
java.lang.String text,
java.lang.String buttonClickedValue,
ClickHandler handler)
A convenient way to add a button to the button bar. |
FlowPanel |
getButtonBar()
|
java.lang.String |
getButtonClicked()
|
java.lang.String |
getCloseText()
Gets the close icon's tooltip text. |
int |
getDefaultButton()
|
HTMLPanel |
getDialogBody()
|
java.lang.String |
getId()
|
protected void |
onPreviewNativeEvent(Event.NativePreviewEvent event)
Overriding to close on pressing Esc key or clicking the close anchor. |
void |
replaceDialogBodyContents(Widget w)
Replace the entire contents of the dialog body with the Widget |
void |
replaceTitle(java.lang.String title)
Replaces the inner text of the title. |
void |
setButtonBar(FlowPanel buttonBar)
|
void |
setButtonClicked(java.lang.String buttonClicked)
|
void |
setCloseText(java.lang.String text)
Sets this dialog's close icon's tooltip text. |
void |
setDefaultButton(int index)
Set the focus to the button added to the button bar at the index specified. |
void |
setDialogBody(HTMLPanel dialogBody)
|
void |
setId(java.lang.String id)
|
void |
show()
Overriding show so that the default button can have focus and thereby be keyboard accessible. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Dialog(java.lang.String id,
java.lang.String title,
java.lang.String titleStyle)
id - - the id of this elementtitle - - the title of the dialog. Send in an empty String if the title needs to be set
later. Use replaceTitle after calling show()titleStyle - - the style of the title
public Dialog(java.lang.String id,
java.lang.String title,
java.lang.String titleStyle,
boolean autohide,
boolean modal)
id - - the id of this elementtitle - - the title of the dialog. Send in an empty String if the title needs to be set
later. Use replaceTitle after calling show()titleStyle - - the style of the titleautohide - - boolean true for if the dialog should be automatically hidden when the user clicks outside of itmodal - - boolean true for modal| Method Detail |
|---|
public java.lang.String getCloseText()
public void setCloseText(java.lang.String text)
text - the text of the close button tooltippublic void replaceTitle(java.lang.String title)
title - - the new title
public Button addButton(java.lang.String id,
java.lang.String text,
java.lang.String buttonClickedValue,
ClickHandler handler)
id - - id of the elementtext - - the text shown on the buttonbuttonClickedValue - - the value of the button returnedhandler - - ClickHandler, if null, just hides dialog and sets the button clicked value
public void addButton(java.lang.String id,
java.lang.String text,
java.lang.String buttonClickedValue)
id - - id of the elementtext - - the text shown on the buttonbuttonClickedValue - - the value of the button returnedpublic void setButtonClicked(java.lang.String buttonClicked)
buttonClicked - The buttonClicked to set.public java.lang.String getButtonClicked()
public void setDefaultButton(int index)
index - - the button position in the bar, 0 is first.public void show()
public FlowPanel getButtonBar()
public void setButtonBar(FlowPanel buttonBar)
buttonBar - The buttonBar to set.public HTMLPanel getDialogBody()
public void setDialogBody(HTMLPanel dialogBody)
dialogBody - The dialogBody to set.public java.lang.String getId()
public void setId(java.lang.String id)
id - The id to set.public int getDefaultButton()
public void replaceDialogBodyContents(Widget w)
w - - Widget to useprotected void onPreviewNativeEvent(Event.NativePreviewEvent event)
event - - the Event.NativePreviewEvent
|
Spiffy UI Framework | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||