/** * Gets the index of the currently-visible widget, if any. * * @return the visible widget's index, or -1 if there is no such widget */ public int getVisibleWidget() { return getWidgetIndex(visibleWidget); }
/** * Called when the loading state changes. * * @param state the new loading state */ @Override protected void onLoadingStateChanged(LoadingState state) { Widget message = null; if (state == LoadingState.LOADING) { // Loading indicator. message = loadingIndicatorContainer; } else if (state == LoadingState.LOADED && getPresenter().isEmpty()) { // Empty table. message = emptyTableWidgetContainer; } // Switch out the message to display. if (message != null) { messagesPanel.showWidget(messagesPanel.getWidgetIndex(message)); } // Adjust the colspan of the messages panel container. tbodyLoadingCell.setColSpan(Math.max(1, getRealColumnCount())); // Show the correct container. showOrHide(getChildContainer(), message == null); showOrHide(tbodyLoading, message != null); // Fire an event. super.onLoadingStateChanged(state); }
/** * Gets the index of the currently-visible widget, if any. * * @return the visible widget's index, or -1 if there is no such widget */ public int getVisibleWidget() { return getWidgetIndex(visibleWidget); }
/** * Called when the loading state changes. * * @param state the new loading state */ @Override protected void onLoadingStateChanged(LoadingState state) { Widget message = null; if (state == LoadingState.LOADING) { // Loading indicator. message = loadingIndicatorContainer; } else if (state == LoadingState.LOADED && getPresenter().isEmpty()) { // Empty table. message = emptyListWidgetContainer; } // Switch out the message to display. if (message != null) { messagesPanel.showWidget(messagesPanel.getWidgetIndex(message)); } // Show the correct container. showOrHide(getChildContainer(), message == null); messagesPanel.setVisible(message != null); // Fire an event. super.onLoadingStateChanged(state); }
/** * Gets the index of the currently-visible widget, if any. * * @return the visible widget's index, or -1 if there is no such widget */ public int getVisibleWidget() { return getWidgetIndex(visibleWidget); }
public int getWidgetIndex(Widget panel) { return deckPanel.getWidgetIndex(panel); }
public void remove(Widget tab) { remove(deckPanel.getWidgetIndex(tab)); }
@Override public boolean switchToModule(final String moduleId) { if (centerMap.containsKey(moduleId)) { final int widgetIndex = center.getWidgetIndex(centerMap.get(moduleId)); center.showWidget(widgetIndex); // Set active group final VerticalPanel groupContainer = getGroupContainer(moduleId); if (groupContainer != null) { final int index = moduleContainer.getWidgetIndex(group2WidgetMap.get(moduleId)); moduleContainer.showStack(index); } // Select toggle button inside group final ToggleButton modileButton = module2WidgetMap.get(moduleId); final Collection<ToggleButton> buttons = module2WidgetMap.values(); for (final ToggleButton toggleButton : buttons) { toggleButton.setDown(toggleButton.equals(modileButton)); } return true; } return false; }
/** * Called when the loading state changes. * * @param state the new loading state */ @Override protected void onLoadingStateChanged(LoadingState state) { Widget message = null; if (state == LoadingState.LOADING) { // Loading indicator. message = loadingIndicatorContainer; } else if (state == LoadingState.LOADED && getPresenter().isEmpty()) { // Empty table. message = emptyTableWidgetContainer; } // Switch out the message to display. if (message != null) { messagesPanel.showWidget(messagesPanel.getWidgetIndex(message)); } // Adjust the colspan of the messages panel container. tbodyLoadingCell.setColSpan(Math.max(1, getRealColumnCount())); // Show the correct container. showOrHide(getChildContainer(), message == null); showOrHide(tbodyLoading, message != null); // Fire an event. super.onLoadingStateChanged(state); }
/** * Called when the loading state changes. * * @param state the new loading state */ @Override protected void onLoadingStateChanged(LoadingState state) { Widget message = null; if (state == LoadingState.LOADING) { // Loading indicator. message = loadingIndicatorContainer; } else if (state == LoadingState.LOADED && getPresenter().isEmpty()) { // Empty table. message = emptyListWidgetContainer; } // Switch out the message to display. if (message != null) { messagesPanel.showWidget(messagesPanel.getWidgetIndex(message)); } // Show the correct container. showOrHide(getChildContainer(), message == null); messagesPanel.setVisible(message != null); // Fire an event. super.onLoadingStateChanged(state); }
/** * Called when the loading state changes. * * @param state the new loading state */ @Override protected void onLoadingStateChanged(LoadingState state) { Widget message = null; if (state == LoadingState.LOADING) { // Loading indicator. message = loadingIndicatorContainer; } else if (state == LoadingState.LOADED && getPresenter().isEmpty()) { // Empty table. message = emptyTableWidgetContainer; } // Switch out the message to display. if (message != null) { messagesPanel.showWidget(messagesPanel.getWidgetIndex(message)); } // Adjust the colspan of the messages panel container. tbodyLoadingCell.setColSpan(Math.max(1, getRealColumnCount())); // Show the correct container. showOrHide(getChildContainer(), message == null); showOrHide(tbodyLoading, message != null); // Fire an event. super.onLoadingStateChanged(state); }
/** * Called when the loading state changes. * * @param state the new loading state */ @Override protected void onLoadingStateChanged(LoadingState state) { Widget message = null; if (state == LoadingState.LOADING) { // Loading indicator. message = loadingIndicatorContainer; } else if (state == LoadingState.LOADED && getPresenter().isEmpty()) { // Empty table. message = emptyListWidgetContainer; } // Switch out the message to display. if (message != null) { messagesPanel.showWidget(messagesPanel.getWidgetIndex(message)); } // Show the correct container. showOrHide(getChildContainer(), message == null); messagesPanel.setVisible(message != null); // Fire an event. super.onLoadingStateChanged(state); }