private void unselectAllServerTemplateNavLinks() { for (Widget widget : dropDownServerTemplates) { if (widget instanceof AnchorListItem) { ((AnchorListItem) widget).setActive(false); } } } }
/** * Is the page the currently displayed page. Note WizardPageTitles are * unaware of other WizardPageTitles and hence a mediator class needs to * control the setting of the "current page" and de-selecting other previous * "current pages". * @param isSelected */ public void setPageSelected(final boolean isSelected) { container.setActive(isSelected); }
/** * Is the page the currently displayed page. Note WizardPageTitles are * unaware of other WizardPageTitles and hence a mediator class needs to * control the setting of the "current page" and de-selecting other previous * "current pages". * @param isSelected */ public void setPageSelected(final boolean isSelected) { container.setActive(isSelected); }
@Override public void onClick(ClickEvent event) { oneMinuteRadioButton.setIcon(IconType.CHECK); supportsRefreshInterval.onUpdateRefreshInterval(true, selectedRefreshTime); refreshDisableButton.setActive(false); refreshDisableButton.setEnabled(true); refreshDisableButton.setText(constants.Disable_autorefresh()); } });
@Override public void onClick(ClickEvent event) { oneMinuteRadioButton.setIcon(IconType.CHECK); supportsRefreshInterval.onUpdateRefreshInterval(true, selectedRefreshTime); refreshDisableButton.setActive(false); refreshDisableButton.setEnabled(true); refreshDisableButton.setText(constants.Disable_autorefresh()); } });
protected void selectServerTemplate(final AnchorListItem serverTemplateNavLink, boolean updating) { final boolean serverChanged = serverTemplateNavLink.getText().equals(serverTemplateButton.getText()) == false; unselectAllServerTemplateNavLinks(); serverTemplateNavLink.setActive(true); if (serverChanged) { serverTemplateButton.setText(serverTemplateNavLink.getText()); if (changeCommand != null && !updating) { changeCommand.execute(serverTemplateNavLink.getText()); } } }
NavPills pills = new NavPills(); AnchorListItem item1 = new AnchorListItem("Item 1"); item1.setActive(true); pills.add(item1); pills.add(new AnchorListItem("Item 2"); pills.add(new AnchorListItem("Item 3"); ...
/** * This updates the current active page, and the enabled state * of the previous and next buttons in the Pagination based * on the state of the given SimplePager. * @param pager the SimplePager of the CellTable/DataGrid */ private void updatePaginationState(final SimplePager pager) { for (int i = 0; i < getWidgetCount(); i++) { if (i == 0) { //previous button ((AnchorListItem)getWidget(i)).setEnabled(pager.hasPreviousPage()); } else if (i == getWidgetCount() - 1) { //next button ((AnchorListItem)getWidget(i)).setEnabled(pager.hasNextPage()); } else { int index = i - 1; if (index == pager.getPage()) { ((AnchorListItem)getWidget(i)).setActive(true); } else { ((AnchorListItem)getWidget(i)).setActive(false); } } } } }
@Override public void onClick(ClickEvent event) { supportsRefreshInterval.onUpdateRefreshInterval(false, 0); resetButton.setActive(false); resetButton.setEnabled(false); resetButton.setText(constants.Autorefresh_Disabled()); oneMinuteRadioButton.setIcon(null); fiveMinuteRadioButton.setIcon(null); tenMinuteRadioButton.setIcon(null); } });
@Override public void onClick(ClickEvent event) { supportsRefreshInterval.onUpdateRefreshInterval(false, 0); resetButton.setActive(false); resetButton.setEnabled(false); resetButton.setText(constants.Autorefresh_Disabled()); oneMinuteRadioButton.setIcon(null); fiveMinuteRadioButton.setIcon(null); tenMinuteRadioButton.setIcon(null); } });
/** * This updates the current active page, and the enabled state * of the previous and next buttons in the Pagination based * on the state of the given SimplePager. * @param pager the SimplePager of the CellTable/DataGrid */ private void updatePaginationState(final SimplePager pager) { for (int i = 0; i < getWidgetCount(); i++) { if (i == 0) { //previous button ((AnchorListItem)getWidget(i)).setEnabled(pager.hasPreviousPage()); } else if (i == getWidgetCount() - 1) { //next button ((AnchorListItem)getWidget(i)).setEnabled(pager.hasNextPage()); } else { int index = i - 1; if (index == pager.getPage()) { ((AnchorListItem)getWidget(i)).setActive(true); } else { ((AnchorListItem)getWidget(i)).setActive(false); } } } } }
page.setActive(true);
page.setActive(true);