当前位置: 首页>>代码示例>>Java>>正文


Java Embedded.setHeight方法代码示例

本文整理汇总了Java中com.vaadin.ui.Embedded.setHeight方法的典型用法代码示例。如果您正苦于以下问题:Java Embedded.setHeight方法的具体用法?Java Embedded.setHeight怎么用?Java Embedded.setHeight使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.vaadin.ui.Embedded的用法示例。


在下文中一共展示了Embedded.setHeight方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: FileExample

import com.vaadin.ui.Embedded; //导入方法依赖的package包/类
public FileExample() {
    setCaption("Interactive SVG");
    addComponent(new MLabel(
            "A simple example from an svg file using Embedded component. Unlike with Image component, the SVGs JS etc are active. The example also demonstrates how to provide a trivial server side integration API for the SVG."));
    Embedded svg = new Embedded();
    svg.setWidth("400px");
    svg.setHeight("400px");
    svg.setSource(new ClassResource("/pull.svg"));

    // Expose a JS hook that pull.svg file calls when clicked
    JavaScript.getCurrent().addFunction("callMyVaadinFunction", (JsonArray arguments) -> {
        Notification.show("Message from SVG:" + arguments.getString(0));
    });

    addComponent(svg);
}
 
开发者ID:mstahv,项目名称:svgexamples,代码行数:17,代码来源:FileExample.java

示例2: initPicture

