本文整理汇总了Java中com.vaadin.ui.Embedded.setType方法的典型用法代码示例。如果您正苦于以下问题:Java Embedded.setType方法的具体用法?Java Embedded.setType怎么用?Java Embedded.setType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.vaadin.ui.Embedded
的用法示例。
在下文中一共展示了Embedded.setType方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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?
}
}
}
示例2: addProcessImage
import com.vaadin.ui.Embedded; //导入方法依赖的package包/类
protected void addProcessImage() {
ProcessDefinitionEntity processDefinitionEntity = (ProcessDefinitionEntity) ((RepositoryServiceImpl) repositoryService)
.getDeployedProcessDefinition(processDefinition.getId());
// Only show when graphical notation is defined
if (processDefinitionEntity != null && processDefinitionEntity.isGraphicalNotationDefined()) {
Label header = new Label(i18nManager.getMessage(Messages.PROCESS_HEADER_DIAGRAM));
header.addStyleName(ExplorerLayout.STYLE_H3);
header.addStyleName(ExplorerLayout.STYLE_DETAIL_BLOCK);
header.addStyleName(ExplorerLayout.STYLE_NO_LINE);
panelLayout.addComponent(header);
StreamResource diagram = new ProcessDefinitionImageStreamResourceBuilder()
.buildStreamResource(processInstance, repositoryService, runtimeService);
Embedded embedded = new Embedded(null, diagram);
embedded.setType(Embedded.TYPE_IMAGE);
panelLayout.addComponent(embedded);
}
}
示例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);
}
示例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();
}
}
示例5: addDeleteWarning
import com.vaadin.ui.Embedded; //导入方法依赖的package包/类
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);
}
示例6: initImage
import com.vaadin.ui.Embedded; //导入方法依赖的package包/类
protected void initImage() {
processImageContainer = new VerticalLayout();
Label processTitle = new Label(i18nManager.getMessage(Messages.PROCESS_HEADER_DIAGRAM));
processTitle.addStyleName(ExplorerLayout.STYLE_H3);
processImageContainer.addComponent(processTitle);
if(processDefinition.getDiagramResourceName() != null) {
StreamResource diagram = new ProcessDefinitionImageStreamResourceBuilder()
.buildStreamResource(processDefinition, repositoryService);
Embedded embedded = new Embedded(null, diagram);
embedded.setType(Embedded.TYPE_IMAGE);
embedded.setSizeUndefined();
Panel imagePanel = new Panel(); // using panel for scrollbars
imagePanel.addStyleName(Reindeer.PANEL_LIGHT);
imagePanel.setWidth(100, UNITS_PERCENTAGE);
imagePanel.setHeight(400, UNITS_PIXELS);
HorizontalLayout panelLayout = new HorizontalLayout();
panelLayout.setSizeUndefined();
imagePanel.setContent(panelLayout);
imagePanel.addComponent(embedded);
processImageContainer.addComponent(imagePanel);
} else {
Label noImageAvailable = new Label(i18nManager.getMessage(Messages.PROCESS_NO_DIAGRAM));
processImageContainer.addComponent(noImageAvailable);
}
addComponent(processImageContainer);
}
示例7: 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;
}
示例8: 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");
}
示例9: addProcessImage
import com.vaadin.ui.Embedded; //导入方法依赖的package包/类
protected void addProcessImage() {
ProcessDefinitionEntity processDefinitionEntity = (ProcessDefinitionEntity) ((RepositoryServiceImpl) repositoryService)
.getDeployedProcessDefinition(processDefinition.getId());
// Only show when graphical notation is defined
if (processDefinitionEntity != null && processDefinitionEntity.isGraphicalNotationDefined()) {
Label header = new Label(i18nManager.getMessage(Messages.PROCESS_HEADER_DIAGRAM));
header.addStyleName(ExplorerLayout.STYLE_H3);
header.addStyleName(ExplorerLayout.STYLE_DETAIL_BLOCK);
header.addStyleName(ExplorerLayout.STYLE_NO_LINE);
panelLayout.addComponent(header);
StreamResource diagram = new ProcessDefinitionImageStreamResourceBuilder()
.buildStreamResource(processInstance, repositoryService, runtimeService);
Embedded embedded = new Embedded(null, diagram);
embedded.setType(Embedded.TYPE_IMAGE);
embedded.setSizeUndefined();
Panel imagePanel = new Panel(); // using panel for scrollbars
imagePanel.setScrollable(true);
imagePanel.addStyleName(Reindeer.PANEL_LIGHT);
imagePanel.setWidth(100, UNITS_PERCENTAGE);
imagePanel.setHeight(400, UNITS_PIXELS);
HorizontalLayout panelLayoutT = new HorizontalLayout();
panelLayoutT.setSizeUndefined();
imagePanel.setContent(panelLayoutT);
imagePanel.addComponent(embedded);
panelLayout.addComponent(imagePanel);
}
}
示例10: buildEmbeddedBrowser
import com.vaadin.ui.Embedded; //导入方法依赖的package包/类
/**
* The buildEmbeddedBrowser method creates a new browser instance and adds it to the
* bottom layout. The browser is set to invisible by default.
*/
private void buildEmbeddedBrowser() {
resultsBrowser = new Embedded();
resultsBrowser.setType(Embedded.TYPE_BROWSER);
resultsBrowser.setImmediate(true);
resultsBrowser.setVisible(false);
bottomLayout.addComponent(resultsBrowser);
}
示例11: 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;
}
示例12: 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;
}
示例13: 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;
}
示例14: attach
import com.vaadin.ui.Embedded; //导入方法依赖的package包/类
@Override
public void attach() {
super.attach();
ThemeResource resource = new ThemeResource("welcome-content.html");
Embedded embedded = new Embedded("", resource);
embedded.setType(Embedded.TYPE_BROWSER);
embedded.setSizeFull();
welcomeLayout.addComponent(embedded);
}
示例15: 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;
}