本文整理了Java中com.vaadin.ui.Layout.setWidth()
方法的一些代码示例,展示了Layout.setWidth()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Layout.setWidth()
方法的具体详情如下:
包路径:com.vaadin.ui.Layout
类名称:Layout
方法名:setWidth
暂无
代码示例来源:origin: nz.co.senanque/madura-workflow-vaadin
@PostConstruct
public void init() {
main = new VerticalLayout();
setContent(main);
setModal(true);
// main.setStyleName(Panel.STYLE_LIGHT);
main.setWidth(getWindowWidth());
main.setHeight(getWindowHeight());
panel = new VerticalLayout();
// main.setMargin(true);
main.addComponent(panel);
setCaption(m_messageSourceAccessor.getMessage("audit", "Audit"));
}
代码示例来源:origin: nz.co.senanque/madura-workflow-vaadin
@PostConstruct
public void init() {
main = new VerticalLayout();
setContent(main);
setModal(true);
// main.setStyleName(Panel.STYLE_LIGHT);
main.setWidth(getWindowWidth());
main.setHeight(getWindowHeight());
panel = new VerticalLayout();
// main.setMargin(true);
main.addComponent(panel);
setCaption(m_messageSourceAccessor.getMessage("attachments", "Attachments"));
}
@SuppressWarnings("serial")
代码示例来源:origin: nz.co.senanque/madura-workflow-vaadin
@PostConstruct
public void init() {
main = new VerticalLayout();
setContent(main);
setModal(true);
main.setWidth(getWindowWidth());
main.setHeight(getWindowHeight());
panel = new VerticalLayout();
main.addComponent(panel);
setCaption(m_messageSourceAccessor.getMessage("attachment", "Attachment"));
this.addCloseListener(new CloseListener(){
private static final long serialVersionUID = 1L;
@Override
public void windowClose(CloseEvent e) {
fireEvent(new AttachmentEvent(panel));
}});
}
public void load(final long pid) {
代码示例来源:origin: org.aperteworkflow/editor
private void initComponent() {
I18NSource messages = I18NSource.ThreadUtil.getThreadI18nSource();
privilegeDescriptionLabel = new Label(getDescription(permissionDefinition));
privilegeDescriptionLabel.setContentMode(Label.CONTENT_XHTML); // TODO don't use XHTML switch to style names
roleNameDescriptionLabel = new Label(messages.getMessage("permission.editor.assigned.roles"));
roleNameComboBox = new RoleNameComboBox();
roleNameComboBox.setHandler(this);
roleNameLayout = new CssLayout() {
@Override
protected String getCss(Component c) {
if (c instanceof PermissionWrapperBox) {
String basicCss = "float: left; margin: 3px; margin-bottom: 8px; padding: 3px; display: inline; font-weight: bold; border: 2px solid ";
return basicCss + "#287ece; -moz-border-radius: 5px; border-radius: 5px; padding-left: 6px; padding-right: 6px;";
}
return super.getCss(c);
}
};
roleNameLayout.setWidth("100%");
}
代码示例来源:origin: org.activiti/activiti-explorer
protected void initCreateButton() {
HorizontalLayout buttonLayout = new HorizontalLayout();
buttonLayout.setWidth(100, UNITS_PERCENTAGE);
form.getFooter().setWidth(100, UNITS_PERCENTAGE);
form.getFooter().addComponent(buttonLayout);
Button createButton = new Button(i18nManager.getMessage(Messages.USER_CREATE));
buttonLayout.addComponent(createButton);
buttonLayout.setComponentAlignment(createButton, Alignment.BOTTOM_RIGHT);
createButton.addListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
handleFormSubmit();
}
});
}
代码示例来源:origin: org.activiti/activiti-explorer
protected void initCreateTaskButton() {
HorizontalLayout buttonLayout = new HorizontalLayout();
buttonLayout.setWidth(100, UNITS_PERCENTAGE);
form.getFooter().setWidth(100, UNITS_PERCENTAGE);
form.getFooter().addComponent(buttonLayout);
Button createButton = new Button(i18nManager.getMessage(Messages.BUTTON_CREATE));
buttonLayout.addComponent(createButton);
buttonLayout.setComponentAlignment(createButton, Alignment.BOTTOM_RIGHT);
createButton.addListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
handleFormSubmit();
}
});
}
代码示例来源:origin: org.activiti/activiti-explorer
protected void initCreateButton() {
HorizontalLayout buttonLayout = new HorizontalLayout();
buttonLayout.setWidth(100, UNITS_PERCENTAGE);
form.getFooter().setWidth(100, UNITS_PERCENTAGE);
form.getFooter().addComponent(buttonLayout);
Button createButton = new Button(i18nManager.getMessage(Messages.GROUP_CREATE));
buttonLayout.addComponent(createButton);
buttonLayout.setComponentAlignment(createButton, Alignment.BOTTOM_RIGHT);
createButton.addListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
handleFormSubmit();
}
});
}
代码示例来源:origin: nz.co.senanque/madura-workflow-vaadin
@PostConstruct
public void init() {
final Window me = this;
MessageSourceAccessor messageSourceAccessor= new MessageSourceAccessor(m_messageSource);
Layout main = new VerticalLayout();
setContent(main);
main.setWidth("400px");
Embedded embedded = new Embedded();
embedded.setImmediate(false);
embedded.setWidth("-1px");
embedded.setHeight("-1px");
embedded.setSource(new com.vaadin.server.ThemeResource("images/logo.jpg"));
embedded.setType(1);
embedded.setMimeType("image/gif");
main.addComponent(embedded);
main.addComponent(new Label(messageSourceAccessor.getMessage("about.text")));
Label aboutInfoLabel = new Label(m_aboutInfo.toString(),ContentMode.HTML);
main.addComponent(aboutInfoLabel);
Button OK = new Button(messageSourceAccessor.getMessage("OK"));
OK.setClickShortcut( KeyCode.ENTER ) ;
OK.addStyleName( ValoTheme.BUTTON_PRIMARY ) ;
main.addComponent(OK);
OK.addClickListener(new ClickListener(){
private static final long serialVersionUID = 1L;
public void buttonClick(ClickEvent event) {
me.close();
}});
}
代码示例来源:origin: nz.co.senanque/madura-vaadinsupport
public void initialize(List<String> fields) {
Layout main = new VerticalLayout();
setLayout(main);
main.setWidth(getWindowWidth());
main.setStyleName(Panel.STYLE_LIGHT);
setFields(fields);
m_form.setSizeFull();
main.addComponent(m_form);
save = m_form.createButton("save",new SubmitButtonPainter(m_maduraSessionManager),this);
delete = m_form.createButton("delete",new SimpleButtonPainter(m_maduraSessionManager),this);
close = m_form.createButton("close",new SimpleButtonPainter(m_maduraSessionManager),this);
extraFields();
HorizontalLayout actions = new HorizontalLayout();
actions.addComponent(save);
save.addListener(this);
actions.addComponent(delete);
delete.addListener(this);
close.addListener(this);
actions.addComponent(close);
main.addComponent(actions);
}
protected void extraFields()
内容来源于网络,如有侵权,请联系作者删除!