import com.vaadin.ui.Embedded; //导入方法依赖的package包/类
protected void initPicture(IdentityService identityService, boolean renderPicture, final String userName) {
  if(renderPicture) {
    Picture picture = identityService.getUserPicture(userName);
    if(picture != null) {
      Resource imageResource = new StreamResource(new InputStreamStreamSource(picture.getInputStream()), 
        userName + picture.getMimeType(), ExplorerApp.get());
      
      Embedded image = new Embedded(null, imageResource);
      image.addStyleName(ExplorerLayout.STYLE_CLICKABLE);
      image.setType(Embedded.TYPE_IMAGE);
      image.setHeight(30, Embedded.UNITS_PIXELS);
      image.setWidth(30, Embedded.UNITS_PIXELS);
      image.addListener(new MouseEvents.ClickListener() {
        private static final long serialVersionUID = 7341560240277898495L;
        public void click(com.vaadin.event.MouseEvents.ClickEvent event) {
          viewManager.showProfilePopup(userName);
        }
      });
      
      addComponent(image);
      setComponentAlignment(image, Alignment.MIDDLE_LEFT);
    } else {
     // TODO: what when no image is available?
    }
  }
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:27,代码来源:UserProfileLink.java

示例3: LebAnzeigen

import com.vaadin.ui.Embedded; //导入方法依赖的package包/类
public LebAnzeigen(FossaApplication app, SchuelerLaso schueler, KlasseLaso klasse) throws DocumentException, IOException {
	super(app);
	setCaption(" - Lernentwicklungsbericht anzeigen - ");
	VerticalLayout layout = new VerticalLayout();
	setWidth("800px");
	setContent(layout);
	layout.setSpacing(true);
	
	Embedded embeddedPdf = new Embedded();
	embeddedPdf.setType(Embedded.TYPE_BROWSER);
	DateFormat dateFormat = new SimpleDateFormat("ddMMyy-HHmmss");
	String dateiname = "Klasse" + klasse.getKlassenname() + "_" + schueler.getVorname() + "_" + schueler.getName() + "_" + dateFormat.format(new Date()) + ".pdf";
	embeddedPdf.setSource(new LebCreator(app, schueler, klasse, dateiname).getLebResource());
	embeddedPdf.setWidth(100, Sizeable.UNITS_PERCENTAGE);
	embeddedPdf.setHeight("580px");
	windowCloseButton.setWidth(100, Sizeable.UNITS_PERCENTAGE);
	layout.addComponent(embeddedPdf);
	layout.addComponent(windowCloseButton);
}
 
开发者ID:fossaag,项目名称:rolp,代码行数:20,代码来源:LebAnzeigen.java

示例4: buildMainLayout

import com.vaadin.ui.Embedded; //导入方法依赖的package包/类
@Override
public void buildMainLayout() {
	Embedded logo = new Embedded(null, new ThemeResource(MAINPAGE_PANEL_ANMELDEN_LOGO_PATH));
	logo.setType(Embedded.TYPE_IMAGE);
	logo.setWidth("100px");
	logo.setHeight("96px");
	headlineApp.addComponent(logo,"logo");
	headlineApp.addComponent(authorizerLayout,"authorizerLayout");
	headlineApp.addStyleName("headlineApp");
	
	layout.addComponent(headlineApp,"headlineApp");
	
	getMainWindow().setContent(layout);		
	getMainWindow().addComponent(getAnimator());
	
	if(getLoginLehrer().getIsAdmin()){
		layout.addComponent(getAdminDashboard(), "admin");
	} else {
		layout.addComponent(main, "main");
		buildAppLayout();
	}
}
 
开发者ID:fossaag,项目名称:rolp,代码行数:23,代码来源:RolpApplication.java

示例5: AnimationExample

import com.vaadin.ui.Embedded; //导入方法依赖的package包/类
public AnimationExample() {
	setCaption("Animation");
	addComponent(new MLabel(
			"A simple example from an svg file. Also demonstrates SVG animations.").withFullWidth());
	Embedded svg = new Embedded();
	svg.setWidth("800px");
	svg.setHeight("400px");
	svg.setSource(new ClassResource("/svg2009.svg"));
	addComponent(svg);
}
 
开发者ID:mstahv,项目名称:svgexamples,代码行数:11,代码来源:AnimationExample.java

示例6: buildContents

import com.vaadin.ui.Embedded; //导入方法依赖的package包/类
@AutoGenerated
private HorizontalLayout buildContents() {
	// common part: create layout
	contents = new HorizontalLayout();
	contents.setImmediate(false);
	contents.setWidth("100.0%");
	contents.setHeight("-1px");
	contents.setMargin(true);
	contents.setSpacing(true);

	// details
	details = buildDetails();
	contents.addComponent(details);

	// userPortrait
	userPortrait = new Embedded();
	userPortrait.setCaption("User Portrait:");
	userPortrait.setImmediate(false);
	userPortrait.setWidth("-1px");
	userPortrait.setHeight("-1px");
	userPortrait.setSource(new ThemeResource(
			"img/component/embedded_icon.png"));
	userPortrait.setType(1);
	userPortrait.setMimeType("image/png");
	contents.addComponent(userPortrait);

	return contents;
}
 
开发者ID:dnebinger,项目名称:vaadin-sample-portlet,代码行数:29,代码来源:UserDetailComponent.java

示例7: FachlehrerDashboard

import com.vaadin.ui.Embedded; //导入方法依赖的package包/类
public FachlehrerDashboard(RolpApplication app) {
	super(app);
	this.app = app;
	setCaption(" - FachlehrerDashboard - ");
	setWidth("100%");
	setHeight("100%");
	
	buildButtonBatteries();
	
	CustomLayout layout = new CustomLayout("./lehrerDashboards/fachLehrerDashboardMain");
	setContent(layout);
	
	CustomLayout headline = new CustomLayout("./lehrerDashboards/headline");
	headline.addStyleName("headline");
	
	Embedded logo = new Embedded(null, new ThemeResource(MAINPAGE_PANEL_ANMELDEN_LOGO_PATH));
	logo.setType(Embedded.TYPE_IMAGE);
	logo.setWidth("100px");
	logo.setHeight("96px");
	
	headline.addComponent(logo,"logo");
	
	CustomLayout faecherListe = new CustomLayout("./lehrerDashboards/liste");
	faecherListe.addStyleName("liste");
	faecherList = getFaecherList();
	faecherList.setHeight("250px");
	faecherList.setStyleName("list");
	faecherListe.addComponent(faecherList, "list");
	faecherListe.setHeight("260px");
	
	layout.addComponent(faecherListe,"liste");
	layout.addComponent(headline,"headline");
	layout.addComponent(horizontalButtonBattery,"horizontalButtonBattery");
	
	lehrerBlog = getLehrerBlog();
	layout.addComponent(lehrerBlog,"blog");
	windowCloseButton.setWidth("100%");
	layout.addComponent(windowCloseButton, "windowCloseButton");
	
}
 
开发者ID:fossaag,项目名称:rolp,代码行数:41,代码来源:FachlehrerDashboard.java

示例8: buildHlImage

import com.vaadin.ui.Embedded; //导入方法依赖的package包/类
private HorizontalLayout buildHlImage() {
	// common part: create layout
	hlImage = new HorizontalLayout();
	hlImage.setImmediate(false);
	hlImage.setWidth("-1px");
	hlImage.setHeight("-1px");
	hlImage.setMargin(false);
	
	// embeddedImage
	embeddedImage = new Embedded();
	embeddedImage.setImmediate(false);
	embeddedImage.setWidth("80px");
	embeddedImage.setHeight("100px");
	embeddedImage.setSource(new ThemeResource(
			"images/imageNotAvailable.png"));
	embeddedImage.setType(1);
	embeddedImage.setMimeType("image/png");
	hlImage.addComponent(embeddedImage);
	
	// btnClearImage
	btnClearImage = new Button();
	btnClearImage.setCaption("X");
	btnClearImage.setImmediate(true);
	btnClearImage.setWidth("-1px");
	btnClearImage.setHeight("-1px");
	hlImage.addComponent(btnClearImage);
	hlImage.setComponentAlignment(btnClearImage, new Alignment(9));
	
	return hlImage;
}
 
开发者ID:thingtrack,项目名称:konekti,代码行数:31,代码来源:ImageField.java

示例9: buildHorizontalLayout_1

import com.vaadin.ui.Embedded; //导入方法依赖的package包/类
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_1() {
	// common part: create layout
	horizontalLayout_1 = new HorizontalLayout();
	horizontalLayout_1.setImmediate(false);
	horizontalLayout_1.setWidth("100.0%");
	horizontalLayout_1.setHeight("-1px");
	horizontalLayout_1.setMargin(false);
	
	// logoField
	logoField = new Embedded();
	logoField.setCaption("Logo");
	logoField.setImmediate(false);
	logoField.setWidth("70px");
	logoField.setHeight("60px");
	logoField
			.setSource(new ThemeResource("img/component/embedded_icon.png"));
	logoField.setType(1);
	logoField.setMimeType("image/png");
	horizontalLayout_1.addComponent(logoField);
	
	// activeField
	activeField = new CheckBox();
	activeField.setCaption("Activo");
	activeField.setImmediate(false);
	activeField.setWidth("-1px");
	activeField.setHeight("-1px");
	activeField.setRequired(true);
	horizontalLayout_1.addComponent(activeField);
	horizontalLayout_1
			.setComponentAlignment(activeField, new Alignment(34));
	
	return horizontalLayout_1;
}
 
开发者ID:thingtrack,项目名称:konekti,代码行数:35,代码来源:CalendarViewForm.java

示例10: buildErrorHeaderLayout

import com.vaadin.ui.Embedded; //导入方法依赖的package包/类
@AutoGenerated
private AbsoluteLayout buildErrorHeaderLayout() {
	// common part: create layout
	errorHeaderLayout = new AbsoluteLayout();
	errorHeaderLayout.setImmediate(false);
	errorHeaderLayout.setWidth("100.0%");
	errorHeaderLayout.setHeight("100px");
	errorHeaderLayout.setMargin(false);
	
	// imageErrorImage
	imageErrorImage = new Embedded();
	imageErrorImage.setImmediate(false);
	imageErrorImage.setWidth("60px");
	imageErrorImage.setHeight("60px");
	imageErrorImage.setSource(new ThemeResource(
			"images/exclamation.png"));
	imageErrorImage.setType(1);
	imageErrorImage.setMimeType("image/png");
	errorHeaderLayout.addComponent(imageErrorImage,
			"top:20.0px;left:20.0px;");
	
	// errorHeaderTittleLabel
	errorHeaderTittleLabel = new Label();
	errorHeaderTittleLabel.setImmediate(false);
	errorHeaderTittleLabel.setWidth("100.0%");
	errorHeaderTittleLabel.setHeight("100.0%");
	errorHeaderTittleLabel.setValue("Error Header");
	errorHeaderLayout.addComponent(errorHeaderTittleLabel,
			"top:20.0px;right:36.0px;bottom:20.0px;left:118.0px;");
	
	return errorHeaderLayout;
}
 
开发者ID:thingtrack,项目名称:konekti,代码行数:33,代码来源:ErrorViewForm.java

示例11: buildMainLayout

import com.vaadin.ui.Embedded; //导入方法依赖的package包/类
@AutoGenerated
	private AbsoluteLayout buildMainLayout() {
		// common part: create layout
		mainLayout = new AbsoluteLayout();
		mainLayout.setImmediate(false);
//		mainLayout.setWidth("982px");
		mainLayout.setWidth("100%");
		mainLayout.setHeight("143px");
		
		// top-level component properties
//		setWidth("982px");
		setWidth("100.0%");
		setHeight("143px");
		
		// headerImage
		headerImage = new Embedded();
		headerImage.setImmediate(false);
		headerImage.setWidth("982px");
		headerImage.setHeight("143px");
		headerImage.setSource(new ThemeResource(
				"img/component/embedded_icon.png"));
		headerImage.setType(1);
		headerImage.setMimeType("image/png");
		mainLayout.addComponent(headerImage, "top:0.0px;left:0.0px;");
		
		return mainLayout;
	}
 
开发者ID:unicesi,项目名称:academ,代码行数:28,代码来源:PanelEncabezado.java

示例12: buildMainLayout

import com.vaadin.ui.Embedded; //导入方法依赖的package包/类
@AutoGenerated
	private AbsoluteLayout buildMainLayout() {
		// common part: create layout
		mainLayout = new AbsoluteLayout();
		mainLayout.setImmediate(false);
		mainLayout.setWidth("100%");
//		mainLayout.setWidth("982px");
		mainLayout.setHeight("70px");
		
		// top-level component properties
//		setWidth("982px");
		setWidth("100.0%");
		setHeight("70px");
		
		// footerImage
		footerImage = new Embedded();
		footerImage.setImmediate(false);
		footerImage.setWidth("982px");
		footerImage.setHeight("70px");
		footerImage.setSource(new ThemeResource(
				"img/component/embedded_icon.png"));
		footerImage.setType(1);
		footerImage.setMimeType("image/png");
		mainLayout.addComponent(footerImage, "top:0.0px;left:0.0px;");
		
		return mainLayout;
	}
 
开发者ID:unicesi,项目名称:academ,代码行数:28,代码来源:PanelPieDePagina.java

示例13: JungExample

import com.vaadin.ui.Embedded; //导入方法依赖的package包/类
public JungExample() {

        setCaption("Graph using JUNG");

        addComponent(new Label(
                "This graphic is created with JUNG and made to SVG with Batik."));
        try {
            DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory
                    .newInstance();
            DocumentBuilder docBuilder = null;
            docBuilder = docBuilderFactory.newDocumentBuilder();
            Document document = docBuilder.newDocument();
            Element svgelem = document.createElement("svg");
            document.appendChild(svgelem);

            // Create an instance of the SVG Generator
            SVGGraphics2D graphic2d = new SVGGraphics2D(document);

            VisualizationImageServer<Integer, String> server = new SimpleGraphView2()
                    .getServer();
            server.printAll(graphic2d);

            // svgweb (IE fallback) needs size somehow defined
            Element el = graphic2d.getRoot();
            el.setAttributeNS(null, "viewBox", "0 0 350 350");
            el.setAttributeNS(null, "style", "width:100%;height:100%;");

            // Finally, stream out SVG to the standard output using
            // UTF-8 encoding.
            boolean useCSS = true; // we want to use CSS style attributes
            ByteArrayOutputStream bout = new ByteArrayOutputStream();
            Writer out = new OutputStreamWriter(bout, "UTF-8");
            graphic2d.stream(el, out, useCSS, false);

            Embedded svgComponent = new Embedded();
            svgComponent.setWidth(350, Unit.PIXELS);
            svgComponent.setHeight(350, Unit.PIXELS);
            Resource svg = new StreamResource(() -> new ByteArrayInputStream(bout.toByteArray()), "graphics.svg");
            svgComponent.setSource(svg);
            addComponent(svgComponent);

        } catch (Exception e1) {
            throw new RuntimeException(e1);
        }

    }
 
开发者ID:mstahv,项目名称:svgexamples,代码行数:47,代码来源:JungExample.java

示例14: Java2DExample

import com.vaadin.ui.Embedded; //导入方法依赖的package包/类
public Java2DExample() {
    setCaption("SVG using java.awt.Graphics2D");
    
    addComponent(new Label(
            "This graphic is created with java.awt.Graphics2D API and made to SVG with Batik."));
    
    try {
        
        DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory
                .newInstance();
        DocumentBuilder docBuilder = null;
        docBuilder = docBuilderFactory.newDocumentBuilder();
        Document document = docBuilder.newDocument();
        Element svgelem = document.createElement("svg");
        document.appendChild(svgelem);

        // Create an instance of the SVG Generator
        SVGGraphics2D graphic2d = new SVGGraphics2D(document);
        drawDemo(widht, height, graphic2d);

        // svgweb (IE fallback) needs size somehow defined
        Element el = graphic2d.getRoot();
        el.setAttributeNS(null, "viewBox", "0 0 " + widht
                + " " + height + "");
        el.setAttributeNS(null, "style",
                "width:100%;height:100%;");

        // Finally, stream out SVG to the standard output using
        // UTF-8 encoding.
        boolean useCSS = true; // we want to use CSS style attributes
        ByteArrayOutputStream bout = new ByteArrayOutputStream();
        Writer out = new OutputStreamWriter(bout, "UTF-8");
        graphic2d.stream(el, out, useCSS, false);
        
        Embedded svgComponent = new Embedded();
        svgComponent.setWidth(widht, Unit.PIXELS);
        svgComponent.setHeight(height, Unit.PIXELS);
        
        Resource svg = new StreamResource(() -> new ByteArrayInputStream(bout.toByteArray()), "graphics.svg");
        svgComponent.setSource(svg);
        addComponent(svgComponent);
        
    } catch (Exception e1) {
        throw new RuntimeException(e1);
    }
    
}
 
开发者ID:mstahv,项目名称:svgexamples,代码行数:48,代码来源:Java2DExample.java

示例15: generateUi

import com.vaadin.ui.Embedded; //导入方法依赖的package包/类
/**
 * Erstelle das GUI zum Prozessschritt "Szenarien"
 * 
 * @author Julius Hacker, Tobias Lindner
 */
private void generateUi() {
			
	addScenarioLayout = new HorizontalLayout();
	
	addIcon = new Embedded (null, new ThemeResource ("./images/icons/newIcons/1418766077_circle_add_plus_-128_green.png"));
	addIcon.setHeight(30, UNITS_PIXELS);
	
	addLabel = new Label ("Szenario hinzufügen");
	addLabel.addStyleName("scenarios");
	addLabel.addStyleName("addScenario");
	
	addScenarioLayout.addComponent(addIcon);
	
	gap3 = new Label();
	gap3.setWidth(10, UNITS_PIXELS);
	
	addScenarioLayout.addComponent(gap3);
	addScenarioLayout.addComponent(addLabel);
	addScenarioLayout.setComponentAlignment(addLabel, Alignment.MIDDLE_CENTER);
	
	addScenarioLayout.addListener(new LayoutClickListener () {
		private static final long serialVersionUID = 1L;

		@Override
		public void layoutClick(LayoutClickEvent event) {
			presenter.addScenario();
		}
	});
	
	gap4 = new Label();
	gap4.setHeight(15, UNITS_PIXELS);
	
	this.vlScenarios = new VerticalLayout();
	this.vlScenarios.setSizeFull();
	this.setMargin(true);
	
	addComponent(addScenarioLayout);
	setComponentAlignment(addScenarioLayout, Alignment.MIDDLE_LEFT);
	addComponent(gap4);
	addComponent(this.vlScenarios);
	
	vlScenarios.addStyleName("scenarios");
}
 
开发者ID:DHBW-Karlsruhe,项目名称:businesshorizon2,代码行数:49,代码来源:ScenarioScreenViewImpl.java


注:本文中的com.vaadin.ui.Embedded.setHeight方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。