@Override public Component getContent(Project project, ExtensionUtil util) { Layout layout = new CssLayout(); layout.addStyleName(STYLE_TEAM_INFOBOX); layout.setSizeFull(); PeopleExtension ext = project.getExtension(PeopleExtension.class); if (ext != null) { if (ext.getLeads().size() > 0) { Label projectLeadHeaderLabel = new Label("Project Lead"); projectLeadHeaderLabel.addStyleName(STYLE_TEAMLABEL); layout.addComponent(projectLeadHeaderLabel); Component peopleComponent = PeopleComponent.getPeopleListComponentForMember(ext.getLeads()); peopleComponent.addStyleName(InformationBox.STYLE); layout.addComponent(peopleComponent); } if (ext.getMembers().size() > 0) { Label projectTeamHeaderLabel = new Label("Project Team/Committers"); projectTeamHeaderLabel.addStyleName(STYLE_TEAMLABEL); layout.addComponent(projectTeamHeaderLabel); Component peopleComponent = PeopleComponent.getPeopleListComponentForMember(ext.getMembers()); peopleComponent.addStyleName(InformationBox.STYLE); layout.addComponent(peopleComponent); } String mailToTeamHtml = new MailToTeam(ext).composeMailToTeamLabel(); createLabel(layout, mailToTeamHtml); } return layout; }
public LastEventUpdate(String title, String value) { setSizeUndefined(); this.setSpacing(true); addStyleName("spark"); setDefaultComponentAlignment(Alignment.TOP_CENTER); // Security Threat Status Label securityStatusLabel = new Label(title); // securityStatusLabel.setSizeUndefined(); securityStatusLabel.addStyleName(ValoTheme.LABEL_BOLD); addComponent(securityStatusLabel); if (value == null) { value = "No record."; } Label securityStatusVal = new Label(value); // securityStatusVal.setSizeUndefined(); securityStatusVal.addStyleName(ValoTheme.LABEL_COLORED); addComponent(securityStatusVal); // UI.getCurrent().setPollInterval(5000); this.setImmediate(true); }
protected void addResourceLinks() { List<String> resourceNames = repositoryService.getDeploymentResourceNames(deployment.getId()); Collections.sort(resourceNames); // small nr of elements, so we can do it in-memory if (resourceNames.size() > 0) { Label resourceHeader = new Label(i18nManager.getMessage(Messages.DEPLOYMENT_HEADER_RESOURCES)); resourceHeader.setWidth("95%"); resourceHeader.addStyleName(ExplorerLayout.STYLE_H3); resourceHeader.addStyleName(ExplorerLayout.STYLE_DETAIL_BLOCK); addDetailComponent(resourceHeader); // resources VerticalLayout resourceLinksLayout = new VerticalLayout(); resourceLinksLayout.setSpacing(true); resourceLinksLayout.setMargin(true, false, false, false); addDetailComponent(resourceLinksLayout); for (final String resourceName : resourceNames) { StreamResource.StreamSource streamSource = new StreamSource() { public InputStream getStream() { return repositoryService.getResourceAsStream(deployment.getId(), resourceName); } }; Link resourceLink = new Link( resourceName, new StreamResource(streamSource, resourceName, ExplorerApp.get())); resourceLinksLayout.addComponent(resourceLink); } } }
private void handleCanCreate() { if (markedAsNoCreate) { markedAsNoCreate = false; setTooltip("Click to add card"); CardSummaryListHeader.this.addStyleName("m-cursor-pointer"); title.addStyleName("m-cursor-pointer"); content.addStyleName("m-cursor-pointer"); } }
public UserSelect() { loginInfo = new Label(""); loginInfo.addStyleName("error-font"); loginInfo.addStyleName("margin15"); loginInfo.addStyleName("margin-top40"); loginInfo.setVisible(false); selected = null; loginField = new PasswordField(""); loginField.setWidth("200px"); loginField.addStyleName("margin15"); loginField.addStyleName("margin-bot40"); loginBut = new Button("login"); loginBut.addStyleName("margin15"); loginBut.addClickListener( e -> { if (loginField.getValue().equals(selected.getPassword())) { hidePass(); Globals.user = selected; Globals.root.changeScreen(Globals.user); } else { loginInfo.setVisible(true); loginInfo.setValue("Wrong password"); loginField.setValue(""); } }); loginBox = new HorizontalLayout(); loginBox.addStyleName("popup-box"); loginBox.addComponents(loginField, loginBut, loginInfo); loginBox.setComponentAlignment(loginField, Alignment.MIDDLE_LEFT); loginBox.setComponentAlignment(loginBut, Alignment.MIDDLE_CENTER); loginBox.setComponentAlignment(loginField, Alignment.MIDDLE_RIGHT); loginBox.setVisible(false); userIcon = new ThemeResource("icons/user.png"); users = Globals.control.usersData(); vbox = new VerticalLayout(); // vbox.setSizeUndefined(); vbox.setDefaultComponentAlignment(Alignment.MIDDLE_CENTER); Panel p = new Panel(); p.setSizeFull(); p.setContent(vbox); // vbox.addStyleName("border-l-r"); this.addComponent(p, "left: 25%; right: 25%; top: 15px"); this.addComponent(loginBox, "left: 25%; right: 25%; top: 40%"); this.addLayoutClickListener( e -> { if (!loginBox.isVisible()) return; System.out.println(e.getClickedComponent()); if (e.getClickedComponent() == null || e.getClickedComponent().equals(vbox)) hidePass(); }); }
/** Constructor. */ public HomeView() { Label caption = new Label("Welcome, " + CurrentUser.get().getUserID()); Label description = new Label( "<b>Apache Tamaya</b> is an API and extendable framework for accessing and managing configuration.<br/> \n" + "Please check the project's home page <a href='http://tamaya.incubator.apache.org'>http://tamaya.incubator.apache.org</a>.", ContentMode.HTML); addComponents(caption, description); caption.addStyleName(UIConstants.LABEL_HUGE); description.addStyleName(UIConstants.LABEL_LARGE); }
protected void addVariables() { Label header = new Label(i18nManager.getMessage(Messages.PROCESS_INSTANCE_HEADER_VARIABLES)); header.addStyleName(ExplorerLayout.STYLE_H3); header.addStyleName(ExplorerLayout.STYLE_DETAIL_BLOCK); header.addStyleName(ExplorerLayout.STYLE_NO_LINE); panelLayout.addComponent(header); panelLayout.addComponent(new Label(" ", Label.CONTENT_XHTML)); // variable sorting is done in-memory (which is ok, since normally there aren't that many vars) Map<String, Object> variables = new TreeMap<String, Object>(runtimeService.getVariables(processInstance.getId())); if (variables.size() > 0) { Table variablesTable = new Table(); variablesTable.setWidth(60, UNITS_PERCENTAGE); variablesTable.addStyleName(ExplorerLayout.STYLE_PROCESS_INSTANCE_TASK_LIST); variablesTable.addContainerProperty( "name", String.class, null, i18nManager.getMessage(Messages.PROCESS_INSTANCE_VARIABLE_NAME), null, Table.ALIGN_LEFT); variablesTable.addContainerProperty( "value", String.class, null, i18nManager.getMessage(Messages.PROCESS_INSTANCE_VARIABLE_VALUE), null, Table.ALIGN_LEFT); for (String variable : variables.keySet()) { Item variableItem = variablesTable.addItem(variable); variableItem.getItemProperty("name").setValue(variable); // Get string value to show String theValue = variableRendererManager.getStringRepresentation(variables.get(variable)); variableItem.getItemProperty("value").setValue(theValue); } variablesTable.setPageLength(variables.size()); panelLayout.addComponent(variablesTable); } else { Label noVariablesLabel = new Label(i18nManager.getMessage(Messages.PROCESS_INSTANCE_NO_VARIABLES)); panelLayout.addComponent(noVariablesLabel); } }
public void displayErrorMessage(String message) { // Remove old error message if (error != null) registerPanel.removeComponent(error); // Add new error message error = new Label(message, ContentMode.HTML); error.addStyleName("error"); error.setSizeUndefined(); error.addStyleName("light"); // Add animation error.addStyleName("v-animate-reveal"); registerPanel.addComponent(error); username.focus(); }
@PostConstruct public void postConstuct() { setSizeFull(); navbar = new HorizontalLayout(); navbar.setWidth("100%"); navbar.setMargin(true); navbar.setDefaultComponentAlignment(Alignment.MIDDLE_RIGHT); addComponent(navbar); final Label brand = new Label("Vaadin4Spring Security Social Demo"); brand.addStyleName(ValoTheme.LABEL_H2); brand.addStyleName(ValoTheme.LABEL_NO_MARGIN); navbar.addComponent(brand); navbar.setComponentAlignment(brand, Alignment.MIDDLE_LEFT); navbar.setExpandRatio(brand, 1); btnHome = new Button("Home", FontAwesome.HOME); btnHome.addStyleName(ValoTheme.BUTTON_BORDERLESS); btnHome.setData(ViewToken.HOME); btnHome.addClickListener(this); navbar.addComponent(btnHome); btnSocial = new Button("Social connections", FontAwesome.SHARE_SQUARE); btnSocial.addStyleName(ValoTheme.BUTTON_BORDERLESS); btnSocial.setData(ViewToken.SOCIAL); btnSocial.addClickListener(this); navbar.addComponent(btnSocial); btnLogout = new Button("Logout", FontAwesome.SIGN_OUT); btnLogout.setData("-"); btnLogout.addStyleName(ValoTheme.BUTTON_BORDERLESS); navbar.addComponent(btnLogout); btnLogout.addClickListener( new ClickListener() { @Override public void buttonClick(ClickEvent event) { UI.getCurrent().getSession().close(); Page.getCurrent().setLocation("/logout"); } }); viewContainer = new Panel(); viewContainer.setSizeFull(); addComponent(viewContainer); setExpandRatio(viewContainer, 1); }
protected void cargarError(String message) { errores.removeAllComponents(); error = new Label(message); error.addStyleName(ValoTheme.LABEL_FAILURE); errores.setVisible(true); errores.addComponent(error); }
public CustomerMenu(MshenguMain app, String selectedTab) { main = app; Label heading = new Label("CREATE A NEW CUSTOMER"); heading.setSizeUndefined(); heading.addStyleName("h4"); VerticalLayout customerDetailsTab = new VerticalLayout(); customerDetailsTab.setMargin(true); customerDetailsTab.addComponent(new CustomerDetailsTab(main)); customerContractsTab = new CustomerContractsTab(main); newCustomerTab = new NewCustomerTab(app); // customerContractsTab.setMargin(true); // customerContractsTab.addComponent(new CustomerContractsTab(main)); tab = new TabSheet(); tab.setHeight("100%"); tab.setWidth("100%"); tab.addTab(customerDetailsTab, "Customer Details", null); tab.addTab(customerContractsTab, "Hiring Terms", null); tab.addTab(newCustomerTab, "New Customer Form", null); if (selectedTab.equals("LANDING")) { tab.setSelectedTab(customerDetailsTab); } else if (selectedTab.equals("CONTRACTS")) { tab.setSelectedTab(customerContractsTab); } else if (selectedTab.equals("New_Customer")) { tab.setSelectedTab(newCustomerTab); } addComponent(heading); addComponent(tab); setMargin(true); }
/** @param errorMsg the error description */ public ErrorScreen(String errorMsg) { super(); Label label; setSizeFull(); // logoComponent: horizontal layout (label left + image + label right) HorizontalLayout logoComponent = new HorizontalLayout(); logoComponent.setWidth("100%"); label = new Label(); logoComponent.addComponent(label); logoComponent.setExpandRatio(label, 1.0f); Resource res = LibResource.getImgResource("splash_image.png"); if (res != null) { Image img = LibImage.getImage(res); logoComponent.addComponent(img); } label = new Label(); logoComponent.addComponent(label); logoComponent.setExpandRatio(label, 1.0f); // msgComponent: (label left + msg label + label right) HorizontalLayout msgComponent = new HorizontalLayout(); msgComponent.setWidth("100%"); label = new Label(); msgComponent.addComponent(label); msgComponent.setExpandRatio(label, 1.0f); // label.addStyleName("blueBg"); msgLabel = new Label(errorMsg); msgComponent.addComponent(msgLabel); msgLabel.setWidthUndefined(); msgLabel.addStyleName("error-screen-msg"); label = new Label(); msgComponent.addComponent(label); msgComponent.setExpandRatio(label, 1.0f); // label.addStyleName("blueBg"); // add components to this vertical layout label = new Label(); addComponent(label); setExpandRatio(label, 1.0f); addComponent(logoComponent); label = new Label(); addComponent(label); setExpandRatio(label, 0.3f); addComponent(msgComponent); label = new Label(); addComponent(label); setExpandRatio(label, 1.0f); }
public ErrorView() { setMargin(true); message = new Label(); addComponent(message); message.setSizeUndefined(); message.addStyleName(ValoTheme.LABEL_FAILURE); }
protected void addHeader() { GridLayout header = new GridLayout(3, 2); header.setWidth(100, UNITS_PERCENTAGE); header.addStyleName(ExplorerLayout.STYLE_TITLE_BLOCK); header.setSpacing(true); header.setMargin(false, false, true, false); // Add image Embedded image = new Embedded(null, Images.PROCESS_50); header.addComponent(image, 0, 0, 0, 1); // Add task name Label nameLabel = new Label(getProcessDisplayName(processDefinition, processInstance)); nameLabel.addStyleName(Reindeer.LABEL_H2); header.addComponent(nameLabel, 1, 0, 2, 0); // Add start time PrettyTimeLabel startTimeLabel = new PrettyTimeLabel( i18nManager.getMessage(Messages.PROCESS_START_TIME), historicProcessInstance.getStartTime(), null, true); startTimeLabel.addStyleName(ExplorerLayout.STYLE_PROCESS_HEADER_START_TIME); header.addComponent(startTimeLabel, 1, 1); header.setColumnExpandRatio(1, 1.0f); header.setColumnExpandRatio(2, 1.0f); panelLayout.addComponent(header); }
/** * Wrap the given component in a panel. * * @param component the component to wrap * @param title the panel's title * @return a newly created panel wrapper, wrapping the given component */ private static Component wrapInPanel(Component component, String title) { Label titleLabel = new Label(title); VerticalLayout panel = new VerticalLayout(titleLabel, component); panel.setWidthUndefined(); titleLabel.addStyleName(PANEL_TITLE_STYLENAME); panel.addStyleName(PANEL_STYLENAME); return panel; }
public ApprovalCallReportView() { setSpacing(true); setMargin(true); Label title = new Label("Approval Call Report"); title.addStyleName("h1"); addComponent(title); }
private com.vaadin.ui.Component buildLabels() { CssLayout labels = new CssLayout(); labels.addStyleName("labels"); Label welcome = new Label("Welcome"); welcome.setSizeUndefined(); welcome.addStyleName(ValoTheme.LABEL_H4); welcome.addStyleName(ValoTheme.LABEL_COLORED); labels.addComponent(welcome); Label title = new Label("QuickTickets Dashboard"); title.setSizeUndefined(); title.addStyleName(ValoTheme.LABEL_H3); title.addStyleName(ValoTheme.LABEL_LIGHT); labels.addComponent(title); return labels; }
public TaskListComponent(SimpleTaskList taskList) { this.taskList = taskList; this.setStyleName("task-component"); this.setWidth("100%"); Label taskName = new Label(taskList.getName()); taskName.addStyleName("task-name"); if ("Closed".equals(taskList.getStatus())) { taskName.addStyleName(UIConstants.LINK_COMPLETED); } this.addComponent(taskName); Label taskCreatedTime = new Label( AppContext.getMessage( DayI18nEnum.LAST_UPDATED_ON, AppContext.formatPrettyTime(taskList.getLastupdatedtime()))); taskCreatedTime.setStyleName("created-time"); this.addComponent(taskCreatedTime); }
public ErrorView() { setMargin(true); setSpacing(true); Label header = new Label("The view could not be found"); header.addStyleName(Reindeer.LABEL_H1); addComponent(header); addComponent(explanation = new Label()); }
protected void addConvertWarning() { Label convertLabel = new Label(i18nManager.getMessage(Messages.PROCESS_CONVERT_POPUP_MESSAGE)); convertLabel.addStyleName(Reindeer.LABEL_SMALL); addComponent(convertLabel); // Some empty space Label emptySpace = new Label(" ", Label.CONTENT_XHTML); addComponent(emptySpace); }
private Component buildHeader() { HorizontalLayout header = new HorizontalLayout(); header.addStyleName("viewheader"); titleLabel = new Label("Dashboard"); titleLabel.setId(TITLE_ID); titleLabel.setSizeUndefined(); titleLabel.addStyleName(ValoTheme.LABEL_H1); titleLabel.addStyleName(ValoTheme.LABEL_NO_MARGIN); header.addComponent(titleLabel); notificationsButton = buildNotificationsButton(); Component edit = buildEditButton(); HorizontalLayout tools = new HorizontalLayout(notificationsButton, edit); tools.addStyleName("toolbar"); header.addComponent(tools); return header; }
public Login() { // TODO Auto-generated constructor stub VaadinSession.getCurrent().setAttribute("municipaldata", null); VaadinSession.getCurrent().setAttribute("barangaydata", null); VaadinSession.getCurrent().setAttribute("id", null); setSizeFull(); dialog = new Window("Login"); dialog.setClosable(false); dialog.setResizable(false); dialog.center(); // new CreateAccount(); VerticalLayout content = new VerticalLayout(); content.setSpacing(true); content.setMargin(new MarginInfo(false, true, true, true)); dialog.setContent(content); Label title = new Label("Login"); title.addStyleName(ValoTheme.LABEL_H2); title.addStyleName(ValoTheme.LABEL_COLORED); HorizontalLayout form = new HorizontalLayout(); form.setSpacing(true); form.addStyleName("wrapping"); content.addComponent(form); username.setIcon(FontAwesome.USER); username.focus(); form.addComponent(username); password.setIcon(FontAwesome.LOCK); form.addComponent(password); Button submit = new Button("Login"); submit.addStyleName(ValoTheme.BUTTON_ICON_ALIGN_RIGHT); submit.addStyleName(ValoTheme.BUTTON_PRIMARY); submit.setIcon(FontAwesome.ARROW_RIGHT); submit.setWidth("100%"); submit.addListener(ClickEvent.class, this, "gotoMain"); content.addComponent(submit); }
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); }
public ShoppingCartLine(String caption, LabelField<String> value, boolean isSecondary) { super(); setWidth("100%"); Label label = new Label(caption); if (isSecondary) { label.addStyleName(ValoTheme.LABEL_LIGHT); } else { label.addStyleName(ValoTheme.LABEL_BOLD); } label.setWidth(LABEL_WIDTH); value.setConverter(new DoubleStringConverter()); value.setWidth(LABEL_WIDTH); addComponent(label); addComponent(value); setComponentAlignment(value, Alignment.MIDDLE_RIGHT); }
private Component createContentWrapper(final Component content) { final CssLayout slot = new CssLayout(); slot.setWidth("100%"); slot.addStyleName("dashboard-panel-slot"); slot.addStyleName("max"); CssLayout card = new CssLayout(); card.setWidth("100%"); card.addStyleName(ValoTheme.LAYOUT_CARD); Label caption = new Label(content.getCaption()); caption.addStyleName(ValoTheme.LABEL_H4); caption.addStyleName(ValoTheme.LABEL_COLORED); caption.addStyleName(ValoTheme.LABEL_NO_MARGIN); content.setCaption(null); card.addComponents(content); slot.addComponent(card); return slot; }
/** Adds a view with its description. */ private void initComponents() { setMargin(true); setSizeUndefined(); Label nameLabel = new Label(view.getDisplayName()); nameLabel.addStyleName(Reindeer.LABEL_H2); addComponent(nameLabel); Label descrLabel = new Label(view.getDescription()); addComponent(descrLabel); addStyleName("mainMenuItem"); }
protected void addDeleteWarning() { List<ProcessDefinition> processDefinitions = repositoryService.createProcessDefinitionQuery().deploymentId(deployment.getId()).list(); int nrOfProcessInstances = 0; for (ProcessDefinition processDefinition : processDefinitions) { nrOfProcessInstances += runtimeService .createProcessInstanceQuery() .processDefinitionId(processDefinition.getId()) .count(); } if (nrOfProcessInstances == 0) { Label noInstancesLabel = new Label(i18nManager.getMessage(Messages.DEPLOYMENT_NO_INSTANCES)); noInstancesLabel.addStyleName(Reindeer.LABEL_SMALL); addComponent(noInstancesLabel); } else { HorizontalLayout warningLayout = new HorizontalLayout(); warningLayout.setSpacing(true); addComponent(warningLayout); Embedded warningIcon = new Embedded(null, Images.WARNING); warningIcon.setType(Embedded.TYPE_IMAGE); warningLayout.addComponent(warningIcon); Label warningLabel = new Label( i18nManager.getMessage( Messages.DEPLOYMENT_DELETE_POPUP_WARNING, nrOfProcessInstances), Label.CONTENT_XHTML); warningLabel.setSizeUndefined(); warningLabel.addStyleName(Reindeer.LABEL_SMALL); warningLayout.addComponent(warningLabel); } // Some empty space Label emptySpace = new Label(" ", Label.CONTENT_XHTML); addComponent(emptySpace); }
private void addLayoutTest(Layout l) { l.setSizeFull(); Label lbl = new Label("First (expand ratio 1)"); lbl.setSizeUndefined(); l.addComponent(lbl); lbl = new Label("Second (margin 10px)"); lbl.setSizeUndefined(); lbl.addStyleName("hugemargin"); l.addComponent(lbl); lbl = new Label("Third (margin+xr)"); lbl.setSizeUndefined(); lbl.addStyleName("hugemargin"); l.addComponent(lbl); Panel p = new Panel(l.getClass().getSimpleName(), l); p.setWidth("600px"); p.setHeight("200px"); addComponent(p); }
protected void addProcessDefinitionLinks() { List<ProcessDefinition> processDefinitions = repositoryService .createProcessDefinitionQuery() .deploymentId(deployment.getId()) .orderByProcessDefinitionName() .asc() .list(); if (processDefinitions.size() > 0) { // Header Label processDefinitionHeader = new Label(i18nManager.getMessage(Messages.DEPLOYMENT_HEADER_DEFINITIONS)); processDefinitionHeader.addStyleName(ExplorerLayout.STYLE_H3); processDefinitionHeader.addStyleName(ExplorerLayout.STYLE_DETAIL_BLOCK); processDefinitionHeader.setWidth(100, UNITS_PERCENTAGE); addDetailComponent(processDefinitionHeader); // processes VerticalLayout processDefinitionLinksLayout = new VerticalLayout(); processDefinitionLinksLayout.setSpacing(true); processDefinitionLinksLayout.setMargin(true, false, true, false); addDetailComponent(processDefinitionLinksLayout); for (final ProcessDefinition processDefinition : processDefinitions) { Button processDefinitionButton = new Button(getProcessDisplayName(processDefinition)); processDefinitionButton.addListener( new ClickListener() { public void buttonClick(ClickEvent event) { viewManager.showDeployedProcessDefinitionPage(processDefinition.getId()); } }); processDefinitionButton.addStyleName(Reindeer.BUTTON_LINK); processDefinitionLinksLayout.addComponent(processDefinitionButton); } } }
@Override public void attach() { // System.out.println("refer url is: "+referrer); // System.out.println("Start to read the window name: "); // List<String> wNames = new ArrayList<String>(); // for(Window w:getWindows()){ // wNames.add(w.getName()); // System.out.println("window name is: "+w.getName()); // } // getApplication().getMainWindow().removeAllComponents(); VerticalLayout userAuthLayout = new VerticalLayout(); userAuthLayout.addStyleName("sourceAppLayout"); Label comfireLable = new Label("Please Check the User Information"); comfireLable.addStyleName("comfireLable"); userAuthLayout.addComponent(comfireLable); // userAuthLayout.setComponentAlignment(comfireLable, Alignment.MIDDLE_RIGHT); HorizontalLayout g1 = new HorizontalLayout(); g1.addStyleName("sourceAPPAuthInfoLayout"); userAuthLayout.addComponent(g1); userAuthLayout.setComponentAlignment(g1, Alignment.MIDDLE_LEFT); // network infor Label networkInfo = new Label("Authencation Network"); networkInfo.addStyleName("inforCard"); g1.addComponent(networkInfo); g1.setComponentAlignment(networkInfo, Alignment.TOP_LEFT); Label autheFromSiteName = new Label("eBay"); autheFromSiteName.addStyleName("inforValue"); g1.addComponent(autheFromSiteName); g1.setComponentAlignment(autheFromSiteName, Alignment.TOP_RIGHT); HorizontalLayout g2 = new HorizontalLayout(); g2.addStyleName("sourceAPPAuthInfoLayout"); userAuthLayout.addComponent(g2); userAuthLayout.setComponentAlignment(g2, Alignment.MIDDLE_LEFT); // userName infor Label userNameInfo = new Label("User Info"); userNameInfo.addStyleName("inforCard"); userNameInfo.addStyleName("userNameInfo"); g2.addComponent(userNameInfo); g2.setComponentAlignment(userNameInfo, Alignment.TOP_LEFT); Label authUserName = new Label(referrer.split("username="******"inforValue"); g2.addComponent(authUserName); g2.setComponentAlignment(authUserName, Alignment.TOP_RIGHT); // // token expireDate infor // Label tokenInfo=new Label("Developer"); // g.addComponent(tokenInfo); // g.setComponentAlignment(tokenInfo,Alignment.MIDDLE_CENTER); // Label tokenExpireDate=new Label(referrer.split("username=")[1]); // g.addComponent(authUserName); // g.setComponentAlignment(authUserName,Alignment.MIDDLE_CENTER); userAuthLayout.addComponent(getWebFoot()); this.setContent(userAuthLayout); }