private Label createPDFLabel() { Label toPDF = new Label(i18n.toPDF()); toPDF.setWrap(false); toPDF.setAutoFit(true); toPDF.setPadding(3); toPDF.setWidth100(); toPDF.setStyleName("n52_sensorweb_client_exportEntry"); toPDF.addClickHandler( new ClickHandler() { @Override public void onClick(ClickEvent event) { controller.exportTo(ExportType.PDF_ALL_IN_ONE); exportMenu.hide(); } }); return toPDF; }
public RepositoryNameView(final Console console) { super(); setStyleName("repository"); setLayoutAlign(Alignment.CENTER); setLayoutAlign(VerticalAlignment.CENTER); setDefaultLayoutAlign(Alignment.CENTER); setDefaultLayoutAlign(VerticalAlignment.CENTER); setHeight(55); setWidth100(); Img logo = new Img(); logo.setSrc("icons/attach.png"); logo.setHeight(55); logo.setWidth(45); logo.setValign(VerticalAlignment.CENTER); HLayout panel0 = new HLayout(); HLayout panel1 = new HLayout(); panel1.setLayoutAlign(Alignment.RIGHT); panel1.setDefaultLayoutAlign(Alignment.RIGHT); panel1.setAlign(Alignment.RIGHT); HLayout panel = new HLayout(); // panel.setAlign(Alignment.LEFT); panel.setLayoutAlign(VerticalAlignment.CENTER); panel.setDefaultLayoutAlign(VerticalAlignment.CENTER); label.setStyleName("repository-caption"); label.setWidth("100%"); label.addClickHandler( new ClickHandler() { @Override public void onClick(ClickEvent event) { console.showRepositories(); } }); label.setBorder("1 px solid black"); label.setValign(VerticalAlignment.CENTER); Label explore = new Label("<b>Explore</b>"); explore.setAlign(Alignment.RIGHT); explore.setBorder("1ps solid green"); explore.setAutoFit(true); explore.setStyleName("tab-label"); explore.addClickHandler( new ClickHandler() { @Override public void onClick(ClickEvent event) { console.showContent(); } }); Label nodeTypes = new Label("<b>NodeTypes</b>"); nodeTypes.setAlign(Alignment.RIGHT); nodeTypes.setAutoFit(true); nodeTypes.setStyleName("tab-label"); nodeTypes.addClickHandler( new ClickHandler() { @Override public void onClick(ClickEvent event) { console.showNodeTypes(); } }); Label descriptor = new Label("<b>Descriptor</b>"); descriptor.setAlign(Alignment.RIGHT); descriptor.setAutoFit(true); descriptor.setStyleName("tab-label"); descriptor.addClickHandler( new ClickHandler() { @Override public void onClick(ClickEvent event) { console.showRepositoryInfo(); } }); Label query = new Label("<b>Query</b>"); query.setAlign(Alignment.RIGHT); query.setAutoFit(true); query.setStyleName("tab-label"); query.addClickHandler( new ClickHandler() { @Override public void onClick(ClickEvent event) { console.showQuery(); } }); panel.addMember(logo); panel.addMember(label); panel1.addMember(explore); panel1.addMember(new Spacer(10)); panel1.addMember(nodeTypes); panel1.addMember(new Spacer(10)); panel1.addMember(descriptor); panel1.addMember(new Spacer(10)); panel1.addMember(query); panel1.setHeight(55); panel0.setWidth("70%"); panel0.setHeight(55); panel0.addMember(panel); panel0.addMember(panel1); addMember(new Strut(10)); addMember(panel0); addMember(new Strut(10)); setVisible(false); }