org.fusesource.web.console.client.util
Class WidgetHelper
java.lang.Object
org.fusesource.web.console.client.util.WidgetHelper
public class WidgetHelper
- extends java.lang.Object
- Version:
- $Revision: 1.1 $
|
Method Summary |
static void |
addItems(com.google.gwt.user.client.ui.ListBox listBox,
java.lang.String... items)
|
static void |
addWidgets(java.util.List answer,
com.google.gwt.user.client.ui.HTMLTable grid,
Predicate<com.google.gwt.user.client.ui.Widget> predicate)
|
static com.google.gwt.user.client.ui.HorizontalPanel |
createHorizontalPanel(java.util.Collection<com.google.gwt.user.client.ui.Widget> widgets)
|
static com.google.gwt.user.client.ui.HorizontalPanel |
createHorizontalPanel(com.google.gwt.user.client.ui.Widget... widgets)
|
protected static com.google.gwt.user.client.ui.KeyboardListener |
createKeyboardListener(com.google.gwt.user.client.ui.DialogBox dialogBox,
com.google.gwt.user.client.ui.ClickListener clickListener,
com.google.gwt.user.client.ui.Widget widget)
|
static com.google.gwt.user.client.ui.Widget |
createReadOnlyCheckbox(boolean checked)
|
static com.google.gwt.user.client.ui.VerticalPanel |
createVerticalPanel(java.util.Collection<com.google.gwt.user.client.ui.Widget> widgets)
|
static com.google.gwt.user.client.ui.VerticalPanel |
createVerticalPanel(com.google.gwt.user.client.ui.Widget... widgets)
|
static java.lang.String |
getSelectedValue(com.google.gwt.user.client.ui.ListBox listBox)
Returns the selected value of the list box or null if none is selected |
static java.util.List<com.google.gwt.user.client.ui.TextBoxBase> |
getTextBoxes(com.google.gwt.user.client.ui.HTMLTable grid)
|
static java.util.List<com.google.gwt.user.client.ui.Widget> |
getWidgets(com.google.gwt.user.client.ui.HTMLTable grid,
Predicate<com.google.gwt.user.client.ui.Widget> predicate)
Returns all of the widgets of the given type from the grid |
protected static com.google.gwt.user.client.ui.HorizontalPanel |
newHorizontalPanel()
|
protected static com.google.gwt.user.client.ui.VerticalPanel |
newVerticalPanel()
|
static void |
refresh(Refreshable refreshable)
|
static void |
refresh(com.google.gwt.user.client.ui.Widget widget)
|
static void |
removeExtraRows(com.google.gwt.widgetideas.table.client.FixedWidthGrid table,
int size)
|
static void |
removeExtraRows(com.google.gwt.user.client.ui.FlexTable table,
int size)
|
static void |
setEnabled(boolean flag,
com.google.gwt.user.client.ui.FocusWidget... widgets)
|
static void |
setGridHtmlContents(com.google.gwt.user.client.ui.FlexTable grid,
java.lang.String html)
Sets the entire contents of the grid to the given HTML, deleting any other previous content |
static com.google.gwt.user.client.ui.Button[] |
showConfirmDialog(java.lang.String title,
com.google.gwt.user.client.ui.DialogBox dialogBox,
com.google.gwt.user.client.ui.DockPanel panel,
com.google.gwt.user.client.ui.ClickListener okClickListener)
|
static com.google.gwt.user.client.ui.Button[] |
showConfirmDialog(java.lang.String title,
com.google.gwt.user.client.ui.DialogBox dialogBox,
com.google.gwt.user.client.ui.DockPanel panel,
com.google.gwt.user.client.ui.FocusWidget focusWidget,
com.google.gwt.user.client.ui.ClickListener clickListener)
|
static com.google.gwt.user.client.ui.DialogBox |
showConfirmDialog(java.lang.String title,
java.lang.String html,
java.lang.Runnable runnable)
|
static void |
showFailureMessage(com.google.gwt.user.client.ui.FlexTable table,
java.lang.String message,
java.lang.Throwable caught)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WidgetHelper
public WidgetHelper()
getWidgets
public static java.util.List<com.google.gwt.user.client.ui.Widget> getWidgets(com.google.gwt.user.client.ui.HTMLTable grid,
Predicate<com.google.gwt.user.client.ui.Widget> predicate)
- Returns all of the widgets of the given type from the grid
- Type Parameters:
T - the type of widgets required- Parameters:
type - the required type of the widgetgrid - the grid to search
- Returns:
- a list of the given type of widgets or an empty list of none could be found
addWidgets
public static void addWidgets(java.util.List answer,
com.google.gwt.user.client.ui.HTMLTable grid,
Predicate<com.google.gwt.user.client.ui.Widget> predicate)
getTextBoxes
public static java.util.List<com.google.gwt.user.client.ui.TextBoxBase> getTextBoxes(com.google.gwt.user.client.ui.HTMLTable grid)
createHorizontalPanel
public static com.google.gwt.user.client.ui.HorizontalPanel createHorizontalPanel(com.google.gwt.user.client.ui.Widget... widgets)
createHorizontalPanel
public static com.google.gwt.user.client.ui.HorizontalPanel createHorizontalPanel(java.util.Collection<com.google.gwt.user.client.ui.Widget> widgets)
newHorizontalPanel
protected static com.google.gwt.user.client.ui.HorizontalPanel newHorizontalPanel()
createVerticalPanel
public static com.google.gwt.user.client.ui.VerticalPanel createVerticalPanel(com.google.gwt.user.client.ui.Widget... widgets)
createVerticalPanel
public static com.google.gwt.user.client.ui.VerticalPanel createVerticalPanel(java.util.Collection<com.google.gwt.user.client.ui.Widget> widgets)
newVerticalPanel
protected static com.google.gwt.user.client.ui.VerticalPanel newVerticalPanel()
refresh
public static void refresh(com.google.gwt.user.client.ui.Widget widget)
refresh
public static void refresh(Refreshable refreshable)
createReadOnlyCheckbox
public static com.google.gwt.user.client.ui.Widget createReadOnlyCheckbox(boolean checked)
removeExtraRows
public static void removeExtraRows(com.google.gwt.user.client.ui.FlexTable table,
int size)
removeExtraRows
public static void removeExtraRows(com.google.gwt.widgetideas.table.client.FixedWidthGrid table,
int size)
setEnabled
public static void setEnabled(boolean flag,
com.google.gwt.user.client.ui.FocusWidget... widgets)
setGridHtmlContents
public static void setGridHtmlContents(com.google.gwt.user.client.ui.FlexTable grid,
java.lang.String html)
- Sets the entire contents of the grid to the given HTML, deleting any other previous content
showFailureMessage
public static void showFailureMessage(com.google.gwt.user.client.ui.FlexTable table,
java.lang.String message,
java.lang.Throwable caught)
showConfirmDialog
public static com.google.gwt.user.client.ui.DialogBox showConfirmDialog(java.lang.String title,
java.lang.String html,
java.lang.Runnable runnable)
showConfirmDialog
public static com.google.gwt.user.client.ui.Button[] showConfirmDialog(java.lang.String title,
com.google.gwt.user.client.ui.DialogBox dialogBox,
com.google.gwt.user.client.ui.DockPanel panel,
com.google.gwt.user.client.ui.ClickListener okClickListener)
showConfirmDialog
public static com.google.gwt.user.client.ui.Button[] showConfirmDialog(java.lang.String title,
com.google.gwt.user.client.ui.DialogBox dialogBox,
com.google.gwt.user.client.ui.DockPanel panel,
com.google.gwt.user.client.ui.FocusWidget focusWidget,
com.google.gwt.user.client.ui.ClickListener clickListener)
createKeyboardListener
protected static com.google.gwt.user.client.ui.KeyboardListener createKeyboardListener(com.google.gwt.user.client.ui.DialogBox dialogBox,
com.google.gwt.user.client.ui.ClickListener clickListener,
com.google.gwt.user.client.ui.Widget widget)
addItems
public static void addItems(com.google.gwt.user.client.ui.ListBox listBox,
java.lang.String... items)
getSelectedValue
public static java.lang.String getSelectedValue(com.google.gwt.user.client.ui.ListBox listBox)
- Returns the selected value of the list box or null if none is selected
Copyright © 2009 FuseSource. All Rights Reserved.