use of com.vaadin.flow.component.html.Div in project flow by vaadin.
the class TitleView method onShow.
@Override
protected void onShow() {
removeAll();
Div titleView = new Div();
titleView.setText("Title view");
titleView.setId("annotated");
add(titleView);
}
use of com.vaadin.flow.component.html.Div in project flow by vaadin.
the class DependenciesLoadingBaseView method createDiv.
private Div createDiv(String id, String text) {
Div div = new Div();
div.setId(id);
div.setText(text);
return div;
}
use of com.vaadin.flow.component.html.Div in project flow by vaadin.
the class ScrollView method createSpacerDiv.
static Div createSpacerDiv(int heightPx) {
Div spacer = new Div();
spacer.setHeight(heightPx + "px");
return spacer;
}
use of com.vaadin.flow.component.html.Div in project flow by vaadin.
the class LockingUI method init.
@Override
protected void init(VaadinRequest request) {
message = new Div();
message.setId("message");
message.setText("default");
NativeButton lockButton = new NativeButton("Lock UI for too long");
lockButton.addClickListener(e -> {
setHeartBeats();
message.setText(LOCKING_ENDED);
});
NativeButton checkButton = new NativeButton("Test communication", e -> message.setText(ALL_OK));
lockButton.setId("lock");
checkButton.setId("check");
add(lockButton, checkButton, message);
}
use of com.vaadin.flow.component.html.Div in project flow by vaadin.
the class BasicPollUI method init.
@Override
protected void init(VaadinRequest request) {
super.init(request);
getElement().insertChild(0, pollInterval);
getElement().insertChild(0, pollCounter);
setPollInterval(500);
addPollListener(e -> {
pollCounter.setText("Polls received: " + (++pollCount));
});
NativeButton stopPolling = new NativeButton("Stop polling", e -> {
setPollInterval(-1);
updatePollIntervalText();
});
stopPolling.setId(STOP_POLLING_BUTTON);
NativeButton startPolling = new NativeButton("Start polling", e -> {
setPollInterval(500);
updatePollIntervalText();
});
startPolling.setId(START_POLLING_BUTTON);
spacer();
getElement().appendChild(new Div(startPolling, stopPolling).getElement());
updatePollIntervalText();
}
Aggregations