本文整理汇总了Java中com.vaadin.ui.ProgressBar.setIndeterminate方法的典型用法代码示例。如果您正苦于以下问题:Java ProgressBar.setIndeterminate方法的具体用法?Java ProgressBar.setIndeterminate怎么用?Java ProgressBar.setIndeterminate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.vaadin.ui.ProgressBar
的用法示例。
在下文中一共展示了ProgressBar.setIndeterminate方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ProgressIndicatorWindow
import com.vaadin.ui.ProgressBar; //导入方法依赖的package包/类
public ProgressIndicatorWindow() {
center();
setVisible(true);
setResizable(false);
setDraggable(false);
setImmediate(true);
setModal(true);
setClosable(false);
setCaption("Loading");
VerticalLayout layout = new VerticalLayout();
layout.setMargin(true);
layout.setWidth("100%");
this.currentStatus = new Label();
this.currentStatus.addStyleName(StyleConstants.TEXT_ALIGN_CENTER);
this.currentStatus.setSizeFull();
this.currentStatus.setImmediate(true);
ProgressBar progressBar = new ProgressBar();
progressBar.setSizeFull();
progressBar.setIndeterminate(true);
progressBar.setImmediate(true);
progressBar.setVisible(true);
layout.addComponent(progressBar);
layout.addComponent(this.currentStatus);
layout.setComponentAlignment(this.currentStatus, Alignment.MIDDLE_CENTER);
layout.setComponentAlignment(progressBar, Alignment.MIDDLE_CENTER);
setContent(layout);
}
示例2: receiveUpload
import com.vaadin.ui.ProgressBar; //导入方法依赖的package包/类
@Override
public OutputStream receiveUpload(String filename, String mimeType) {
importLayout.removeAllComponents();
ProgressBar bar = new ProgressBar();
bar.setIndeterminate(true);
importLayout.addComponent(bar);
importLayout.setComponentAlignment(bar, Alignment.MIDDLE_CENTER);
return os;
}
示例3: refreshDetails
import com.vaadin.ui.ProgressBar; //导入方法依赖的package包/类
protected void refreshDetails(final Trigger trigger, final IDb db, final Settings settings) {
final HorizontalLayout executingLayout = new HorizontalLayout();
executingLayout.setSizeFull();
final ProgressBar p = new ProgressBar();
p.setIndeterminate(true);
executingLayout.addComponent(p);
tabSheet.addTab(executingLayout, "Details", FontAwesome.SPINNER, 0);
tabSheet.setSelectedTab(executingLayout);
TriggerTableLayout triggerTable = new TriggerTableLayout(trigger, settings, new Refresher() {
public void refresh() {
tabSheet.removeTab(tabSheet.getTab(0));
refreshDetails(trigger, db, settings);
}
});
boolean select = tabSheet.getSelectedTab().equals(executingLayout);
tabSheet.removeComponent(executingLayout);
VerticalLayout layout = new VerticalLayout();
layout.setMargin(true);
layout.setSizeFull();
layout.addComponent(triggerTable);
tabSheet.addTab(layout, "Details", null, 0);
if (select) {
tabSheet.setSelectedTab(layout);
}
}
示例4: LazyLoadingIndicator
import com.vaadin.ui.ProgressBar; //导入方法依赖的package包/类
/**
* Create new lazy loading indicator with given message
* @param message Message shown to user
*/
public LazyLoadingIndicator(String message) {
addStyleName("lazy-loading");
progressBar = new ProgressBar();
progressBar.addStyleName("lazy-loading-pbar");
progressBar.setIndeterminate(true);
addComponent(progressBar);
messageLabel = new Label(message != null ? message : DEFAULT_MESSAGE);
messageLabel.addStyleName("lazy-loading-message");
addComponent(messageLabel);
}
示例5: InProgressDialog
import com.vaadin.ui.ProgressBar; //导入方法依赖的package包/类
public InProgressDialog(String caption, InProgressWorker<T> worker, BackgroundRefresherService backgroundService, String failureMessage) {
this.backgroundService = backgroundService;
this.worker = worker;
this.failureMessage = failureMessage;
setWidth(300, Unit.PIXELS);
setHeight(150, Unit.PIXELS);
setCaption("Working...");
setModal(true);
VerticalLayout content = new VerticalLayout();
setContent(content);
HorizontalLayout middle = new HorizontalLayout();
middle.setSpacing(true);
middle.setMargin(true);
ProgressBar pg = new ProgressBar();
pg.setIndeterminate(true);
middle.addComponent(pg);
if (isNotBlank(caption)) {
Label label = new Label(caption);
middle.addComponent(label);
}
content.addComponent(middle);
content.setExpandRatio(middle, 1);
HorizontalLayout buttonBar = new HorizontalLayout();
buttonBar.setWidth(100, Unit.PERCENTAGE);
buttonBar.addStyleName(ValoTheme.WINDOW_BOTTOM_TOOLBAR);
Button dismiss = new Button("Dismiss");
dismiss.addStyleName(ValoTheme.BUTTON_PRIMARY);
dismiss.setClickShortcut(KeyCode.ENTER);
dismiss.addClickListener(new ClickListener() {
private static final long serialVersionUID = 1L;
@Override
public void buttonClick(ClickEvent event) {
InProgressDialog.this.close();
}
});
buttonBar.addComponent(dismiss);
buttonBar.setComponentAlignment(dismiss, Alignment.MIDDLE_RIGHT);
content.addComponent(buttonBar);
}
示例6: WorkingDialog
import com.vaadin.ui.ProgressBar; //导入方法依赖的package包/类
/**
* Display the Working Dialog with a Cancel Button. If the user clicks the
* Cancel button the listener will be sent a cancel button. The setWorker
* method does not support being cancelled.
*
* @param caption
* @param message
* @param listener
* @param refresher
*/
public WorkingDialog(String caption, String message, CancelListener listener)
{
super(caption);
ui = UI.getCurrent();
this.setModal(true);
this.setClosable(false);
this.setResizable(false);
content = new VerticalLayout();
this.setWidth("500px");
this.setHeight("150px");
content.setSizeFull();
content.setMargin(true);
content.setSpacing(true);
this.cancelListener = listener;
layout = new VerticalLayout();
layout.setSpacing(true);
layout.setSizeFull();
HorizontalLayout progressArea = new HorizontalLayout();
progressArea.setSizeFull();
ProgressBar progress = new ProgressBar();
progressArea.addComponent(progress);
progress.setIndeterminate(true);
messageLabel = new Label(message);
messageLabel.setContentMode(ContentMode.HTML);
messageLabel.setSizeFull();
progressArea.addComponent(messageLabel);
progressArea.setExpandRatio(messageLabel, 1);
layout.addComponent(progressArea);
content.addComponent(layout);
if (listener != null)
{
cancel = new Button("Cancel");
cancel.addClickListener(new ClickEventLogged.ClickListener()
{
private static final long serialVersionUID = 1L;
@Override
public void clicked(ClickEvent event)
{
WorkingDialog.this.cancelListener.cancel();
WorkingDialog.this.close();
}
});
content.addComponent(cancel);
content.setComponentAlignment(cancel, Alignment.BOTTOM_RIGHT);
}
this.setContent(content);
this.center();
}