@AutoGenerated private AbsoluteLayout buildAbsLCaracteristicas2() { // common part: create layout absLCaracteristicas2 = new AbsoluteLayout(); absLCaracteristicas2.setImmediate(false); absLCaracteristicas2.setWidth("100.0%"); absLCaracteristicas2.setHeight("45px"); // cmbEtapa cmbEtapa = new ComboBox(); cmbEtapa.setCaption("Etapa Fenológica"); cmbEtapa.setImmediate(false); cmbEtapa.setWidth("250px"); cmbEtapa.setHeight("25px"); absLCaracteristicas2.addComponent(cmbEtapa, "top:18.0px;left:10.0px;"); // txtSupRegada txtSupRegada = new TextField(); txtSupRegada.setCaption("Superficie Regada"); txtSupRegada.setImmediate(false); txtSupRegada.setWidth("100px"); txtSupRegada.setHeight("25px"); absLCaracteristicas2.addComponent(txtSupRegada, "top:18.0px;left:280.0px;"); // lblSupRegada lblSupRegada = new Label(); lblSupRegada.setImmediate(false); lblSupRegada.setWidth("-1px"); lblSupRegada.setHeight("-1px"); lblSupRegada.setValue("ha"); absLCaracteristicas2.addComponent(lblSupRegada, "top:22.0px;left:385.0px;"); // txtProfRaices txtProfRaices = new TextField(); txtProfRaices.setCaption("Prof. de Raíces"); txtProfRaices.setImmediate(false); txtProfRaices.setWidth("100px"); txtProfRaices.setHeight("25px"); absLCaracteristicas2.addComponent(txtProfRaices, "top:18.0px;left:415.0px;"); // lblProfRaices lblProfRaices = new Label(); lblProfRaices.setImmediate(false); lblProfRaices.setWidth("-1px"); lblProfRaices.setHeight("-1px"); lblProfRaices.setValue("cm"); absLCaracteristicas2.addComponent(lblProfRaices, "top:22.0px;left:520.0px;"); return absLCaracteristicas2; }
@AutoGenerated private VerticalLayout buildVerticalLayout_2() { // common part: create layout verticalLayout_2 = new VerticalLayout(); verticalLayout_2.setImmediate(false); verticalLayout_2.setWidth("-1px"); verticalLayout_2.setHeight("-1px"); verticalLayout_2.setMargin(false); // label_1 label_1 = new Label(); label_1.setStyleName("h1"); label_1.setImmediate(false); label_1.setWidth("-1px"); label_1.setHeight("-1px"); label_1.setValue("Filtro de Busqueda de Usuarios"); verticalLayout_2.addComponent(label_1); // horizontalLayout_3 horizontalLayout_3 = buildHorizontalLayout_3(); verticalLayout_2.addComponent(horizontalLayout_3); // tblUsuarios tblUsuarios = new Table(); tblUsuarios.setImmediate(false); tblUsuarios.setWidth("650px"); tblUsuarios.setHeight("430px"); verticalLayout_2.addComponent(tblUsuarios); return verticalLayout_2; }
@AutoGenerated private HorizontalLayout buildEmailDiv() { // common part: create layout emailDiv = new HorizontalLayout(); emailDiv.setImmediate(false); emailDiv.setWidth("291px"); emailDiv.setHeight("100.0%"); emailDiv.setMargin(false); // emailLabel emailLabel = new Label(); emailLabel.setStyleName("emailLabel"); emailLabel.setImmediate(false); emailLabel.setWidth("63px"); emailLabel.setHeight("15px"); emailLabel.setValue("Email:"); emailDiv.addComponent(emailLabel); emailDiv.setComponentAlignment(emailLabel, new Alignment(9)); // email email = new TextField(); email.setCaption("Email Required"); email.setImmediate(false); email.setWidth("197px"); email.setHeight("18px"); email.setRequired(true); email.setSecret(false); emailDiv.addComponent(email); emailDiv.setComponentAlignment(email, new Alignment(34)); return emailDiv; }
@AutoGenerated private AbsoluteLayout buildMainLayout() { // common part: create layout mainLayout = new AbsoluteLayout(); mainLayout.setImmediate(false); mainLayout.setWidth("100%"); mainLayout.setHeight("100%"); mainLayout.setMargin(false); // top-level component properties setWidth("100.0%"); setHeight("100.0%"); // mainMenu mainMenu = buildMenuBar(); mainLayout.addComponent(mainMenu, "top:0.0px;left:0.0px;"); // titleLabel titleLabel = new Label(); titleLabel.setStyleName("titleLabel"); titleLabel.setImmediate(false); titleLabel.setWidth("540px"); titleLabel.setHeight("40px"); titleLabel.setValue("Naslov"); mainLayout.addComponent(titleLabel, "top:40.0px;left:20.0px;"); loginComponent = new LoginComponent(this); mainLayout.addComponent(loginComponent, "top:30.0px;left:700.0px;"); // productSearchSplit productSearchSplit = buildProductSearchSplit(); mainLayout.addComponent(productSearchSplit, "top:100.0px;left:10.0px;"); return mainLayout; }
@AutoGenerated private HorizontalLayout buildPasswordDiv() { // common part: create layout passwordDiv = new HorizontalLayout(); passwordDiv.setImmediate(false); passwordDiv.setDescription("Your password"); passwordDiv.setWidth("291px"); passwordDiv.setHeight("34px"); passwordDiv.setMargin(false); // passwordLabel passwordLabel = new Label(); passwordLabel.setImmediate(false); passwordLabel.setWidth("80px"); passwordLabel.setHeight("20px"); passwordLabel.setValue("Password:"******"Need Password"); passwordField.setImmediate(false); passwordField.setWidth("197px"); passwordField.setHeight("20px"); passwordField.setRequired(true); passwordDiv.addComponent(passwordField); passwordDiv.setComponentAlignment(passwordField, new Alignment(34)); return passwordDiv; }
@AutoGenerated private HorizontalLayout buildLastNameDiv() { // common part: create layout lastNameDiv = new HorizontalLayout(); lastNameDiv.setImmediate(false); lastNameDiv.setWidth("291px"); lastNameDiv.setHeight("45px"); lastNameDiv.setMargin(false); // lastNameLabel lastNameLabel = new Label(); lastNameLabel.setStyleName("lastNameLabel"); lastNameLabel.setImmediate(false); lastNameLabel.setWidth("69px"); lastNameLabel.setHeight("60.0%"); lastNameLabel.setValue("Last Name:"); lastNameDiv.addComponent(lastNameLabel); lastNameDiv.setComponentAlignment(lastNameLabel, new Alignment(9)); // lastName lastName = new TextField(); lastName.setStyleName("lastName"); lastName.setCaption("Last Name Required:"); lastName.setImmediate(false); lastName.setWidth("202px"); lastName.setHeight("20px"); lastName.setRequired(true); lastName.setSecret(false); lastNameDiv.addComponent(lastName); lastNameDiv.setComponentAlignment(lastName, new Alignment(34)); return lastNameDiv; }
@AutoGenerated private HorizontalLayout buildCompanyDiv() { // common part: create layout companyDiv = new HorizontalLayout(); companyDiv.setImmediate(false); companyDiv.setWidth("299px"); companyDiv.setHeight("31px"); companyDiv.setMargin(false); // companyLabel companyLabel = new Label(); companyLabel.setStyleName("companyLabel"); companyLabel.setImmediate(false); companyLabel.setWidth("63px"); companyLabel.setHeight("15px"); companyLabel.setValue("Company:"); companyDiv.addComponent(companyLabel); // company company = new TextField(); company.setImmediate(false); company.setWidth("202px"); company.setHeight("20px"); company.setRequired(true); company.setSecret(false); companyDiv.addComponent(company); companyDiv.setComponentAlignment(company, new Alignment(34)); return companyDiv; }
@AutoGenerated private HorizontalLayout buildConfirmDiv() { // common part: create layout confirmDiv = new HorizontalLayout(); confirmDiv.setImmediate(false); confirmDiv.setWidth("100.0%"); confirmDiv.setHeight("100.0%"); confirmDiv.setMargin(false); // confirmLabel confirmLabel = new Label(); confirmLabel.setImmediate(false); confirmLabel.setWidth("52px"); confirmLabel.setHeight("-1px"); confirmLabel.setValue("Confirm:"); confirmDiv.addComponent(confirmLabel); confirmDiv.setComponentAlignment(confirmLabel, new Alignment(9)); // passwordConfirm passwordConfirm = new PasswordField(); passwordConfirm.setCaption("Need confirm password:"******"195px"); passwordConfirm.setHeight("20px"); passwordConfirm.setRequired(true); confirmDiv.addComponent(passwordConfirm); confirmDiv.setExpandRatio(passwordConfirm, 1.0f); confirmDiv.setComponentAlignment(passwordConfirm, new Alignment(34)); return confirmDiv; }
@AutoGenerated private VerticalLayout buildVerticalLayout_2() { // common part: create layout verticalLayout_2 = new VerticalLayout(); verticalLayout_2.setImmediate(false); verticalLayout_2.setWidth("259px"); verticalLayout_2.setHeight("-1px"); verticalLayout_2.setMargin(false); // loginLabel loginLabel = new Label(); loginLabel.setImmediate(false); loginLabel.setWidth("200px"); loginLabel.setHeight("-1px"); loginLabel.setValue("Welcome to AppSyc!"); verticalLayout_2.addComponent(loginLabel); verticalLayout_2.setComponentAlignment(loginLabel, new Alignment(20)); // loginForm_2 loginForm_2 = new LoginForm(); loginForm_2.setStyleName("v-loginform"); loginForm_2.setImmediate(false); loginForm_2.setWidth("90.72%"); loginForm_2.setHeight("-1px"); verticalLayout_2.addComponent(loginForm_2); verticalLayout_2.setComponentAlignment(loginForm_2, new Alignment(48)); return verticalLayout_2; }
@AutoGenerated private GridLayout buildHeadLayout() { // common part: create layout headLayout = new GridLayout(); headLayout.setImmediate(false); headLayout.setWidth("-1px"); headLayout.setHeight("-1px"); headLayout.setMargin(false); headLayout.setSpacing(true); headLayout.setColumns(2); headLayout.setRows(2); // parameterTypeLabel parameterTypeLabel = new Label(); parameterTypeLabel.setImmediate(false); parameterTypeLabel.setWidth("-1px"); parameterTypeLabel.setHeight("-1px"); parameterTypeLabel.setValue("Type of Parameter"); headLayout.addComponent(parameterTypeLabel, 0, 0); // parameterType parameterType = new ComboBox(); parameterType.setImmediate(false); parameterType.setWidth("-1px"); parameterType.setHeight("-1px"); headLayout.addComponent(parameterType, 1, 0); // parameterNameLabel parameterNameLabel = new Label(); parameterNameLabel.setImmediate(false); parameterNameLabel.setWidth("-1px"); parameterNameLabel.setHeight("-1px"); parameterNameLabel.setValue("Parameter"); headLayout.addComponent(parameterNameLabel, 0, 1); headLayout.setComponentAlignment(parameterNameLabel, new Alignment(6)); // parameterName parameterName = new TextField(); parameterName.setImmediate(false); parameterName.setWidth("-1px"); parameterName.setHeight("-1px"); parameterName.setRequired(true); headLayout.addComponent(parameterName, 1, 1); return headLayout; }
@AutoGenerated private HorizontalLayout buildLytFormulario2() { // common part: create layout lytFormulario2 = new HorizontalLayout(); lytFormulario2.setImmediate(false); lytFormulario2.setWidth("-1px"); lytFormulario2.setHeight("-1px"); lytFormulario2.setMargin(false); lytFormulario2.setSpacing(true); // lblFechaRecepcion lblFechaRecepcion = new Label(); lblFechaRecepcion.setImmediate(false); lblFechaRecepcion.setWidth("160px"); lblFechaRecepcion.setHeight("-1px"); lblFechaRecepcion.setValue("Fecha Recepcion Notificacion"); lytFormulario2.addComponent(lblFechaRecepcion); // dtFechaRecepcion dtFechaRecepcion = new PopupDateField(); dtFechaRecepcion.setImmediate(false); dtFechaRecepcion.setWidth("150px"); dtFechaRecepcion.setHeight("-1px"); dtFechaRecepcion.setResolution(4); lytFormulario2.addComponent(dtFechaRecepcion); // lblFechaVencimiento lblFechaVencimiento = new Label(); lblFechaVencimiento.setImmediate(false); lblFechaVencimiento.setWidth("160px"); lblFechaVencimiento.setHeight("-1px"); lblFechaVencimiento.setValue("Fecha Vencimiento PRI"); lytFormulario2.addComponent(lblFechaVencimiento); // dtFechaVencimiento dtFechaVencimiento = new PopupDateField(); dtFechaVencimiento.setImmediate(false); dtFechaVencimiento.setWidth("150px"); dtFechaVencimiento.setHeight("-1px"); dtFechaVencimiento.setResolution(4); lytFormulario2.addComponent(dtFechaVencimiento); return lytFormulario2; }
@AutoGenerated private HorizontalLayout buildLytFormulario3() { // common part: create layout lytFormulario3 = new HorizontalLayout(); lytFormulario3.setImmediate(false); lytFormulario3.setWidth("-1px"); lytFormulario3.setHeight("-1px"); lytFormulario3.setMargin(false); lytFormulario3.setSpacing(true); // lblFechaPlazo lblFechaPlazo = new Label(); lblFechaPlazo.setImmediate(false); lblFechaPlazo.setWidth("160px"); lblFechaPlazo.setHeight("-1px"); lblFechaPlazo.setValue("Fecha Plazo Fundamentar"); lytFormulario3.addComponent(lblFechaPlazo); // dtFechaPlazo dtFechaPlazo = new PopupDateField(); dtFechaPlazo.setImmediate(false); dtFechaPlazo.setWidth("150px"); dtFechaPlazo.setHeight("-1px"); dtFechaPlazo.setResolution(4); lytFormulario3.addComponent(dtFechaPlazo); // lblEstadoNotificacion lblEstadoNotificacion = new Label(); lblEstadoNotificacion.setImmediate(false); lblEstadoNotificacion.setWidth("160px"); lblEstadoNotificacion.setHeight("-1px"); lblEstadoNotificacion.setValue("Estado Notificacion"); lytFormulario3.addComponent(lblEstadoNotificacion); // cmbEstadoNotificacion cmbEstadoNotificacion = new ComboBoxLOVS(); cmbEstadoNotificacion.setImmediate(false); cmbEstadoNotificacion.setWidth("150px"); cmbEstadoNotificacion.setHeight("-1px"); lytFormulario3.addComponent(cmbEstadoNotificacion); return lytFormulario3; }
@AutoGenerated private AbsoluteLayout buildAbsLCaracteristicas3() { // common part: create layout absLCaracteristicas3 = new AbsoluteLayout(); absLCaracteristicas3.setImmediate(false); absLCaracteristicas3.setWidth("100.0%"); absLCaracteristicas3.setHeight("45px"); // txtHumIni txtHumIni = new TextField(); txtHumIni.setCaption("Cont. de Hum. Inicial"); txtHumIni.setImmediate(false); txtHumIni.setWidth("150px"); txtHumIni.setHeight("25px"); absLCaracteristicas3.addComponent(txtHumIni, "top:18.0px;left:10.0px;"); // lblHumIni lblHumIni = new Label(); lblHumIni.setImmediate(false); lblHumIni.setWidth("-1px"); lblHumIni.setHeight("-1px"); lblHumIni.setValue("cm³/cm³"); absLCaracteristicas3.addComponent(lblHumIni, "top:22.0px;left:165.0px;"); // txtHumSat txtHumSat = new TextField(); txtHumSat.setCaption("Cont. de Hum. Saturación"); txtHumSat.setImmediate(false); txtHumSat.setWidth("150px"); txtHumSat.setHeight("25px"); absLCaracteristicas3.addComponent(txtHumSat, "top:18.0px;left:230.0px;"); // lblHumSat lblHumSat = new Label(); lblHumSat.setImmediate(false); lblHumSat.setWidth("-1px"); lblHumSat.setHeight("-1px"); lblHumSat.setValue("cm³/cm³"); absLCaracteristicas3.addComponent(lblHumSat, "top:22.0px;left:385.0px;"); return absLCaracteristicas3; }
@AutoGenerated private AbsoluteLayout buildAbsLCaracteristicas4() { // common part: create layout absLCaracteristicas4 = new AbsoluteLayout(); absLCaracteristicas4.setImmediate(false); absLCaracteristicas4.setWidth("100.0%"); absLCaracteristicas4.setHeight("45px"); // txtTirante txtTirante = new TextField(); txtTirante.setCaption("Tirante del Surco o Melga"); txtTirante.setImmediate(false); txtTirante.setWidth("150px"); txtTirante.setHeight("25px"); absLCaracteristicas4.addComponent(txtTirante, "top:18.0px;left:10.0px;"); // lblTirante lblTirante = new Label(); lblTirante.setImmediate(false); lblTirante.setWidth("-1px"); lblTirante.setHeight("-1px"); lblTirante.setValue("cm"); absLCaracteristicas4.addComponent(lblTirante, "top:22.0px;left:165.0px;"); // txtGasto txtGasto = new TextField(); txtGasto.setCaption("Gasto en Surco o Melga"); txtGasto.setImmediate(false); txtGasto.setWidth("150px"); txtGasto.setHeight("25px"); absLCaracteristicas4.addComponent(txtGasto, "top:18.0px;left:230.0px;"); // lblGasto lblGasto = new Label(); lblGasto.setImmediate(false); lblGasto.setWidth("-1px"); lblGasto.setHeight("-1px"); lblGasto.setValue("L/s"); absLCaracteristicas4.addComponent(lblGasto, "top:22.0px;left:385.0px;"); return absLCaracteristicas4; }
@AutoGenerated private HorizontalLayout buildLytFormulario1() { // common part: create layout lytFormulario1 = new HorizontalLayout(); lytFormulario1.setImmediate(false); lytFormulario1.setWidth("-1px"); lytFormulario1.setHeight("-1px"); lytFormulario1.setMargin(false); lytFormulario1.setSpacing(true); // lblUnidadProcuraduria lblUnidadProcuraduria = new Label(); lblUnidadProcuraduria.setImmediate(false); lblUnidadProcuraduria.setWidth("160px"); lblUnidadProcuraduria.setHeight("-1px"); lblUnidadProcuraduria.setValue("Unidad Procuraduria"); lytFormulario1.addComponent(lblUnidadProcuraduria); // cmbUnidadProcuraduria cmbUnidadProcuraduria = new ComboBox(); cmbUnidadProcuraduria.setImmediate(false); cmbUnidadProcuraduria.setWidth("150px"); cmbUnidadProcuraduria.setHeight("-1px"); lytFormulario1.addComponent(cmbUnidadProcuraduria); // lblTipoNotificacion lblTipoNotificacion = new Label(); lblTipoNotificacion.setImmediate(false); lblTipoNotificacion.setWidth("160px"); lblTipoNotificacion.setHeight("-1px"); lblTipoNotificacion.setValue("Tipo Notificacion"); lytFormulario1.addComponent(lblTipoNotificacion); // cmbTipoNotificacion cmbTipoNotificacion = new ComboBoxLOVS(); cmbTipoNotificacion.setImmediate(false); cmbTipoNotificacion.setWidth("150px"); cmbTipoNotificacion.setHeight("-1px"); lytFormulario1.addComponent(cmbTipoNotificacion); return lytFormulario1; }
@AutoGenerated private AbsoluteLayout buildAbsLCaracteristicas5() { // common part: create layout absLCaracteristicas5 = new AbsoluteLayout(); absLCaracteristicas5.setImmediate(false); absLCaracteristicas5.setWidth("100.0%"); absLCaracteristicas5.setHeight("55px"); // txtLamApl txtLamApl = new TextField(); txtLamApl.setCaption("Lámina Aplicada"); txtLamApl.setImmediate(false); txtLamApl.setWidth("150px"); txtLamApl.setHeight("25px"); absLCaracteristicas5.addComponent(txtLamApl, "top:18.0px;left:10.0px;"); // lblLamApl lblLamApl = new Label(); lblLamApl.setImmediate(false); lblLamApl.setWidth("-1px"); lblLamApl.setHeight("-1px"); lblLamApl.setValue("cm"); absLCaracteristicas5.addComponent(lblLamApl, "top:22.0px;left:165.0px;"); // txtLamCalc txtLamCalc = new TextField(); txtLamCalc.setCaption("Lámina Calculada"); txtLamCalc.setImmediate(false); txtLamCalc.setWidth("150px"); txtLamCalc.setHeight("25px"); absLCaracteristicas5.addComponent(txtLamCalc, "top:18.0px;left:230.0px;"); // lblLamCalc lblLamCalc = new Label(); lblLamCalc.setImmediate(false); lblLamCalc.setWidth("-1px"); lblLamCalc.setHeight("-1px"); lblLamCalc.setValue("cm"); absLCaracteristicas5.addComponent(lblLamCalc, "top:22.0px;left:385.0px;"); return absLCaracteristicas5; }
BuilderDrawer() { if (drawerResource != null) { Embedded drawerBkg = new Embedded(null, drawerResource); addComponent(drawerBkg, "top:0px;left:0px"); } content = new TextArea(); // only shows if no focus, and if we don't have focus, it's not normally showing // content.setInputPrompt("Type here to add to this card chain."); content.setWordwrap(true); content.setImmediate(true); content.setTextChangeEventMode(TextChangeEventMode.LAZY); content.setTextChangeTimeout(500); // cause exception w/ 2 windows? // content.setDebugId(CardTypeManager.getCardContentDebugId(ct)); content.setId( CardDebug.getCardContentDebugId(ct)); // CardTypeManager.getCardContentDebugId(ct)); content.addTextChangeListener(new characterTypedHandler()); content.setWidth(CARDLISTHEADER_DRAWER_TEXT_W); content.setHeight(CARDLISTHEADER_DRAWER_TEXT_H); content.addStyleName("m-white-background"); addComponent(content, CARDLISTHEADER_DRAWER_TEXT_POS); count = new Label("0/140"); count.setWidth(CARDLISTHEADER_DRAWER_COUNT_W); count.setHeight(CARDLISTHEADER_DRAWER_COUNT_H); count.addStyleName("m-cardbuilder-count-text"); addComponent(count, CARDLISTHEADER_DRAWER_COUNT_POS); cancelButt = new NativeButton("cancel"); cancelButt.setWidth(CARDLISTHEADER_DRAWER_CANCEL_W); cancelButt.setHeight(CARDLISTHEADER_DRAWER_CANCEL_H); cancelButt.addStyleName("borderless"); cancelButt.addStyleName("m-cardbuilder-button-text"); cancelButt.addClickListener(new CancelHandler()); addComponent(cancelButt, CARDLISTHEADER_DRAWER_CANCEL_POS); submitButt = new NativeButton("submit"); // cause exception w/ 2 windows? // submitButt.setDebugId(CardTypeManager.getCardSubmitDebugId(ct)); submitButt.setId( CardDebug.getCardSubmitDebugId(ct)); // CardTypeManager.getCardSubmitDebugId(ct)); submitButt.setWidth(CARDLISTHEADER_DRAWER_OKBUTT_W); submitButt.setHeight(CARDLISTHEADER_DRAWER_OKBUTT_H); submitButt.addStyleName("borderless"); submitButt.addStyleName("m-cardbuilder-button-text"); submitButt.addClickListener(new CardPlayHandler()); addComponent(submitButt, CARDLISTHEADER_DRAWER_OKBUTT_POS); setWidth(CARDLISTHEADER_DRAWER_W); setHeight(CARDLISTHEADER_DRAWER_H); }
@AutoGenerated private AbsoluteLayout buildAbsLAvance() { // common part: create layout absLAvance = new AbsoluteLayout(); absLAvance.setImmediate(false); absLAvance.setWidth("100.0%"); absLAvance.setHeight("55px"); // txtNoAvance txtNoAvance = new TextField(); txtNoAvance.setCaption("Núm."); txtNoAvance.setImmediate(false); txtNoAvance.setWidth("60px"); txtNoAvance.setHeight("25px"); absLAvance.addComponent(txtNoAvance, "top:28.0px;left:10.0px;"); // txtDistancia txtDistancia = new TextField(); txtDistancia.setCaption("Distancia"); txtDistancia.setImmediate(false); txtDistancia.setWidth("100px"); txtDistancia.setHeight("25px"); absLAvance.addComponent(txtDistancia, "top:28.0px;left:85.0px;"); // lblDistancia lblDistancia = new Label(); lblDistancia.setImmediate(false); lblDistancia.setWidth("-1px"); lblDistancia.setHeight("-1px"); lblDistancia.setValue("m"); absLAvance.addComponent(lblDistancia, "top:32.0px;left:190.0px;"); // tmfAvance tmfAvance = new TimeField(); tmfAvance.setCaption("Avance"); tmfAvance.setImmediate(false); tmfAvance.setWidth("-1px"); tmfAvance.setHeight("25px"); absLAvance.addComponent(tmfAvance, "top:28.0px;left:215.0px;"); // tmfRecesion tmfRecesion = new TimeField(); tmfRecesion.setCaption("Recesión"); tmfRecesion.setImmediate(false); tmfRecesion.setWidth("-1px"); tmfRecesion.setHeight("25px"); absLAvance.addComponent(tmfRecesion, "top:28.0px;left:330.0px;"); return absLAvance; }
private void initializedPerspectiveSwticherPanel(MPerspectiveStack perspectiveStack) { if (perspectiveSwitcherPanel != null) return; // initialize perspective switcher panel perspectiveStackForSwitcher = perspectiveStack; boolean iconsOnly = perspectiveStackForSwitcher.getTags().contains(Tags.ICONS_ONLY); perspectiveSwitcherPanel = new HorizontalLayout(); perspectiveSwitcherPanel.setStyleName("perspectivepanel"); perspectiveSwitcherPanel.setSizeUndefined(); Button openPerspectiveButton = new Button("Open"); openPerspectiveButton.addStyleName("vaaclipsebutton"); openPerspectiveButton.addStyleName("icononly"); openPerspectiveButton.setIcon( new ThemeResource("../vaaclipse_default_theme/img/open_perspective.png")); perspectiveSwitcherPanel.addComponent(openPerspectiveButton); openPerspectiveButton.addListener( new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { openOpenPerspectiveWindow(); // change focus Component parent = event.getButton().getParent(); while (parent != null) { if (parent instanceof Component.Focusable) { ((Component.Focusable) parent).focus(); break; } else { parent = parent.getParent(); } } } }); // add separator between openPerspectiveButton and perspective's buttons Label separator = new Label(); separator.setSizeUndefined(); separator.addStyleName("horizontalseparator"); separator.setHeight("100%"); perspectiveSwitcherPanel.addComponent(separator); // add buttons to perspective switch panel for (final MPerspective perspective : perspectiveStackForSwitcher.getChildren()) { Component button = createPerspectiveButton(perspective); if (button != null) perspectiveSwitcherPanel.addComponent(button); } }
BasicInfo() { setCaption(ViewProperties.getCaption("table.serverBasicInfo")); setHeight("100%"); setStyleName("server-desc-basic-panel"); VerticalLayout vlay = (VerticalLayout) getContent(); vlay.setStyleName("server-desc-basic-panel"); vlay.setMargin(true); layout = new GridLayout(2, CAPNAME.length); layout.setWidth("100%"); layout.setStyleName("server-desc-basic-info"); layout.setColumnExpandRatio(0, 35); layout.setColumnExpandRatio(1, 65); vlay.addComponent(layout); // 項目名設定 for (int i = 0; i < CAPNAME.length; i++) { Label lbl1 = new Label(CAPNAME[i], Label.CONTENT_XHTML); Label lbl2 = new Label(""); lbl1.setHeight(COLUMN_HEIGHT); layout.addComponent(lbl1, 0, i); layout.addComponent(lbl2, 1, i); } // EC2 Windows用パスワード取得ボタン getPassword = new Button(ViewProperties.getCaption("button.getPassword")); getPassword.setDescription(ViewProperties.getCaption("description.getPassword")); getPassword.setIcon(Icons.LOGIN.resource()); getPassword.addStyleName("getpassword"); getPassword.addListener( new ClickListener() { @Override public void buttonClick(ClickEvent event) { AutoApplication ap = (AutoApplication) getApplication(); InstanceDto dto = (InstanceDto) ap.myCloud.myCloudTabs.serverTable.getValue(); Long instanceNo = (Long) getPassword.getData(); WinPassword winPassword = new WinPassword(dto, instanceNo); getWindow().addWindow(winPassword); } }); }
public ServerDescBasic() { setHeight("100%"); addStyleName(Reindeer.PANEL_LIGHT); VerticalLayout panel = (VerticalLayout) getContent(); panel.setWidth("100%"); panel.setHeight("100%"); panel.setMargin(true); panel.setSpacing(false); panel.addStyleName("server-desc-basic"); HorizontalLayout hlPanels = new HorizontalLayout(); hlPanels.setWidth("100%"); hlPanels.setHeight("100%"); hlPanels.setMargin(true); hlPanels.setSpacing(true); hlPanels.addStyleName("server-desc-basic"); // setContent(hlPanels); left.setWidth("100%"); right.setHeight("100%"); right.setWidth("100%"); // 表同士の間隔をあける Label padding = new Label(" "); padding.setWidth("7px"); padding.setHeight("99%"); padding.addStyleName("desc-padding"); Label padding2 = new Label(""); padding2.setWidth("1px"); hlPanels.addComponent(left); hlPanels.addComponent(padding); hlPanels.addComponent(padding2); hlPanels.addComponent(right); hlPanels.setExpandRatio(left, 40); hlPanels.setExpandRatio(right, 60); panel.addComponent(hlPanels); panel.setExpandRatio(hlPanels, 1.0f); }
@AutoGenerated private VerticalLayout buildForgotUserNameDiv() { // common part: create layout forgotUserNameDiv = new VerticalLayout(); forgotUserNameDiv.setImmediate(false); forgotUserNameDiv.setWidth("243px"); forgotUserNameDiv.setHeight("128px"); forgotUserNameDiv.setMargin(false); // forgotUserNameLabel forgotUserNameLabel = new Label(); forgotUserNameLabel.setImmediate(false); forgotUserNameLabel.setWidth("-1px"); forgotUserNameLabel.setHeight("-1px"); forgotUserNameLabel.setValue("Forgot User name? Type email below."); forgotUserNameDiv.addComponent(forgotUserNameLabel); // forgotUserName forgotUserName = new TextField(); forgotUserName.setStyleName("forgotUserName"); forgotUserName.setCaption("Please type an email."); forgotUserName.setImmediate(false); forgotUserName.setWidth("203px"); forgotUserName.setHeight("28px"); forgotUserName.setRequired(true); forgotUserName.setSecret(false); forgotUserNameDiv.addComponent(forgotUserName); // sendEmail sendEmail = new Button(); sendEmail.setCaption("Send email"); sendEmail.setImmediate(true); sendEmail.setWidth("203px"); sendEmail.setHeight("-1px"); forgotUserNameDiv.addComponent(sendEmail); return forgotUserNameDiv; }
@AutoGenerated private VerticalLayout buildVerticalLayout_1() { // common part: create layout verticalLayout_1 = new VerticalLayout(); verticalLayout_1.setImmediate(false); verticalLayout_1.setWidth("256px"); verticalLayout_1.setHeight("128px"); verticalLayout_1.setMargin(false); // forgotPasswordLabel2 forgotPasswordLabel2 = new Label(); forgotPasswordLabel2.setImmediate(false); forgotPasswordLabel2.setWidth("239px"); forgotPasswordLabel2.setHeight("18px"); forgotPasswordLabel2.setValue("Forgot Password? Type username below."); verticalLayout_1.addComponent(forgotPasswordLabel2); // userName userName = new TextField(); userName.setCaption("Please type user name."); userName.setImmediate(false); userName.setWidth("219px"); userName.setHeight("28px"); userName.setRequired(true); userName.setSecret(false); verticalLayout_1.addComponent(userName); // sendReset sendReset = new Button(); sendReset.setCaption("Send email"); sendReset.setImmediate(true); sendReset.setWidth("199px"); sendReset.setHeight("-1px"); verticalLayout_1.addComponent(sendReset); return verticalLayout_1; }
// private VerticalLayout overallPlotLayout; public ProtOverviewLineChart(ComparisonProtein[] comparisonProteins, int width) { this.setHeight("100%"); this.initLineChart(); this.setWidthUndefined(); if (comparisonProteins.length == 1) { height = 110; } else { height = (comparisonProteins.length * 90) + 20; } this.setStyleName(Reindeer.LAYOUT_WHITE); DataSeries dataSeries = new DataSeries(); DataSeries dataSeries2 = dataSeries.newSeries(); DataSeries dataSeries1 = dataSeries.newSeries(); for (ComparisonProtein cp : comparisonProteins) { if (cp == null) { continue; } if (cp.getCellValue() < 0) { dataSeries1.add(cp.getComparison().getComparisonHeader(), cp.getCellValue() * 100); } dataSeries2.add(cp.getComparison().getComparisonHeader(), cp.getCellValue() * 100); } this.setHeight(height + "px"); VerticalLayout ticksLayout = new VerticalLayout(); ticksLayout.setWidth("80px"); ticksLayout.setHeight((height - 30) + "px"); ticksLayout.setStyleName(Reindeer.LAYOUT_WHITE); ticksLayout.setSpacing(false); ticksLayout.setMargin(new MarginInfo(false, false, false, true)); this.addComponent(ticksLayout); Label upLab = new Label("Up Reg"); upLab.setStyleName("upregchartlabel"); upLab.setHeight("30px"); ticksLayout.addComponent(upLab); ticksLayout.setComponentAlignment(upLab, Alignment.TOP_CENTER); // VerticalLayout subupLab = new VerticalLayout(); // subupLab.setStyleName(Reindeer.LAYOUT_BLUE); // subupLab.setHeight("100%"); // subupLab.setWidth("20px"); // ticksLayout.addComponent(subupLab); // ticksLayout.setExpandRatio(subupLab, 0.2f); // ticksLayout.setComponentAlignment(subupLab, Alignment.BOTTOM_CENTER); Label notLab = new Label("Not Reg"); notLab.setStyleName("notregchartlabel"); notLab.setHeight("30px"); ticksLayout.addComponent(notLab); ticksLayout.setComponentAlignment(notLab, Alignment.MIDDLE_CENTER); // VerticalLayout subdownLab = new VerticalLayout(); // subdownLab.setStyleName(Reindeer.LAYOUT_BLUE); // subdownLab.setHeight("100%"); // ticksLayout.addComponent(subdownLab); // ticksLayout.setComponentAlignment(subdownLab, Alignment.BOTTOM_CENTER); // ticksLayout.setExpandRatio(subdownLab, 0.2f); Label downLab = new Label("Down Reg"); downLab.setStyleName("downregchartlabel"); downLab.setHeight("30px"); ticksLayout.addComponent(downLab); ticksLayout.setComponentAlignment(downLab, Alignment.BOTTOM_CENTER); chart2 = new DCharts() .setDataSeries(dataSeries) .setOptions(options2) .setMarginLeft(0) .setMarginTop(0); // .show(); this.addComponent(chart2.show()); chart2.setWidth((width - 100) + "px"); chart2.setHeight("100%"); }
@SuppressWarnings("serial") @Override public void initGui() { addStyleName("m-cursor-pointer"); if (bckgrndResource != null) { Embedded bkgnd = new Embedded(null, bckgrndResource); addComponent(bkgnd, "top:0px;left:0px"); } final MmowgliSessionGlobals globs = Mmowgli2UI.getGlobals(); ct = CardType.getTL(ctId); String textColorStyle = CardStyler.getCardTextColorOverBaseStyle(ct); // nested abslay for the click handler AbsoluteLayout topHalfLay = new AbsoluteLayout(); topHalfLay.setWidth(CARDLISTHEADER_W); topHalfLay.setHeight(HEIGHT_NODRAWER); addComponent(topHalfLay, "top:0px;left:0px"); title.setValue(ct.getTitle()); // .toUpperCase()); title.setHeight(CARDLISTHEADER_TITLE_H); title.setWidth(CARDLISTHEADER_TITLE_W); title.addStyleName("m-cardsummarylist-header-title"); title.addStyleName("m-cursor-pointer"); title.addStyleName("m-vagabond-font"); if (textColorStyle != null) title.addStyleName(textColorStyle); topHalfLay.addComponent(title, CARDLISTHEADER_TITLE_POS); content.setValue(ct.getPrompt()); content.setHeight(CARDLISTHEADER_CONTENT_H); content.setWidth(CARDLISTHEADER_CONTENT_W); content.addStyleName("m-cardsummarylist-header-content"); content.addStyleName("m-cursor-pointer"); if (textColorStyle != null) content.addStyleName(textColorStyle); // cause exception w/ 2 windows? content.setId(CardDebug.getCardCreateClickDebugId(ct)); topHalfLay.addComponent(content, CARDLISTHEADER_CONTENT_POS); boolean cantCreateBecauseHiddenParent = checkNoCreateBecauseHiddenTL(parent); boolean cantCreateBecauseParentMarkedNoChild = false; // todo enable with gameswitch checkNoCreateBecauseParentMarkedNoChild(parent); if (globs.canCreateCard(ct.isIdeaCard())) { markedAsNoCreate = false; if (!cantCreateBecauseHiddenParent && !cantCreateBecauseParentMarkedNoChild) { // Add the text at the bottom Label lab; topHalfLay.addComponent(lab = new Label("click to add new"), "top:130px;left:75px"); lab.addStyleName("m-click-to-add-new"); if (textColorStyle != null) lab.addStyleName(textColorStyle); } } else markedAsNoCreate = true; drawerComponent = new BuilderDrawer(); addComponent(drawerComponent, CARDLISTHEADER_DRAWER_POS); drawerComponent.setVisible(false); setWidth(CARDLISTHEADER_W); setHeight(HEIGHT_NODRAWER); if (!mockupOnly) topHalfLay.addLayoutClickListener( new LayoutClickListener() { @Override @MmowgliCodeEntry @HibernateOpened @HibernateClosed public void layoutClick(LayoutClickEvent event) { HSess.init(); if (checkNoCreateBecauseHiddenTL( parent)) { // todo enable with game switch || // checkNoCreateBecauseParentMarkedNoChild(parent)) { if (drawerComponent.isVisible()) closeDrawer(); HSess.close(); return; } if (drawerComponent.isVisible()) closeDrawer(); else { CardPermission cp = globs.cardPermissionsCommon(ct.isIdeaCard()); if (!cp.canCreate) { if (!markedAsNoCreate) handleNoCreate(); Notification.show(cp.whyNot); } else { showDrawer(); handleCanCreate(); // reset tt, etc. if (newCardListener != null) newCardListener.drawerOpenedTL(ctId); } } HSess.close(); } }); if (cantCreateBecauseHiddenParent) handleNoCreate("Can't add card to hidden parent"); else if (cantCreateBecauseParentMarkedNoChild) handleNoCreate("New child cards cannot be added to this card"); else if (!globs.canCreateCard(ct.isIdeaCard())) handleNoCreate(); else setTooltip("Click to add card"); }
public FractionsLayout( final String accession, final double mw, Map<Integer, ProteinBean> proteinFractionAvgList, List<StandardProteinBean> standardProtPlotList, final String expName) { this.setSpacing(false); this.setWidth("100%"); this.setMargin(new MarginInfo(false, false, false, true)); final HorizontalLayout headerLayout = new HorizontalLayout(); headerLayout.setHeight("45px"); headerLayout.setSpacing(true); final HorizontalLayout clickableheaderLayout = new HorizontalLayout(); clickableheaderLayout.setHeight("45px"); clickableheaderLayout.setSpacing(true); headerLayout.addComponent(clickableheaderLayout); headerLayout.setComponentAlignment(clickableheaderLayout, Alignment.BOTTOM_LEFT); show = new ShowLabel(true); clickableheaderLayout.addComponent(show); clickableheaderLayout.setComponentAlignment(show, Alignment.BOTTOM_LEFT); stat = true; Label fractionLabel = new Label( "<h4 style='font-family:verdana;color:black;'>Fractions (Protein: " + accession + " MW: " + mw + " kDa)</h4>"); fractionLabel.setContentMode(Label.CONTENT_XHTML); fractionLabel.setHeight("45px"); clickableheaderLayout.addComponent(fractionLabel); clickableheaderLayout.setComponentAlignment(fractionLabel, Alignment.TOP_RIGHT); // Label infoLable = new Label("<center style='background-color:#E6E6FA;'><p // style='background-color:#E6E6FA;font-family:verdana;color:black;font-weight:bold;'>Bar charts // showing the distribution of the protein in the fractions cut from the gel.<br/>Three charts // show number of peptides, number of spectra and average precursor intensity.<br/>The fraction // number represents the gel pieces cut from top to bottom.<br/>Protein standards (dark blue // bars) indicate the molecular weight range of each fraction. Darker blue bars mark the area // where the protein's theoretical mass suggests the protein should occur. </p></center>"); // infoLable.setContentMode(Label.CONTENT_XHTML); // infoLable.setWidth("300px"); // infoLable.setStyleName(Reindeer.LAYOUT_BLUE); // // Help help = new Help(); // HorizontalLayout infoIco = help.getInfoNote(infoLable); // infoIco.setMargin(new MarginInfo(false, false, false, true)); // headerLayout.addComponent(infoIco); // headerLayout.setComponentAlignment(infoIco, Alignment.MIDDLE_LEFT); this.addComponent(headerLayout); mainLayout = new VerticalLayout(); this.addComponent(mainLayout); FractionPlotLayout plotsLayout = new FractionPlotLayout(proteinFractionAvgList, mw, standardProtPlotList); mainLayout.addComponent(plotsLayout); mainLayout.setComponentAlignment(plotsLayout, Alignment.MIDDLE_CENTER); HorizontalLayout lowerLayout = new HorizontalLayout(); lowerLayout.setWidth("100%"); lowerLayout.setHeight("25px"); lowerLayout.setMargin((new MarginInfo(false, true, false, true))); lowerLayout.setSpacing(false); // Panel toolbar = new Panel(lowerLayout); // toolbar.setStyleName(Reindeer.PANEL_LIGHT); //// toolbar.setHeight("35px"); // toolbar.setWidth("100%"); mainLayout.addComponent(lowerLayout); mainLayout.setComponentAlignment(lowerLayout, Alignment.TOP_CENTER); exportFracLayout.setWidth("300px"); lowerLayout.addComponent(exportFracLayout); lowerLayout.setComponentAlignment(exportFracLayout, Alignment.MIDDLE_RIGHT); lowerLayout.setExpandRatio(exportFracLayout, 0.1f); final Table fractTable = getFractionTable(proteinFractionAvgList); fractTable.setVisible(false); this.addComponent(fractTable); expBtnFracTable = new PopupView( "Export Fractions from Selected Dataset for ( " + accession + " )", new CustomExportBtnLayout( null, "fractions", 0, expName, accession, accession, null, null, 0, null, fractTable, null)); expBtnFracTable.setDescription( "Export Fractions from ( " + expName + " ) Dataset for ( " + accession + " )"); // expBtnFracTable = new Help().getExpIcon(new CustomExportBtnLayout(null, "fractions", 0, // expName, accession, accession, null, null, 0, null, fractTable, null), "Export CSF-PR / // "+expName+" / Fractions", "Export CSF-PR / "+expName+" / Fractions"); exportFracLayout.addComponent(expBtnFracTable); exportFracLayout.setMargin(new MarginInfo(false, true, false, false)); exportFracLayout.setComponentAlignment(expBtnFracTable, Alignment.BOTTOM_RIGHT); clickableheaderLayout.addListener( new com.vaadin.event.LayoutEvents.LayoutClickListener() { @Override public void layoutClick(LayoutEvents.LayoutClickEvent event) { if (stat) { stat = false; show.updateIcon(false); mainLayout.setVisible(false); } else { stat = true; show.updateIcon(true); mainLayout.setVisible(true); } } }); }
private void buildView() { // main frame Panel pane = new Panel("Create New Password"); pane.setSizeUndefined(); // form layout mnth_sel = new NativeSelect("Birth Month"); mnth_sel.addItems( "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); mnth_sel.setValue("January"); mnth_sel.setMultiSelect(false); mnth_sel.setNullSelectionAllowed(false); mnth_sel.setImmediate(true); day_sel = new NativeSelect("Birth Day"); for (int i = 0; i < 31; i++) day_sel.addItem(i + 1); day_sel.setValue(1); day_sel.setMultiSelect(false); day_sel.setNullSelectionAllowed(false); day_sel.setImmediate(true); FormLayout form = new FormLayout(); form.setSizeUndefined(); form.addComponent(mnth_sel); form.addComponent(day_sel); // content layout info = new Label(); info.setSizeUndefined(); info.setValue("Please fill in all fields below"); question_txt = new TextArea("Security Question"); question_txt.setValue(emp.getRandomQuestion()); // query user for security question question_txt.setReadOnly(true); question_txt.setRows(2); question_txt.setWidth("20em"); ans_txt = new TextArea("Answer"); ans_txt.setRows(2); ans_txt.setWidth("20em"); Label gap = new Label(); gap.setHeight("1em"); submit = new Button("Continue"); submit.setDescription("Continue password creation!"); submit.setSizeFull(); submit.setStyleName("primary"); cancel = new Button("Cancel"); cancel.setDescription("Return to login screen!"); cancel.setSizeFull(); VerticalLayout content = new VerticalLayout(); content.setSizeUndefined(); content.setSpacing(true); content.setMargin(true); content.addComponent(info); content.setComponentAlignment(info, Alignment.MIDDLE_CENTER); content.addComponent(form); content.addComponent(question_txt); content.addComponent(ans_txt); content.addComponent(gap); content.addComponent(submit); content.addComponent(cancel); // add 'content' to 'main frame' pane.setContent(content); // root layout this.setMargin(true); this.addComponent(pane); this.setComponentAlignment(pane, Alignment.TOP_CENTER); // // user interaction // submit.addClickListener(event -> handleSubmit(event)); cancel.addClickListener(event -> handleCancel(event)); }
public ExceptionDialog(Throwable ex, String caption) { this.cause = ex; Preconditions.checkNotNull(ex); layout = new VerticalLayout(); setContent(layout); layout.setWidth("100%"); layout.setHeight("-1"); if (caption == null) { setCaption("Unexpected error"); } else { setCaption(caption); } Label lblInfo = new Label("An unexpected error occured.<br />The error message was:", ContentMode.HTML); lblInfo.setHeight("-1px"); lblInfo.setWidth("100%"); layout.addComponent(lblInfo); lblInfo.addStyleName("exception-message-caption"); String message = ex.getMessage(); if (message == null || message.isEmpty()) { message = "<no message>"; } Label lblMessage = new Label(message); lblMessage.addStyleName("exception-message-content"); lblMessage.setHeight("-1px"); lblMessage.setWidth("100%"); layout.addComponent(lblMessage); actionsLayout = new HorizontalLayout(); actionsLayout.addStyleName("exception-dlg-details"); actionsLayout.setWidth("100%"); actionsLayout.setHeight("-1px"); layout.addComponent(actionsLayout); btDetails = new Button("Show Details", this); btDetails.setStyleName(BaseTheme.BUTTON_LINK); actionsLayout.addComponent(btDetails); btReportBug = new Button("Report Problem", this); btReportBug.setStyleName(BaseTheme.BUTTON_LINK); btReportBug.setVisible(false); btReportBug.setIcon(FontAwesome.ENVELOPE_O); UI ui = UI.getCurrent(); if (ui instanceof SearchUI) { btReportBug.setVisible(((SearchUI) ui).canReportBugs()); } actionsLayout.addComponent(btReportBug); actionsLayout.setComponentAlignment(btDetails, Alignment.TOP_LEFT); actionsLayout.setComponentAlignment(btReportBug, Alignment.TOP_RIGHT); lblStacktrace = new Label(Helper.convertExceptionToMessage(ex), ContentMode.PREFORMATTED); detailsPanel = new Panel(lblStacktrace); detailsPanel.setWidth("100%"); detailsPanel.setHeight("300px"); detailsPanel.setVisible(false); lblStacktrace.setSizeUndefined(); lblStacktrace.setVisible(true); layout.addComponent(detailsPanel); btClose = new Button("OK", this); layout.addComponent(btClose); layout.setComponentAlignment(btClose, Alignment.BOTTOM_CENTER); layout.setExpandRatio(detailsPanel, 0.0f); layout.setExpandRatio(actionsLayout, 1.0f); }
public PeptidesTableLayout( final int validPep, final int totalPep, final String desc, final Map<Integer, PeptideBean> pepProtList, final String accession, final String expName) { // for peptides information (table) view MarginInfo m = new MarginInfo(false, false, true, false); this.setMargin(m); this.setSpacing(false); this.setWidth("100%"); final HorizontalLayout headerLayout = new HorizontalLayout(); headerLayout.setHeight("45px"); headerLayout.setSpacing(true); show = new ShowLabel(true); headerLayout.addComponent(show); headerLayout.setComponentAlignment(show, Alignment.BOTTOM_LEFT); stat = true; final Label pepLabel = new Label( "<h4 style='font-family:verdana;color:black;'>Peptides (" + validPep + ") " + desc + "</h4>"); // new Label("<h4 style='font-family:verdana;color:black;'>Peptides (" + validPep + "/" + // totalPep + ") " + desc + "</h4>"); pepLabel.setContentMode(Label.CONTENT_XHTML); pepLabel.setHeight("45px"); headerLayout.addComponent(pepLabel); headerLayout.setComponentAlignment(pepLabel, Alignment.TOP_RIGHT); this.addComponent(headerLayout); mainLayout = new VerticalLayout(); mainLayout.setWidth("100%"); this.addComponent(mainLayout); mainLayout.addComponent(pepTableLayout); mainLayout.setComponentAlignment(pepTableLayout, Alignment.MIDDLE_CENTER); Map<Integer, PeptideBean> vPepProtList = getValidatedList(pepProtList); vt = new PeptideTable(vPepProtList, null, false); pepTableLayout.addComponent(vt); if (trs != null) { PepSize = trs.getCurrentSize(); } vt.setHeight(PepSize); HorizontalLayout lowerLayout = new HorizontalLayout(); lowerLayout.setWidth("100%"); lowerLayout.setHeight("25px"); lowerLayout.setSpacing(false); // Panel toolbar = new Panel(lowerLayout); // toolbar.setStyleName(Reindeer.PANEL_LIGHT); // toolbar.setHeight("35px"); mainLayout.addComponent(lowerLayout); mainLayout.setComponentAlignment(lowerLayout, Alignment.TOP_CENTER); HorizontalLayout lowerLeftLayout = new HorizontalLayout(); lowerLayout.addComponent(lowerLeftLayout); lowerLeftLayout.setSpacing(true); lowerLeftLayout.setMargin(new MarginInfo(false, false, false, false)); lowerLayout.setComponentAlignment(lowerLeftLayout, Alignment.MIDDLE_LEFT); // lowerLayout.setExpandRatio(lowerLeftLayout, 0.4f); HorizontalLayout lowerRightLayout = new HorizontalLayout(); // lowerRightLayout.setSpacing(true); lowerRightLayout.setWidth("450px"); lowerLayout.addComponent(lowerRightLayout); lowerLayout.setComponentAlignment(lowerRightLayout, Alignment.BOTTOM_RIGHT); // lowerLayout.setExpandRatio(lowerRightLayout, 0.5f); final OptionGroup selectionType = new OptionGroup(); selectionType.setMultiSelect(true); selectionType.addItem("\t\tShow Validated Peptides Only"); selectionType.select("\t\tShow Validated Peptides Only"); selectionType.setHeight("15px"); lowerLeftLayout.addComponent(selectionType); lowerLeftLayout.setComponentAlignment(selectionType, Alignment.BOTTOM_LEFT); final TableResizeSet trs1 = new TableResizeSet(vt, PepSize); // resize tables lowerLeftLayout.addComponent(trs1); lowerLeftLayout.setComponentAlignment(trs1, Alignment.BOTTOM_LEFT); exportPepLayout.setWidth("300px"); lowerRightLayout.addComponent(exportPepLayout); lowerRightLayout.setComponentAlignment(exportPepLayout, Alignment.BOTTOM_RIGHT); mainLayout.setSpacing(true); headerLayout.addListener( new com.vaadin.event.LayoutEvents.LayoutClickListener() { @Override public void layoutClick(LayoutEvents.LayoutClickEvent event) { if (stat) { stat = false; show.updateIcon(false); mainLayout.setVisible(false); } else { stat = true; show.updateIcon(true); mainLayout.setVisible(true); } } }); selectionType.setImmediate(true); selectionType.addListener( new Property.ValueChangeListener() { @Override public void valueChange(Property.ValueChangeEvent event) { if (selectionType.isSelected("\t\tShow Validated Peptides Only")) { headerLayout.removeAllComponents(); headerLayout.addComponent(show); headerLayout.setComponentAlignment(show, Alignment.BOTTOM_LEFT); // Label pepLabel = new Label("<h4 style='font-family:verdana;color:black;'>Peptides // (" + validPep + ") " + desc + "</h4>"); pepLabel.setContentMode(Label.CONTENT_XHTML); pepLabel.setHeight("45px"); headerLayout.addComponent(pepLabel); headerLayout.setComponentAlignment(pepLabel, Alignment.TOP_RIGHT); // Map<Integer, PeptideBean> vPepProtList = getValidatedList(pepProtList); pepTableLayout.removeAllComponents(); // vt = new PeptideTable(vPepProtList, null); pepTableLayout.addComponent(vt); trs1.setTable(vt); vt.setHeight(pepTable.getHeight() + ""); } else { headerLayout.removeAllComponents(); headerLayout.addComponent(show); headerLayout.setComponentAlignment(show, Alignment.BOTTOM_LEFT); Label pepLabel = new Label( "<h4 style='font-family:verdana;color:black;'>Peptides (" + validPep + "/" + totalPep + ") " + desc + "</h4>"); pepLabel.setContentMode(Label.CONTENT_XHTML); headerLayout.addComponent(pepLabel); headerLayout.setComponentAlignment(pepLabel, Alignment.TOP_RIGHT); pepTableLayout.removeAllComponents(); pepTable = new PeptideTable(pepProtList, null, false); pepTableLayout.addComponent(pepTable); trs1.setTable(pepTable); pepTable.setHeight(vt.getHeight() + ""); } } }); }
private AbsoluteLayout buildMainLayout() { // common part: create layout mainLayout = new AbsoluteLayout(); mainLayout.setImmediate(true); mainLayout.setWidth("160px"); mainLayout.setHeight("69px"); mainLayout.setMargin(false); // top-level component properties setWidth("160px"); setHeight("69px"); // currSelection currSelection = new Label(); currSelection.setImmediate(true); currSelection.setWidth("2px"); currSelection.setHeight("2px"); currSelection.setValue(""); currSelection.setContentMode(3); mainLayout.addComponent(currSelection, "top:40.0px;left:6.0px;"); // nextOptionAbove nextOptionAbove = new TextField(); nextOptionAbove.addStyleName("borderless"); nextOptionAbove.setEnabled(false); nextOptionAbove.setImmediate(true); nextOptionAbove.setWidth("-1px"); nextOptionAbove.setHeight("-1px"); mainLayout.addComponent(nextOptionAbove, "top:0.0px;left:3.0px;"); // nextOptionBelow nextOptionBelow = new TextField(); nextOptionBelow.addStyleName("borderless"); nextOptionBelow.setEnabled(false); nextOptionBelow.setImmediate(true); nextOptionBelow.setWidth("-1px"); nextOptionBelow.setHeight("-1px"); mainLayout.addComponent(nextOptionBelow, "top:40.0px;left:3.0px;"); // upButton upButton = new Button(); upButton.setCaption(""); upButton.setStyleName(BaseTheme.BUTTON_LINK); upButton.setImmediate(true); upButton.setWidth("16px"); upButton.setHeight("16px"); upButton.setIcon(ARROW_UP); upButton.addListener(this); upButton.setData(BUTTON_UP); mainLayout.addComponent(upButton, "top:11.0px;left:139.0px;"); // downButton downButton = new Button(); downButton.setCaption(""); downButton.setStyleName(BaseTheme.BUTTON_LINK); downButton.setImmediate(true); downButton.setWidth("16px"); downButton.setHeight("16px"); downButton.setIcon(ARROW_DOWN); downButton.addListener(this); downButton.setData(BUTTON_DOWN); mainLayout.addComponent(downButton, "top:39.0px;left:139.0px;"); return mainLayout; }