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); }
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); }
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"); }
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); }
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); }
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); }
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"); }
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); }
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); } }
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"); }
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); }
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"); }
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"); }
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"); }
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); }
public VersetzungsvermerkBearbeiten(FossaApplication app, SchuelerLaso schueler) { super(app); this.schuelerLaso = schueler; setCaption(" - Versetzungsvermerk - "); setWidth("500px"); center(); CustomLayout layout = new CustomLayout("./subWindows/formAnlegen"); setContent(layout); getVersetzungsvermerkBearbeitenForm(); layout.addComponent(formVersetzungsvermerkBearbeiten, "form"); }
public SchuelerlisteAnzeigen(RolpApplication app) { super(app); this.app = app; this.klasseLaso = KlasseContainer.getKlasseByLehrer(app.getLoginLehrer()); setCaption(" - Anzeige der Sch�lerliste - "); 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(schuelerHinzufuegenButton); schuelerHinzufuegenButton.setWidth("150px"); buttonBatteryBearbeiten.addComponent(schuelerBearbeitenButton); schuelerBearbeitenButton.setWidth("150px"); buttonBatteryBearbeiten.addComponent(schuelerEntfernenButton); schuelerEntfernenButton.setWidth("150px"); 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); }
public KlassenlisteAnzeigen(RolpApplication app) { super(app); this.app = app; setCaption(" - Anzeige der Klassenliste - "); 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(klasseHinzufuegenButton); klasseHinzufuegenButton.setWidth("150px"); buttonBatteryBearbeiten.addComponent(klasseBearbeitenButton); klasseBearbeitenButton.setWidth("150px"); buttonBatteryBearbeiten.addComponent(klasseEntfernenButton); klasseEntfernenButton.setWidth("150px"); layout.addComponent(buttonBatteryBearbeiten, "buttonBatteryBearbeiten"); layout.addComponent(buttonBattery, "buttonBattery"); layout.addComponent(windowCloseButton, "windowCloseButton"); windowCloseButton.setWidth("100%"); klassenList = getKlassenList(); klassenList.addStyleName("klassenList"); layoutVertical.addComponent(klassenList); layoutVertical.addComponent(layout); }
public KlasseAnlegen(FossaApplication app, KlasseLaso klasse) { super(app); this.klasseLaso = klasse; setCaption(" - Klasse - "); setWidth("500px"); center(); CustomLayout layout = new CustomLayout("./subWindows/formAnlegen"); setContent(layout); getKlasseAnlegenForm(); layout.addComponent(formKlasseAnlegen, "form"); }
public FachschuelerlisteAnzeigen(RolpApplication app, FachLaso fach, FachschuelerList fachschuelerListe) { super(app); this.app = app; this.fach = fach; this.fachschuelerList = fachschuelerListe; if (fach.getKlasse().equals(" - ")) { setCaption("Facheinsch�tzungen f�r das Fach " + fach.getFachdefinition().getFachbezeichnung()); } else { setCaption("Facheinsch�tzungen f�r das Fach " + fach.getFachdefinition().getFachbezeichnung() + " in Klasse " + fach.getKlasse()); } setWidth("550px"); VerticalLayout layoutVertical = new VerticalLayout(); setContent(layoutVertical); CustomLayout layout = new CustomLayout("./listeAnzeigen/listeAnzeigen"); HorizontalLayout buttonBatteryBearbeiten = new HorizontalLayout(); buttonBatteryBearbeiten.setSpacing(true); buttonBatteryBearbeiten.addComponent(facheinschaetzungSchreibenButton); facheinschaetzungSchreibenButton.setWidth("250px"); buttonBatteryBearbeiten.addComponent(windowCloseButton); windowCloseButton.setWidth("250px"); layout.addComponent(buttonBatteryBearbeiten, "buttonBatteryBearbeiten"); fachschuelerList.addStyleName("schuelerList"); layoutVertical.addComponent(fachschuelerList); layoutVertical.addComponent(layout); }
public LebSettingsAnlegen(FossaApplication app, LebSettingsLaso lebSettings) { super(app); this.lebsettingsLaso = lebSettings; setCaption(" - Einstellungen - "); setWidth("500px"); center(); CustomLayout layout = new CustomLayout("./subWindows/formAnlegen"); setContent(layout); getLebSettingsAnlegenForm(); layout.addComponent(formLebSettingsAnlegen, "form"); }
public KurseZuordnen(RolpApplication app) { super(app); this.app = app; setCaption(" - Zuordnung der Kurse - "); setWidth("950px"); 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(kursHinzufuegenButton); kursHinzufuegenButton.setWidth("150px"); buttonBatteryBearbeiten.addComponent(kursBearbeitenButton); kursBearbeitenButton.setWidth("150px"); buttonBatteryBearbeiten.addComponent(kursEntfernenButton); kursEntfernenButton.setWidth("150px"); buttonBattery.addComponent(schuelerZuordnenButton); schuelerZuordnenButton.setWidth("250px"); schuelerZuordnenButton.setEnabled(SchuelerContainer.getAllSchuelerOfKlasse(KlasseContainer.getKlasseByLehrer(app.getLoginLehrer()).getPojo()).size() > 0); layout.addComponent(buttonBatteryBearbeiten, "buttonBatteryBearbeiten"); layout.addComponent(buttonBattery, "buttonBattery"); layout.addComponent(windowCloseButton, "windowCloseButton"); windowCloseButton.setWidth("100%"); faecherList = getKursList(); layoutVertical.addComponent(faecherList); layoutVertical.addComponent(layout); }
public FaecherAnlegen(FossaApplication app, FachLaso fach, FachtypPojo fachtypPojo) { super(app); this.fachLaso = fach; setCaption(" - F�cherdaten- "); setWidth("500px"); center(); CustomLayout layout = new CustomLayout("./subWindows/formAnlegen"); setContent(layout); getFaecherAnlegenForm(fachtypPojo); layout.addComponent(formFaecherAnlegen, "form"); }
public FachdefinitionenVerwalten(RolpApplication app, FachdefinitionLaso fachdefinition) { super(app); this.fachdefinitionLaso = fachdefinition; setCaption(" - Fachdefinition - "); setWidth("500px"); center(); CustomLayout layout = new CustomLayout("./subWindows/formAnlegen"); setContent(layout); getFachdefinitionenVerwaltenForm(); layout.addComponent(formFachdefinitionenVerwalten, "form"); }
public FachdefinitionlisteAnzeigen(RolpApplication app) { super(app); this.app = app; setCaption(" - Ansicht der Fachdefinitionen - "); 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(fachdefinitionenHinzufuegenButton); fachdefinitionenHinzufuegenButton.setWidth("150px"); buttonBatteryBearbeiten.addComponent(fachdefinitionenBearbeitenButton); fachdefinitionenBearbeitenButton.setWidth("150px"); buttonBatteryBearbeiten.addComponent(fachdefinitionenEntfernenButton); fachdefinitionenEntfernenButton.setWidth("150px"); buttonBattery.addComponent(bezeichnungenZuordnenButton); bezeichnungenZuordnenButton.setWidth("250px"); layout.addComponent(buttonBatteryBearbeiten, "buttonBatteryBearbeiten"); layout.addComponent(buttonBattery, "buttonBattery"); layout.addComponent(windowCloseButton, "windowCloseButton"); windowCloseButton.setWidth("100%"); fachdefinitionList = getFachdefinitionList(); layoutVertical.addComponent(fachdefinitionList); layoutVertical.addComponent(layout); }
public FachbezeichnungLebVerwalten(RolpApplication app, FachbezeichnungLebLaso fachdefinitionLeb, FachdefinitionPojo fachdefinition) { super(app); this.fachdefinitionLebLaso = fachdefinitionLeb; setCaption(" - alternative Fachbezeichnungen f�r " + fachdefinition.getFachbezeichnung() + " - "); setWidth("500px"); center(); CustomLayout layout = new CustomLayout("./subWindows/formAnlegen"); setContent(layout); getFachdefinitionLebVerwaltenForm(fachdefinition); layout.addComponent(formFachdefinitionenLebVerwalten, "form"); }
public FachbezeichnungenLeblisteAnzeigen(RolpApplication app, FachdefinitionLaso fachdefinition) { super(app); this.app = app; this.fachdefinition = fachdefinition; setCaption(" - Ansicht der alternativen Fachbezeichnungen f�r " + fachdefinition.getFachbezeichnung() + ", die im LEB markiert werden - "); setWidth("560px"); 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(fachbezeichnungenLebHinzufuegenButton); fachbezeichnungenLebHinzufuegenButton.setWidth("150px"); buttonBatteryBearbeiten.addComponent(fachbezeichnungenLebBearbeitenButton); fachbezeichnungenLebBearbeitenButton.setWidth("150px"); buttonBatteryBearbeiten.addComponent(fachbezeichnungenLebEntfernenButton); fachbezeichnungenLebEntfernenButton.setWidth("150px"); layout.addComponent(buttonBatteryBearbeiten, "buttonBatteryBearbeiten"); layout.addComponent(buttonBattery, "buttonBattery"); layout.addComponent(windowCloseButton, "windowCloseButton"); windowCloseButton.setWidth("100%"); fachbezeichnungenLebList = getFachbezeichnungenLebList(this); layoutVertical.addComponent(fachbezeichnungenLebList); layoutVertical.addComponent(layout); }
public PflichtfaecherlisteAnzeigen(RolpApplication app) { super(app); this.app = app; setCaption(" - Ansicht der Pflichtf�cher - "); 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(faecherHinzufuegenButton); faecherHinzufuegenButton.setWidth("150px"); buttonBatteryBearbeiten.addComponent(faecherBearbeitenButton); faecherBearbeitenButton.setWidth("150px"); buttonBatteryBearbeiten.addComponent(faecherEntfernenButton); faecherEntfernenButton.setWidth("150px"); buttonBattery.addComponent(schuelerZuordnenButton); schuelerZuordnenButton.setWidth("250px"); schuelerZuordnenButton.setEnabled(SchuelerContainer.getAllSchuelerOfKlasse(KlasseContainer.getKlasseByLehrer(app.getLoginLehrer()).getPojo()).size() > 0); layout.addComponent(buttonBatteryBearbeiten, "buttonBatteryBearbeiten"); layout.addComponent(buttonBattery, "buttonBattery"); layout.addComponent(windowCloseButton, "windowCloseButton"); windowCloseButton.setWidth("100%"); faecherList = getFaecherList(); layoutVertical.addComponent(faecherList); layoutVertical.addComponent(layout); }
public static CustomLayout createLayout(String layoutId) { try { return new CustomLayout(CustomLayoutExt.class.getClassLoader().getResourceAsStream("layouts/" + layoutId + ".html")); } catch (Exception e) { throw new MyCollabException(e); } }
@Override public void attach() { super.attach(); if (this.getParent() instanceof CustomLayout) { this.getParent().addStyleName("preview-comp"); } }
public WebHtmlBoxLayout() { component = new CustomLayout(""); }
public DemoWelcomeScreen(RolpApplication app, FossaAuthorizer authorizer) { super(app); this.app = app; setStyleName("demo"); setWidth("900px"); center(); this.authorizer = authorizer; CustomLayout layout = new CustomLayout("./demo/welcomeScreen"); CustomLayout layoutTop = new CustomLayout("./demo/welcomeScreenTop"); CustomLayout layoutMiddle = new CustomLayout("./demo/welcomeScreenMiddle"); CustomLayout layoutBottom = new CustomLayout("./demo/welcomeScreenBottom"); Embedded logoRolp = new Embedded(null, new ThemeResource(DEMO_LOGO_ROLP_PATH)); logoRolp.setType(Embedded.TYPE_IMAGE); logoRolp.setWidth("100px"); logoRolp.setHeight("96px"); Label rolpDemoText = new Label("<h2>Wilkommen</h2>Dies ist eine Demoversion der Software ROLP. W�hlen Sie eine Rolle aus, um in das entsprechende Szenario zu gelangen. Der Schulleiter hat eine eigene Verwaltungsoberfl�che, wo er die Lehrer und Klassen �berblicken und zuweisen kann. Als Klassenlehrer und Fachlehrer gelangt man auf den Startbildschirm. Von da aus gelangt man zum Klassenlehrer-Dashboard und dem Fachlehrer-Dashboard. Der Klassenlehrer hat Zugang zu beiden Dashboards, da er im Normalfall auch F�cher unterrichtet.", Label.CONTENT_XHTML); Label githubLinkDummy = new Label("ROLP auf <a href=\"https://github.com/fossaag/rolp\" target=\"_blank\">GitHub.com</a>", Label.CONTENT_XHTML); Embedded logoFossa = new Embedded(null, new ThemeResource(DEMO_LOGO_FOSSA_PATH)); logoFossa.setType(Embedded.TYPE_IMAGE); logoFossa.setWidth("150px"); Label roleSelectCaption = new Label("Bitte w�hlen Sie eine Rolle aus:", Label.CONTENT_XHTML); BeanItemContainer<String> roles = new BeanItemContainer<String>(String.class); roles.addBean("Fachlehrer"); roles.addBean("Klassenlehrer"); roles.addBean("Schulleiter"); roleSelect.setContainerDataSource(roles); roleSelect.setWidth("200px"); layoutTop.addComponent(logoRolp, "logoRolp"); layoutTop.addComponent(rolpDemoText, "rolpDemoText"); layoutTop.addComponent(logoFossa, "logoFossa"); layout.addComponent(layoutTop, "layoutTop"); layoutMiddle.addComponent(roleSelectCaption, "roleSelectCaption"); layoutMiddle.addComponent(roleSelect, "roleSelect"); layoutMiddle.addComponent(okButton, "okButton"); layout.addComponent(layoutMiddle, "layoutMiddle"); layoutBottom.addComponent(githubLinkDummy, "githubLinkDummy"); layout.addComponent(layoutBottom, "layoutBottom"); setContent(layout); }
public KlassenlehrerDashboard(RolpApplication app) { super(app); this.app = app; setCaption(" - KlassenlehrerDashboard - "); setWidth("100%"); setHeight("100%"); buildButtonBatteries(); CustomLayout layout = new CustomLayout("./lehrerDashboards/klassenLehrerDashboardMain"); 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"); headline.addComponent(headdataEditingPanel,"headdataEditingPanel"); Panel hints = new Panel(); hints.addStyleName("hints"); hinweistext = new Label(); hinweistext.setContentMode(Label.CONTENT_XHTML); hinweistext.setReadOnly(true); hinweistext.setHeight("250px"); hints.setHeight("250px"); hints.setScrollable(true); hints.addComponent(hinweistext); refreshHinweistext(); CustomLayout schuelerListe = new CustomLayout("./lehrerDashboards/liste"); schuelerListe.addStyleName("liste"); schuelerList = getSchuelerList(); schuelerList.setHeight("250px"); schuelerList.setStyleName("list"); schuelerListe.addComponent(schuelerList, "list"); schuelerListe.setHeight("260px"); layout.addComponent(schuelerListe,"liste"); layout.addComponent(headline,"headline"); layout.addComponent(horizontalButtonBattery,"horizontalButtonBattery"); layout.addComponent(verticalButtonBattery,"verticalButtonBattery"); layout.addComponent(hints,"hints"); windowCloseButton.setWidth("100%"); layout.addComponent(windowCloseButton, "windowCloseButton"); // app.getAnimator().animate(horizontalButtonBattery, AnimType.ROLL_DOWN_OPEN_POP).setDuration(500).setDelay(500); }
ForgotPwdForm() { CustomLayout customLayout = CustomLayoutExt.createLayout("forgotPassword"); customLayout.setStyleName("forgotPwdForm"); Resource logoResource = AccountAssetsResolver.createLogoResource(AppUI.getBillingAccount().getLogopath(), 150); customLayout.addComponent(new Image(null, logoResource), "logo-here"); customLayout.addComponent(new ELabel(LocalizationHelper.getMessage(AppUI.getDefaultLocale(), ShellI18nEnum.BUTTON_FORGOT_PASSWORD)), "formHeader"); customLayout.addComponent(ELabel.html(LocalizationHelper.getMessage(AppUI.getDefaultLocale(), ShellI18nEnum.OPT_FORGOT_PASSWORD_INTRO)), "intro-text"); nameOrEmailField = new TextField(LocalizationHelper.getMessage(AppUI.getDefaultLocale(), GenericI18Enum.FORM_EMAIL)); customLayout.addComponent(nameOrEmailField, "nameoremail"); MButton sendEmail = new MButton(LocalizationHelper.getMessage(AppUI.getDefaultLocale(), ShellI18nEnum.BUTTON_RESET_PASSWORD), clickEvent -> { String username = nameOrEmailField.getValue(); if (StringUtils.isValidEmail(username)) { UserService userService = AppContextUtil.getSpringBean(UserService.class); User user = userService.findUserByUserName(username); if (user == null) { NotificationUtil.showErrorNotification(LocalizationHelper.getMessage(AppUI.getDefaultLocale(), GenericI18Enum.ERROR_USER_IS_NOT_EXISTED, username)); } else { userService.requestToResetPassword(user.getUsername()); NotificationUtil.showNotification(LocalizationHelper.getMessage(AppUI.getDefaultLocale(), GenericI18Enum.OPT_SUCCESS), LocalizationHelper.getMessage(AppUI.getDefaultLocale(), ShellI18nEnum.OPT_EMAIL_SENDER_NOTIFICATION)); EventBusFactory.getInstance().post(new ShellEvent.LogOut(this, null)); } } else { NotificationUtil.showErrorNotification(LocalizationHelper.getMessage(AppUI.getDefaultLocale(), ErrorI18nEnum.NOT_VALID_EMAIL, username)); } }).withStyleName(WebThemes.BUTTON_ACTION).withClickShortcut(ShortcutAction.KeyCode.ENTER); customLayout.addComponent(sendEmail, "loginButton"); MButton memoBackBtn = new MButton(LocalizationHelper.getMessage(AppUI.getDefaultLocale(), ShellI18nEnum.BUTTON_IGNORE_RESET_PASSWORD), clickEvent -> EventBusFactory.getInstance().post(new ShellEvent.LogOut(this, null))) .withStyleName(WebThemes.BUTTON_LINK); customLayout.addComponent(memoBackBtn, "forgotLink"); this.setCompositionRoot(customLayout); }
private CustomLayout createTopMenu() { headerLayout = CustomLayoutExt.createLayout("topNavigation"); headerLayout.setStyleName("topNavigation"); headerLayout.setHeight("45px"); headerLayout.setWidth("100%"); final PopupButton modulePopup = new PopupButton(""); modulePopup.setIcon(AccountAssetsResolver.createLogoResource(AppUI.getBillingAccount().getLogopath(), 150)); modulePopup.setHeightUndefined(); modulePopup.setDirection(Alignment.BOTTOM_LEFT); OptionPopupContent modulePopupContent = new OptionPopupContent(); modulePopup.setContent(modulePopupContent); MButton projectModuleBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.MODULE_PROJECT), clickEvent -> { modulePopup.setPopupVisible(false); EventBusFactory.getInstance().post(new ShellEvent.GotoProjectModule(this, null)); }).withIcon(VaadinIcons.TASKS); modulePopupContent.addOption(projectModuleBtn); MButton crmModuleBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.MODULE_CRM), clickEvent -> { modulePopup.setPopupVisible(false); EventBusFactory.getInstance().post(new ShellEvent.GotoCrmModule(this, null)); }).withIcon(VaadinIcons.MONEY); modulePopupContent.addOption(crmModuleBtn); MButton fileModuleBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.MODULE_DOCUMENT), clickEvent -> { modulePopup.setPopupVisible(false); EventBusFactory.getInstance().post(new ShellEvent.GotoFileModule(this, null)); }).withIcon(VaadinIcons.SUITCASE); modulePopupContent.addOption(fileModuleBtn); MButton peopleBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.MODULE_PEOPLE), clickEvent -> { modulePopup.setPopupVisible(false); EventBusFactory.getInstance().post(new ShellEvent.GotoUserAccountModule(this, new String[]{"user", "list"})); }).withIcon(VaadinIcons.USERS); modulePopupContent.addOption(peopleBtn); headerLayout.addComponent(new MHorizontalLayout(modulePopup).alignAll(Alignment.MIDDLE_LEFT).withFullHeight(), "mainLogo"); accountLayout = new MHorizontalLayout().withMargin(new MarginInfo(false, true, false, false)).withHeight("45px"); accountLayout.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT); buildAccountMenuLayout(); headerLayout.addComponent(accountLayout, "accountMenu"); return headerLayout; }
@Override public void init() { m_log.debug("initializing"); setTheme("opennms"); final MapWidgetComponent mapPanel = new MapWidgetComponent(); mapPanel.setNodeDao(m_nodeDao); mapPanel.setAssetRecordDao(m_assetDao); mapPanel.setAlarmDao(m_alarmDao); mapPanel.setGeocoderService(m_geocoderService); mapPanel.setTransactionOperation(m_transaction); mapPanel.setSizeFull(); m_rootLayout = new AbsoluteLayout(); m_rootLayout.setSizeFull(); m_window = new Window("OpenNMS Node Maps"); m_window.setContent(m_rootLayout); m_window.addParameterHandler(new ParameterHandler() { @Override public void handleParameters(final Map<String, String[]> parameters) { if (parameters.containsKey("search")) { mapPanel.setSearchString(parameters.get("search")[0].toString()); /* int nodeId = parseInt(parameters.get("nodeId")[0], 0); if (nodeId > 0) { mapPanel.setSearchString("nodeId=" + nodeId); } */ } } }); setMainWindow(m_window); String mapLayerPosition = "top:0px; left:0px; right:0px; bottom:0px;"; if (m_headerHtml != null) { final Panel header = new Panel("header"); header.setCaption(null); header.setSizeUndefined(); header.addStyleName("onmsheader"); InputStream is = null; try { is = new ByteArrayInputStream(m_headerHtml.getBytes()); final CustomLayout layout = new CustomLayout(is); header.setContent(layout); m_rootLayout.addComponent(header, "top: 0px; left: 0px; right:0px;"); mapLayerPosition = "top:100px; left:0px; right:0px; bottom:0px;"; } catch (final IOException e) { if (is != null) { try { is.close(); } catch (final IOException closeE) { VConsole.log("failed to close HTML input stream"); VConsole.log(closeE); } } VConsole.log("failed to get header layout data"); VConsole.log(e); } } m_rootLayout.addComponent(mapPanel, mapLayerPosition); final Refresher refresher = new Refresher(); refresher.setRefreshInterval(REFRESH_INTERVAL); m_window.addComponent(refresher); }
@Override public CustomLayout getLayout (String templatePath) { return null; }
protected CustomLayout getLayout() { return layout; }
/** * Adds the component into this container to given location. If the location * is already populated, the old component is removed. * * @param c * the component to be added. * @param location * the location of the component. * @return this for method chaining * @see CustomLayout#addComponent(Component, String) */ @SuppressWarnings("unchecked") public default THIS withComponent(Component c, String location) { ((CustomLayout) this).addComponent(c, location); return (THIS) this; }