本文整理汇总了Java中com.vaadin.ui.CustomLayout类的典型用法代码示例。如果您正苦于以下问题:Java CustomLayout类的具体用法?Java CustomLayout怎么用?Java CustomLayout使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CustomLayout类属于com.vaadin.ui包,在下文中一共展示了CustomLayout类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: AboutView
import com.vaadin.ui.CustomLayout; //导入依赖的package包/类
public AboutView() {
CustomLayout aboutContent = new CustomLayout("aboutview");
aboutContent.setStyleName("about-content");
// you can add Vaadin components in predefined slots in the custom
// layout
aboutContent.addComponent(
new Label(FontAwesome.INFO_CIRCLE.getHtml()
+ " This application is using Vaadin "
+ Version.getFullVersion(), ContentMode.HTML), "info");
setSizeFull();
setStyleName("about-view");
addComponent(aboutContent);
setComponentAlignment(aboutContent, Alignment.MIDDLE_CENTER);
}
示例2: FossaBooleanDialog
import com.vaadin.ui.CustomLayout; //导入依赖的package包/类
public FossaBooleanDialog(FossaApplication app, String captionWindow, String dialogMessage, String captionTrue, String captionFalse) {
super(app);
setStyleName("vm");
setCaption(captionWindow);
setWidth("500px");
center();
layout = new CustomLayout("./subWindows/dialogWarnung");
HorizontalLayout buttonBattery = new HorizontalLayout();
buttonTrue = new Button(captionTrue, (ClickListener) this);
buttonFalse = new Button(captionFalse, (ClickListener) this);
buttonTrue.setWidth("200px");
buttonFalse.setWidth("200px");
buttonBattery.addComponent(buttonTrue);
buttonBattery.addComponent(buttonFalse);
buttonBattery.setSpacing(true);
Label messageLabel = new Label(dialogMessage);
layout.addComponent(messageLabel, "messageLabel");
layout.addComponent(buttonBattery, "buttonBattery");
setContent(layout);
}
示例3: AdminDashboard
import com.vaadin.ui.CustomLayout; //导入依赖的package包/类
public AdminDashboard(RolpApplication app) {
super("./applicationMainLayout/adminLayout");
this.app = app;
buildButtonBattery();
CustomLayout lehrerListe = new CustomLayout("./lehrerDashboards/liste");
lehrerListe.addStyleName("liste");
lehrerListe.addComponent(getLehrerList(), "list");
lehrerListe.setHeight("260px");
addComponent(lehrerListe,"liste");
addComponent(horizontalButtonBattery, "horizontalButtonBattery");
addComponent(verticalButtonBattery, "verticalButtonBattery");
}
示例4: KlassenlehrerZuordnen
import com.vaadin.ui.CustomLayout; //导入依赖的package包/类
public KlassenlehrerZuordnen(FossaApplication app) throws FossaLasoLockedException {
super(app);
setWidth("600px");
setHeight("600px");
center();
VerticalLayout layoutVertical = new VerticalLayout();
setContent(layoutVertical);
CustomLayout layout = new CustomLayout("./listeAnzeigen/listeAnzeigen");
HorizontalLayout buttonBattery = new HorizontalLayout();
buttonBattery.setSpacing(true);
HorizontalLayout buttonBatteryBearbeiten = new HorizontalLayout();
buttonBatteryBearbeiten.setSpacing(true);
layout.addComponent(buttonBatteryBearbeiten, "buttonBatteryBearbeiten");
layout.addComponent(buttonBattery, "buttonBattery");
layout.addComponent(windowCloseButton, "windowCloseButton");
windowCloseButton.setWidth("100%");
layoutVertical.addComponent(getKlassenlehrerZuordnenList());
layoutVertical.addComponent(layout);
}
示例5: FachSchuelerZuordnen
import com.vaadin.ui.CustomLayout; //导入依赖的package包/类
public FachSchuelerZuordnen(RolpApplication app, FachSchuelerZuordnenList fachSchuelerZuordnenList, String caption) {
super(app);
setCaption(" - " + caption + " - ");
setWidth("500px");
center();
VerticalLayout layoutVertical = new VerticalLayout();
setContent(layoutVertical);
CustomLayout layout = new CustomLayout("./listeAnzeigen/listeAnzeigen");
HorizontalLayout buttonBattery = new HorizontalLayout();
buttonBattery.setSpacing(true);
HorizontalLayout buttonBatteryBearbeiten = new HorizontalLayout();
buttonBatteryBearbeiten.setSpacing(true);
layout.addComponent(buttonBatteryBearbeiten, "buttonBatteryBearbeiten");
layout.addComponent(buttonBattery, "buttonBattery");
layout.addComponent(windowCloseButton, "windowCloseButton");
windowCloseButton.setWidth("100%");
this.fachSchuelerZuordnenList = fachSchuelerZuordnenList;
layoutVertical.addComponent(fachSchuelerZuordnenList);
layoutVertical.addComponent(layout);
}
示例6: SchuelerfachlisteAnzeigen
import com.vaadin.ui.CustomLayout; //导入依赖的package包/类
public SchuelerfachlisteAnzeigen(RolpApplication app, SchuelerfachList schuelerfachList) {
super(app);
this.app = app;
this.schuelerfachList = schuelerfachList;
setWidth("550px");
VerticalLayout layoutVertical = new VerticalLayout();
setContent(layoutVertical);
CustomLayout layout = new CustomLayout("./listeAnzeigen/listeAnzeigen");
HorizontalLayout buttonBatteryBearbeiten = new HorizontalLayout();
buttonBatteryBearbeiten.setSpacing(true);
buttonBatteryBearbeiten.addComponent(facheinschaetzungBearbeitenButton);
facheinschaetzungBearbeitenButton.setWidth("250px");
buttonBatteryBearbeiten.addComponent(windowCloseButton);
windowCloseButton.setWidth("250px");
layout.addComponent(buttonBatteryBearbeiten, "buttonBatteryBearbeiten");
schuelerfachList.addStyleName("schuelerList");
layoutVertical.addComponent(schuelerfachList);
layoutVertical.addComponent(layout);
}
示例7: EinschaetzungAnlegen
import com.vaadin.ui.CustomLayout; //导入依赖的package包/类
public EinschaetzungAnlegen (FossaApplication app, EinschaetzungLaso einschaetzung, String caption, FossaLaso lasoToBeLocked) throws FossaLasoLockedException{
super(app);
this.einschaetzungLaso = einschaetzung;
this.lasoToBeLocked = lasoToBeLocked;
if (lasoToBeLocked != null) {
if (lasoToBeLocked.isLocked()) {
throw new FossaLasoLockedException();
} else {
lasoToBeLocked.lock();
}
}
setCaption(" - " + caption + " - ");
setWidth("700px");
center();
CustomLayout layout = new CustomLayout("./subWindows/formAnlegen");
setContent(layout);
getEinschaetzungAnlegenForm();
layout.addComponent(formEinschaetzungAnlegen, "form");
}
示例8: AboutView
import com.vaadin.ui.CustomLayout; //导入依赖的package包/类
public AboutView() {
CustomLayout aboutContent = new CustomLayout("aboutview");
aboutContent.setStyleName(DSTheme.ABOUT_CONTENT);
// you can add Vaadin components in predefined slots in the custom layout
aboutContent.addComponent(new Label(
VaadinIcons.INFO_CIRCLE.getHtml() + " This application is using Vaadin " + Version.getFullVersion(),
ContentMode.HTML), "info");
setSizeFull();
setStyleName(DSTheme.ABOUT_VIEW);
addComponent(aboutContent);
setComponentAlignment(aboutContent, Alignment.MIDDLE_CENTER);
}
示例9: addFooter
import com.vaadin.ui.CustomLayout; //导入依赖的package包/类
private void addFooter(final VerticalLayout rootLayout) {
final Resource resource = context
.getResource("classpath:/VAADIN/themes/" + UI.getCurrent().getTheme() + "/layouts/footer.html");
try (InputStream resourceStream = resource.getInputStream()) {
final CustomLayout customLayout = new CustomLayout(resourceStream);
customLayout.setSizeUndefined();
rootLayout.addComponent(customLayout);
rootLayout.setComponentAlignment(customLayout, Alignment.BOTTOM_LEFT);
} catch (final IOException ex) {
LOG.error("Footer file cannot be loaded", ex);
}
}
示例10: LoginPage
import com.vaadin.ui.CustomLayout; //导入依赖的package包/类
public LoginPage(final Navigator navigator, Application application) {
System.out.println("Construct LoginPage");
this.navigator = navigator;
Panel panel = new Panel("Login");
panel.setSizeUndefined();
addComponent(panel, "left: 20px; top: 20px;");
CustomLayout custom = new CustomLayout("loginPage");
panel.setContent(custom);
TextField username = new TextField();
custom.addComponent(username, "username");
TextField password = new TextField();
custom.addComponent(password, "password");
boolean isAuthorized = this.authenticate();
Button buttonLogin = new Button("Login");
buttonLogin.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
if(isAuthorized) {
application.bindUser(
username.getValue(),
password.getValue()
);
navigator.navigateTo(SessionSelectionPage.NAME);
}
}
});
this.application = application;
custom.addComponent(buttonLogin, "buttonLogin");
}
示例11: FossaLoginScreen
import com.vaadin.ui.CustomLayout; //导入依赖的package包/类
public FossaLoginScreen(FossaApplication app, FossaAuthorizer authorizer, String error) {
super(app);
setStyleName("login");
this.authorizer = authorizer;
setCaption("Bitte melden Sie sich an!");
setWidth("500px");
center();
CustomLayout layout = new CustomLayout("./login/loginScreen");
setContent(layout);
Label errorlabel = new Label(error);
formLoginScreen = new Form();
formLoginScreen.addField(username, username);
username.focus();
formLoginScreen.addField(password, password);
formLoginScreen.getField(username).setRequired(true);
formLoginScreen.getField(password).setRequired(true);
layout.addComponent(formLoginScreen, "form");
layout.addComponent(errorlabel, "errorlabel");
Button login = new Button("Anmelden");
layout.addComponent(login, "login");
login.addListener((Button.ClickListener) this);
login.setClickShortcut(KeyCode.ENTER);
}
示例12: LehrerAnlegen
import com.vaadin.ui.CustomLayout; //导入依赖的package包/类
public LehrerAnlegen(FossaApplication app, LehrerLaso lehrer) {
super(app);
this.lehrerLaso = lehrer;
setCaption(" - Lehrerdaten - ");
setWidth("500px");
center();
CustomLayout layout = new CustomLayout("./subWindows/formAnlegen");
setContent(layout);
getLehrerAnlegenForm();
layout.addComponent(formLehrerAnlegen, "form");
}
示例13: FachlehrerDashboard
import com.vaadin.ui.CustomLayout; //导入依赖的package包/类
public FachlehrerDashboard(RolpApplication app) {
super(app);
this.app = app;
setCaption(" - FachlehrerDashboard - ");
setWidth("100%");
setHeight("100%");
buildButtonBatteries();
CustomLayout layout = new CustomLayout("./lehrerDashboards/fachLehrerDashboardMain");
setContent(layout);
CustomLayout headline = new CustomLayout("./lehrerDashboards/headline");
headline.addStyleName("headline");
Embedded logo = new Embedded(null, new ThemeResource(MAINPAGE_PANEL_ANMELDEN_LOGO_PATH));
logo.setType(Embedded.TYPE_IMAGE);
logo.setWidth("100px");
logo.setHeight("96px");
headline.addComponent(logo,"logo");
CustomLayout faecherListe = new CustomLayout("./lehrerDashboards/liste");
faecherListe.addStyleName("liste");
faecherList = getFaecherList();
faecherList.setHeight("250px");
faecherList.setStyleName("list");
faecherListe.addComponent(faecherList, "list");
faecherListe.setHeight("260px");
layout.addComponent(faecherListe,"liste");
layout.addComponent(headline,"headline");
layout.addComponent(horizontalButtonBattery,"horizontalButtonBattery");
lehrerBlog = getLehrerBlog();
layout.addComponent(lehrerBlog,"blog");
windowCloseButton.setWidth("100%");
layout.addComponent(windowCloseButton, "windowCloseButton");
}
示例14: SchuelerVerwalten
import com.vaadin.ui.CustomLayout; //导入依赖的package包/类
public SchuelerVerwalten(FossaApplication app, SchuelerLaso schueler) {
super(app);
this.schuelerLaso = schueler;
setCaption(" - Sch�lerdaten - ");
setWidth("500px");
center();
CustomLayout layout = new CustomLayout("./subWindows/formAnlegen");
setContent(layout);
getSchuelerAnlegenForm();
layout.addComponent(formSchuelerAnlegen, "form");
}
示例15: VersetzungsvermerklisteAnzeigen
import com.vaadin.ui.CustomLayout; //导入依赖的package包/类
public VersetzungsvermerklisteAnzeigen(RolpApplication app) {
super(app);
this.app = app;
this.klasseLaso = KlasseContainer.getKlasseByLehrer(app.getLoginLehrer());
setCaption(" - Anzeige der Versetzungsvermerkliste - ");
setWidth("800px");
center();
VerticalLayout layoutVertical = new VerticalLayout();
setContent(layoutVertical);
CustomLayout layout = new CustomLayout("./listeAnzeigen/listeAnzeigen");
HorizontalLayout buttonBattery = new HorizontalLayout();
buttonBattery.setSpacing(true);
HorizontalLayout buttonBatteryBearbeiten = new HorizontalLayout();
buttonBatteryBearbeiten.setSpacing(true);
buttonBatteryBearbeiten.addComponent(versetzungsvermerkBearbeitennButton);
versetzungsvermerkBearbeitennButton.setWidth("250px");
layout.addComponent(buttonBatteryBearbeiten, "buttonBatteryBearbeiten");
layout.addComponent(buttonBattery, "buttonBattery");
layout.addComponent(windowCloseButton, "windowCloseButton");
windowCloseButton.setWidth("100%");
schuelerList = getSchuelerList();
schuelerList.addStyleName("schuelerList");
layoutVertical.addComponent(schuelerList);
layoutVertical.addComponent(layout);
}