本文整理了Java中com.vaadin.ui.Panel.setWidth()
方法的一些代码示例,展示了Panel.setWidth()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Panel.setWidth()
方法的具体详情如下:
包路径:com.vaadin.ui.Panel
类名称:Panel
方法名:setWidth
暂无
代码示例来源:origin: com.vaadin/vaadin-server
/**
* Creates a new empty panel which contains the given content.
*
* @param content
* the content for the panel.
*/
public Panel(Component content) {
registerRpc(rpc);
setContent(content);
setWidth(100, Unit.PERCENTAGE);
getState().tabIndex = -1;
}
代码示例来源:origin: com.vaadin/vaadin-server
final Integer newHeight = (Integer) variables.get("height");
if (newWidth != null && newWidth.intValue() != getWidth()) {
setWidth(newWidth.intValue(), UNITS_PIXELS);
代码示例来源:origin: fi.vm.sade.organisaatio/organisaatio-ui-widgets
/**
* @param popupWidth the popupWidth to set
*/
public void setPopupWidth(String popupWidth) {
this.popupWidth = popupWidth;
if (root != null) {
root.setWidth(popupWidth);
}
}
代码示例来源:origin: de.mhus.lib/mhu-lib-vaadin
public UiPanel() {
this.layout = new Panel();
// layout.setSizeFull();
layout.setWidth("100%");
}
代码示例来源:origin: org.aperteworkflow/gui-commons
public static Panel panel(String title, com.vaadin.ui.Component... components) {
Panel p = new Panel();
p.setWidth(100, Sizeable.UNITS_PERCENTAGE);
p.setCaption(title);
for (com.vaadin.ui.Component c : components) {
p.addComponent(c);
}
return p;
}
代码示例来源:origin: fi.vm.sade.organisaatio/organisaatio-ui-widgets
public OrganisaatioSearchPopup(OrganisaatioSearchTree orgSearch) {
orgSearchTree = orgSearch;
orgSearchTree.init();
orgSearchTree.reload();
root = new Panel();
root.setWidth(popupWidth);
root.setHeight(popupHeight);
root.addComponent(orgSearchTree);
}
代码示例来源:origin: com.haulmont.cuba/cuba-web-widgets
@Override
public void setWidth(float width, Unit unit) {
super.setWidth(width, unit);
if (getContent() != null) {
if (width < 0) {
getContent().setWidth(-1, Unit.PIXELS);
} else {
getContent().setWidth(100, Unit.PERCENTAGE);
}
}
}
代码示例来源:origin: fi.vm.sade.organisaatio/organisaatio-ui-widgets
public OrganisaatioSearchPopup(OrganisaatioSearchTree orgSearch,List<String> oids) {
orgSearchTree = orgSearch;
orgSearchTree.init();
orgSearchTree.reloadWithOids(oids);
root = new Panel();
root.setWidth(popupWidth);
root.setHeight(popupHeight);
root.addComponent(orgSearchTree);
}
代码示例来源:origin: org.aperteworkflow/gui-commons
private void wrapWithModalWindow(Form form) {
Panel panel = new Panel();
panel.setWidth("800px");
panel.setScrollable(true);
panel.addComponent(form);
setDetailsWindow(modalWindow(getMessage("dict.item"), panel));
}
代码示例来源:origin: org.ikasan/ikasan-dashboard-jar
@Override
public com.vaadin.ui.Component getPopupComponent()
{
Panel popupPanel = new Panel();
popupPanel.addStyleName(ValoTheme.PANEL_BORDERLESS);
popupPanel.setHeight("300px");
popupPanel.setWidth("300px");
popupViewLayout.setImmediate(true);
popupPanel.setContent(popupViewLayout);
popupPanel.setImmediate(true);
return popupPanel;
}
代码示例来源:origin: org.activiti/activiti-explorer
protected void addHtmlContent(String html) {
Panel panel = new Panel();
panel.setWidth(800, UNITS_PIXELS);
panel.setHeight(300, UNITS_PIXELS);
content = new Label(html, Label.CONTENT_XHTML);
content.setHeight(100, UNITS_PERCENTAGE);
panel.addComponent(content);
addComponent(panel);
}
代码示例来源:origin: de.mhus.lib/mhu-lib-vaadin6
@Override
protected Component getField() {
if (field == null) {
field = new Panel();
field.setWidth("100%");
field.setHeight("100px");
description = new Label();
description.setContentMode(Label.CONTENT_XHTML);
//description.setWidth("100%");
VerticalLayout layout = new VerticalLayout();
layout.addComponent(description);
layout.setWidth("100%");
field.setContent(layout);
}
return field;
}
代码示例来源:origin: morevaadin/More-Vaadin
@Override
protected void init(VaadinRequest request) {
SampleGrid grid = new SampleGrid();
grid.setWidth(100, Unit.PERCENTAGE);
Panel panel = new Panel(grid);
panel.setWidth(600, Unit.PIXELS);
HorizontalLayout layout = new HorizontalLayout(panel);
layout.setMargin(true);
layout.setSizeFull();
layout.setComponentAlignment(panel, Alignment.MIDDLE_CENTER);
layout.setExpandRatio(panel, 1.0f);
setContent(layout);
}
}
代码示例来源:origin: de.mhus.lib/mhu-lib-vaadin6
protected void addToCurrent(VaadinFormBuilder builder) {
if (!MString.isEmpty(getElement().getTitle())) {
panel = new Panel(getElement().getTitle());
panel.setContent(layout);
panel.setWidth("100%");
builder.addComposite((LayoutComposite)getElement(), panel);
} else
super.addToCurrent(builder);
}
代码示例来源:origin: nz.co.senanque/madura-vaadinsupport
public void afterPropertiesSet() throws Exception {
setSizeFull();
Panel panel = new Panel();
panel.setWidth("50%");
panel.addComponent(new Label(getI18nHTML(), Label.CONTENT_XHTML));
addComponent(panel);
setComponentAlignment(panel, Alignment.MIDDLE_CENTER);
m_OKButton = new Button("OK");
panel.addComponent(m_OKButton);
m_OKButton.addListener(new Button.ClickListener() {
private static final long serialVersionUID = 1904763239654990140L;
public void buttonClick(ClickEvent event) {
getViewManager().popScreen();
getViewManager().getMainWindow().requestRepaint();
}
});
}
代码示例来源:origin: org.aperteworkflow/base-widgets
private Panel getInitedWidgetTreePanel() {
widgetTree.setContainerDataSource(hierarchicalContainer);
widgetTree.setDragMode(Tree.TreeDragMode.NODE);
widgetTree.setItemCaptionPropertyId("name");
widgetTree.setDropHandler(new TreeSortDropHandler(widgetTree, hierarchicalContainer));
widgetTree.setWidth("100%");
widgetTree.addShortcutListener(getDeleteShortcutListener());
Panel panel = new Panel(getLocalizedMessage("widget-hierarchy"));
panel.setHeight("340px");
panel.setWidth("250px");
panel.addComponent(widgetTree);
return panel;
}
代码示例来源:origin: org.activiti/activiti-explorer
imagePanel.setScrollable(true);
imagePanel.addStyleName(Reindeer.PANEL_LIGHT);
imagePanel.setWidth(100, UNITS_PERCENTAGE);
imagePanel.setHeight("100%");
mainLayout.addComponent(imagePanel);
代码示例来源:origin: com.holon-platform.vaadin/holon-vaadin
/**
* Constructor
*/
public AbstractDialog() {
super();
// defaults
setModal(true);
setResizable(false);
setDraggable(false);
setClosable(false);
// style name
addStyleName("h-dialog");
// build
content = new Panel();
content.setWidth("100%");
content.addStyleName(ValoTheme.PANEL_BORDERLESS);
content.addStyleName("h-dialog-content");
actions = new HorizontalLayout();
actions.setWidth("100%");
actions.setSpacing(true);
actions.addStyleName(ValoTheme.WINDOW_BOTTOM_TOOLBAR);
actions.addStyleName("h-dialog-actions");
root = new VerticalLayout();
root.addComponent(content);
root.addComponent(actions);
setContent(root);
}
代码示例来源:origin: de.mhus.lib/mhu-lib-vaadin
public void doBuild() throws Exception {
if (form.getAdapterProvider() == null)
form.setAdapterProvider(MApi.lookup(ActivatorAdapterProvider.class, DefaultAdapterProvider.class ) );
if (isShowInformation()) {
informationPane = new VaadinUiInformation();
form.setInformationPane(informationPane);
addComponent(informationPane);
setExpandRatio(informationPane, 0);
int h = form.getModel().getInt("showInformationHeight", 0);
informationPane.setHeight(h > 0 ? h + "px" : "100px");
informationPane.setWidth("100%");
}
if (builder == null)
builder = new VaadinFormBuilder();
builder.setForm(form);
builder.doBuild();
builder.doRevert();
formPanel = new Panel();
formPanel.setWidth("100%");
formPanel.setHeight("100%");
layout = builder.getLayout();
formPanel.setContent(layout.getComponent());
addComponent(formPanel);
setExpandRatio(formPanel, 1);
}
代码示例来源:origin: org.aperteworkflow/editor
private VerticalLayout buildWidgetEditorTabContent() {
I18NSource messages = I18NSource.ThreadUtil.getThreadI18nSource();
VerticalLayout availableWidgetsLayout = new VerticalLayout();
availableWidgetsLayout.setSpacing(true);
availableWidgetsLayout.setWidth("100%");
availableWidgetsLayout.addComponent(availableWidgetsPane);
VerticalLayout stepLayout = new VerticalLayout();
stepLayout.setWidth("100%");
stepLayout.setSpacing(true);
stepLayout.setMargin(true);
stepLayout.addComponent(new Label(messages.getMessage("userstep.editor.widgets.instructions"), Label.CONTENT_XHTML));
stepLayout.addComponent(availableWidgetsLayout);
Panel treePanel = new Panel();
treePanel.setStyleName(Reindeer.PANEL_LIGHT);
treePanel.addComponent(stepTree);
treePanel.setWidth("245px");
HorizontalLayout treeAndParamLayout = new HorizontalLayout();
treeAndParamLayout.setWidth("100%");
treeAndParamLayout.setSpacing(true);
treeAndParamLayout.addComponent(treePanel);
treeAndParamLayout.addComponent(paramPanel);
treeAndParamLayout.setExpandRatio(paramPanel, 1.0f);
stepLayout.addComponent(treeAndParamLayout);
stepLayout.setExpandRatio(treeAndParamLayout, 1.0f);
return stepLayout;
}
内容来源于网络,如有侵权,请联系作者删除!