本文整理了Java中com.vaadin.v7.ui.Table.setWidth()
方法的一些代码示例,展示了Table.setWidth()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.setWidth()
方法的具体详情如下:
包路径:com.vaadin.v7.ui.Table
类名称:Table
方法名:setWidth
暂无
代码示例来源:origin: com.haulmont.cuba/cuba-web
@Override
public void setWidth(float width, Unit unit) {
super.setWidth(width, unit);
if (getWidth() < 0) {
table.setWidthUndefined();
} else {
table.setWidth(100, Unit.PERCENTAGE);
}
}
代码示例来源:origin: info.magnolia.activation/magnolia-module-activation
private Layout createPublicInstancesSection() {
VerticalLayout layout = new VerticalLayout();
StaticField fieldsetTitle = createStaticField(null, i18n.translate("activationMonitor.publicInstances.fieldset.label"));
fieldsetTitle.addStyleName("fieldset-title");
layout.addComponent(fieldsetTitle);
if (activationStorage.getSubscriberResponseTimes().size() > 0) {
Table table = new Table();
table.setSelectable(false);
table.setMultiSelect(false);
table.setImmediate(false);
table.setWidth("100%");
table.setPageLength(5);
table.addContainerProperty(i18n.translate("activationMonitor.publicInstances.subscriber.label"), String.class, null);
table.addContainerProperty(i18n.translate("activationMonitor.publicInstances.max.label"), Long.class, null);
table.addContainerProperty(i18n.translate("activationMonitor.publicInstances.min.label"), Long.class, null);
table.addContainerProperty(i18n.translate("activationMonitor.publicInstances.avg.label"), Long.class, null);
int i = 0;
for (Map.Entry<String, ResponseTimeEntry> entry : activationStorage.getSubscriberResponseTimes().entrySet()) {
String subscriber = entry.getKey();
long max = entry.getValue().getMax();
long min = entry.getValue().getMin();
long avg = entry.getValue().getAvg();
table.addItem(new Object[]{subscriber, max, min, avg}, i++);
}
layout.addComponent(table);
} else {
layout.addComponent(createStaticField(null, i18n.translate("activationMonitor.publicInstances.noActivations.label")));
}
return layout;
}
代码示例来源:origin: OpenNMS/opennms
/**
* Instantiates a new MIB object field.
*
* @param resourceTypes the available resource types
* @param mibGroupEditable true, if the MIB group can be modified
*/
public MibObjField(final List<String> resourceTypes, boolean mibGroupEditable) {
table.addStyleName("light");
table.setVisibleColumns(new Object[] { "oid", "instance", "alias", "type" });
table.setColumnHeaders(new String[] { "OID", "Instance", "Alias", "Type" });
table.setEditable(!isReadOnly());
table.setSelectable(true);
table.setHeight("250px");
table.setWidth("100%");
table.setTableFieldFactory(new MibObjFieldFactory(resourceTypes));
if (mibGroupEditable) {
toolbar.addComponent(add);
toolbar.addComponent(delete);
}
toolbar.setVisible(table.isEditable());
setValidationVisible(true);
}
代码示例来源:origin: OpenNMS/opennms
table.setSelectable(true);
table.setHeight("125px");
table.setWidth("100%");
table.setTableFieldFactory(new DefaultFieldFactory() {
@Override
代码示例来源:origin: OpenNMS/opennms
table.setSelectable(true);
table.setHeight("125px");
table.setWidth("100%");
table.setTableFieldFactory(new DefaultFieldFactory() {
@Override
代码示例来源:origin: info.magnolia.activation/magnolia-module-activation
table.setMultiSelect(false);
table.setImmediate(false);
table.setWidth("100%");
table.setPageLength(10);
代码示例来源:origin: OpenNMS/opennms
table.setSelectable(true);
table.setHeight("125px");
table.setWidth("100%");
table.setTableFieldFactory(new DefaultFieldFactory() {
@Override
代码示例来源:origin: OpenNMS/opennms
table.setSelectable(true);
table.setHeight("125px");
table.setWidth("100%");
代码示例来源:origin: info.magnolia.activation/magnolia-module-activation
table.setMultiSelect(false);
table.setImmediate(false);
table.setWidth("100%");
table.setPageLength(10);
代码示例来源:origin: OpenNMS/opennms
columnsTable.setWidth(25, Unit.PERCENTAGE);
rowsTable.setWidth(25, Unit.PERCENTAGE);
内容来源于网络,如有侵权,请联系作者删除!