com.atlassian.gwt
Class ConfluenceDialog

java.lang.Object
  extended by com.atlassian.gwt.ConfluenceDialog

public class ConfluenceDialog
extends java.lang.Object

Generates a dialog by reusing AJS.poup to build the popup panel and GWT UI binder to generate the contents of the dialog. Note that it relies on Confluence's bundled css for styling. It's html is modeled on the html produced by earlier dialogs and makes use of the same css classes.


Constructor Summary
ConfluenceDialog(int width, int height, java.lang.String id)
           
 
Method Summary
 com.google.gwt.user.client.ui.Button addButton(java.lang.String text)
          Adds a button to the bottom of the Dialog.
 com.google.gwt.user.client.ui.Button addButton(java.lang.String id, java.lang.String text)
          Adds a button to the bottom of the Dialog.
 com.google.gwt.event.dom.client.HasClickHandlers addTab(java.lang.String id, java.lang.String title, com.google.gwt.user.client.ui.Widget widget)
          Adds a tab to the dialog.
 void hide()
           
 boolean isCurrentPanel(com.google.gwt.user.client.ui.Widget w)
           
 void remove()
           
 void selectTab(int index)
          Selects the tab with the specified index and displays its widget.
 void selectTab(java.lang.String id)
          Selects the tab with the specified id attribute.
 void setHeading(java.lang.String text)
          Sets the Dialog's title
 void setStatusText(java.lang.String text)
          Sets the text in the button left of the button panel for status messages.
 void show()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfluenceDialog

public ConfluenceDialog(int width,
                        int height,
                        java.lang.String id)
Parameters:
width - Width of the dialog
height - Height of the dialog
id - the if to place on the dialog's root DOM element.
Method Detail

setHeading

public void setHeading(java.lang.String text)
Sets the Dialog's title

Parameters:
text - text to display as the title.

addButton

public com.google.gwt.user.client.ui.Button addButton(java.lang.String id,
                                                      java.lang.String text)
Adds a button to the bottom of the Dialog. Buttons are added left to right.

Parameters:
text - The HTML caption of the button
id - The id to place on the button's root DOM element.
Returns:
The newly created button that was added to the Dialog.

addButton

public com.google.gwt.user.client.ui.Button addButton(java.lang.String text)
Adds a button to the bottom of the Dialog. Buttons are added left to right.

Parameters:
text - The HTML caption of the button
Returns:
The newly created button that was added to the Dialog.

addTab

public com.google.gwt.event.dom.client.HasClickHandlers addTab(java.lang.String id,
                                                               java.lang.String title,
                                                               com.google.gwt.user.client.ui.Widget widget)
Adds a tab to the dialog. This adds a new item to the tab list with the text specified in the title argument. When the item is selected, the tab's widget becomes visible.

Parameters:
title - The title of the tab. This will appear in the tab list.
widget - The tab contents. This is usually a Panel.

selectTab

public void selectTab(int index)
Selects the tab with the specified index and displays its widget.

Parameters:
index - The index of the tab you want to select.

selectTab

public void selectTab(java.lang.String id)
Selects the tab with the specified id attribute.


isCurrentPanel

public boolean isCurrentPanel(com.google.gwt.user.client.ui.Widget w)
Parameters:
w - Widget to check for.
Returns:
true if w is the currently selected tab widget.

setStatusText

public void setStatusText(java.lang.String text)
Sets the text in the button left of the button panel for status messages. Pass in an empty string as the text to clear the status message out.


show

public void show()

hide

public void hide()

remove

public void remove()


Copyright © 2003-2010 Atlassian. All Rights Reserved.