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


Java Table类代码示例

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


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

示例1: createTable

import com.vaadin.ui.Table; //导入依赖的package包/类
private Table createTable() {
    Table table = new Table();
    table.setSizeFull();
    table.setPageLength(0);
    table.setSelectable(false);
    table.setColumnCollapsingAllowed(true);
    table.setColumnReorderingAllowed(true);
    table.setImmediate(true);
    table.setNullSelectionAllowed(false);
    table.setColumnHeaderMode(Table.ColumnHeaderMode.HIDDEN);
    table.addContainerProperty("Name", String.class, null);
    table.addContainerProperty("Value", String.class, null);

    // initializing email table with empty values
    table.addItem(new Object[] { "Outgoing Mail Server (SMTP): ", "" }, new Integer(1));
    table.addItem(new Object[] { "Port: ", "" }, new Integer(2));
    table.addItem(new Object[] { "Email Id: ", "" }, new Integer(3));

    return table;
}
 
开发者ID:opensecuritycontroller,项目名称:osc-core,代码行数:21,代码来源:EmailLayout.java

示例2: getFilterButtonDropHandler

import com.vaadin.ui.Table; //导入依赖的package包/类
@Override
protected DropHandler getFilterButtonDropHandler() {

    return new DropHandler() {
        private static final long serialVersionUID = 1L;

        @Override
        public AcceptCriterion getAcceptCriterion() {
            return managementViewClientCriterion;
        }

        @Override
        public void drop(final DragAndDropEvent event) {
            if (validate(event) && isNoTagAssigned(event)) {
                final TableTransferable tbl = (TableTransferable) event.getTransferable();
                final Table source = tbl.getSourceComponent();
                if (source.getId().equals(UIComponentIdProvider.TARGET_TABLE_ID)) {
                    UI.getCurrent().access(() -> processTargetDrop(event));
                }
            }
        }
    };
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:24,代码来源:TargetTagFilterButtons.java

示例3: getStyle

import com.vaadin.ui.Table; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public String getStyle(Table source, final Object itemId, final Object propertyId) {
	return requireDataSource().get(itemId).map(i -> {
		if (propertyId == null) {
			// row style
			if (!rowStyleGenerators.isEmpty()) {
				return generateRowStyle(i);
			}
		} else {
			// property (cell) style
			return generatePropertyStyle((P) propertyId, i);
		}
		return null;
	}).orElse(null);
}
 
开发者ID:holon-platform,项目名称:holon-vaadin7,代码行数:17,代码来源:DefaultItemListing.java

示例4: addBooleanColumn

import com.vaadin.ui.Table; //导入依赖的package包/类
/** Ajoute une case a cocher a la place de O et N
 * @param property
 */
public void addBooleanColumn(String property, Boolean alignCenter){
	addGeneratedColumn(property, new Table.ColumnGenerator() {
           /**serialVersionUID**/
		private static final long serialVersionUID = -3483685206189347289L;

		@Override
           public Object generateCell(Table source, Object itemId, Object columnId) {				
			try {
				Object value = PropertyUtils.getProperty(itemId,(String)columnId);
				if (value instanceof Boolean){
					return new IconLabel((Boolean)value,alignCenter);
				}else{
					return value;
				}
			} catch (Exception e) {
				return null;
			}				
           }            
       });
}
 
开发者ID:EsupPortail,项目名称:esup-ecandidat,代码行数:24,代码来源:TableFormating.java

示例5: getOptionTable

import com.vaadin.ui.Table; //导入依赖的package包/类
@SuppressWarnings("serial")
protected Panel getOptionTable() {
    this.optionTable = new Table();
    this.optionTable.setPageLength(3);
    this.optionTable.setSizeFull();
    this.optionTable.setImmediate(true);
    this.optionTable.addGeneratedColumn("Enabled", new CheckBoxGenerator());
    this.optionTable.addContainerProperty("Name", String.class, null);
    this.optionTable.addItemClickListener(new ItemClickListener() {
        @Override
        public void itemClick(ItemClickEvent event) {
            optionTableClicked(event);
        }
    });

    this.optionPanel = new Panel();
    this.optionPanel.addStyleName(StyleConstants.FORM_PANEL);
    this.optionPanel.setWidth(100, Sizeable.Unit.PERCENTAGE);
    this.optionPanel.setContent(this.optionTable);

    return this.optionPanel;

}
 
开发者ID:opensecuritycontroller,项目名称:osc-core,代码行数:24,代码来源:BaseDeploymentSpecWindow.java

示例6: colorizeValidUntilRows

import com.vaadin.ui.Table; //导入依赖的package包/类
private void colorizeValidUntilRows() {

        final Calendar calendar = Calendar.getInstance();
        calendar.add(Calendar.MONTH, this.CERT_MONTHLY_THRESHOLD);

        this.sslConfigTable.setCellStyleGenerator((Table.CellStyleGenerator) (table, itemId, propertyId) -> {
            if (propertyId != null) {
                return null;
            }
            Item item = this.sslConfigTable.getItem(itemId);
            Date validUntil = (Date) item.getItemProperty("Valid until").getValue();
            if (validUntil.before(calendar.getTime())) {
                return "highlight-warning";
            } else {
                return null;
            }
        });
    }
 
开发者ID:opensecuritycontroller,项目名称:osc-core,代码行数:19,代码来源:SslConfigurationLayout.java

示例7: createNetworkTable

import com.vaadin.ui.Table; //导入依赖的package包/类
private Table createNetworkTable() {
    Table table = new Table();
    table.setSizeFull();
    table.setPageLength(0);
    table.setSelectable(false);
    table.setColumnCollapsingAllowed(true);
    table.setColumnReorderingAllowed(true);
    table.setImmediate(true);
    table.setNullSelectionAllowed(false);
    table.setColumnHeaderMode(Table.ColumnHeaderMode.HIDDEN);
    table.addContainerProperty("Name", String.class, null);
    table.addContainerProperty("Value", String.class, null);

    // initializing network table with empty values
    table.addItem(new Object[] { "IPv4 Address: ", "" }, new Integer(1));
    table.addItem(new Object[] { "Netmask:", "" }, new Integer(2));
    table.addItem(new Object[] { "Default Gateway: ", "" }, new Integer(3));
    table.addItem(new Object[] { "Primary DNS Server: ", "" }, new Integer(4));
    table.addItem(new Object[] { "Secondary DNS Server: ", "" }, new Integer(5));
    return table;
}
 
开发者ID:opensecuritycontroller,项目名称:osc-core,代码行数:22,代码来源:NetworkLayout.java

示例8: createNATTable

import com.vaadin.ui.Table; //导入依赖的package包/类
private Table createNATTable() {
    Table table = new Table();
    table.setSizeFull();
    table.setPageLength(0);
    table.setSelectable(false);
    table.setColumnCollapsingAllowed(true);
    table.setColumnReorderingAllowed(true);
    table.setImmediate(true);
    table.setNullSelectionAllowed(false);
    table.setColumnHeaderMode(Table.ColumnHeaderMode.HIDDEN);
    table.addContainerProperty("Name", String.class, null);
    table.addContainerProperty("Value", String.class, null);

    // initializing network table with empty values
    table.addItem(new Object[] { "Public IPv4 Address: ", "" }, new Integer(1));
    return table;
}
 
开发者ID:opensecuritycontroller,项目名称:osc-core,代码行数:18,代码来源:NetworkLayout.java

示例9: addCommonTableItems

import com.vaadin.ui.Table; //导入依赖的package包/类
private void addCommonTableItems(Table statusTable) {
    statusTable.setImmediate(true);
    statusTable.setStyleName(ValoTheme.TABLE_COMPACT);

    statusTable.addContainerProperty("Property", String.class, "");
    statusTable.addContainerProperty("Value", String.class, "");
    statusTable.setColumnHeaderMode(Table.ColumnHeaderMode.HIDDEN);
    statusTable.setPageLength(0);
    statusTable.setReadOnly(true);

    statusTable.addItem(new Object[] { "Name: ", "" }, new Integer(1));
    statusTable.addItem(new Object[] { "Local IP: ", "" }, new Integer(2));
    statusTable.addItem(new Object[] { "Public IP: ", "" }, new Integer(3));
    statusTable.addItem(new Object[] { "V.Server: ", "" }, new Integer(4));
    statusTable.addItem(new Object[] { "Manager IP: ", "" }, new Integer(5));
}
 
开发者ID:opensecuritycontroller,项目名称:osc-core,代码行数:17,代码来源:AgentStatusWindow.java

示例10: getAttributesPanel

import com.vaadin.ui.Table; //导入依赖的package包/类
protected Panel getAttributesPanel() {

        this.sharedKey = new PasswordField();
        this.sharedKey.setRequiredError("shared secret key cannot be empty");
        this.sharedKey.setRequired(true);
        // best show/hide this conditionally based on Manager type.
        this.sharedKey.setValue("dummy1234");

        this.attributes = new Table();
        this.attributes.setPageLength(0);
        this.attributes.setSelectable(true);
        this.attributes.setSizeFull();
        this.attributes.setImmediate(true);

        this.attributes.addContainerProperty("Attribute Name", String.class, null);
        this.attributes.addContainerProperty("Value", PasswordField.class, null);
        this.attributes.addItem(new Object[] { "Shared Secret key", this.sharedKey }, new Integer(1));
        // creating panel to store attributes table
        this.attributePanel = new Panel("Common Appliance Configuration Attributes:");
        this.attributePanel.addStyleName("form_Panel");
        this.attributePanel.setWidth(100, Sizeable.Unit.PERCENTAGE);
        this.attributePanel.setContent(this.attributes);

        return this.attributePanel;
    }
 
开发者ID:opensecuritycontroller,项目名称:osc-core,代码行数:26,代码来源:BaseDAWindow.java

示例11: TableReporteConductores

import com.vaadin.ui.Table; //导入依赖的package包/类
public TableReporteConductores() {
	this.setSizeFull();
	this.setSelectable(true);
	this.setMultiSelect(true);
	this.setImmediate(true);

	setColumnHeaderMode(Table.ColumnHeaderMode.EXPLICIT);

	addContainerProperty("nroConductor", String.class, null);
	setColumnHeader("nroConductor", "Nro Conductor");
	setColumnAlignment("nroConductor", Table.Align.CENTER);

	setVisibleColumns(new Object[] { "nroConductor" });

	setColumnReorderingAllowed(true);
	setColumnCollapsingAllowed(true);

	setHeight(40.0f, Unit.PERCENTAGE);
	
}
 
开发者ID:damiancom,项目名称:garantia,代码行数:21,代码来源:TableReporteConductores.java

示例12: handleAction

import com.vaadin.ui.Table; //导入依赖的package包/类
@Override
public void handleAction(final Action action, final Object sender,
        final Object target) {
    if (action == report) {
        createNewReportFromSelection();
    } else if (action == discard) {
        Notification.show("Not implemented in this demo");
    } else if (action == details) {
        Item item = ((Table) sender).getItem(target);
        if (item != null) {
            Long movieId = (Long) item.getItemProperty("movieId")
                    .getValue();
            MovieDetailsWindow.open(DashboardUI.getDataProvider()
                    .getMovie(movieId), null, null);
        }
    }
}
 
开发者ID:mcollovati,项目名称:vaadin-vertx-samples,代码行数:18,代码来源:TransactionsView.java

示例13: generateUi

import com.vaadin.ui.Table; //导入依赖的package包/类
private void generateUi() {
	logger.debug("GenerateUi aufgerufen");
	headerLabel = new Label("Direkte Eingabe der Cash-Flows (in EUR)");
	gap = new Label();
	inputTable = new Table();
	expandingGap = new Label();

	headerLabel.setStyleName("periodHeaderLabel");
	gap.setHeight("15px");
	inputTable.setWidth(100, UNITS_PERCENTAGE);
	inputTable.setStyleName("fcfTable");
	inputTable.setPageLength(3);
	expandingGap.setHeight(100, UNITS_PERCENTAGE);

	addComponent(headerLabel);
	addComponent(gap);
	addComponent(inputTable);
	addComponent(expandingGap);

	setExpandRatio(expandingGap, 1.0f);

}
 
开发者ID:DHBW-Karlsruhe,项目名称:businesshorizon2,代码行数:23,代码来源:DirektViewImpl.java

示例14: convertColumnAlignment

import com.vaadin.ui.Table; //导入依赖的package包/类
public static Table.Align convertColumnAlignment(com.haulmont.cuba.gui.components.Table.ColumnAlignment alignment) {
    if (alignment == null) {
        return null;
    }

    switch (alignment) {
        case LEFT:
            return Table.Align.LEFT;
        case CENTER:
            return Table.Align.CENTER;
        case RIGHT:
            return Table.Align.RIGHT;
        default:
            throw new UnsupportedOperationException();
    }
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:17,代码来源:WebComponentsHelper.java

示例15: buildMainLayout

import com.vaadin.ui.Table; //导入依赖的package包/类
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(false);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// tableResolvers
	tableResolvers = new Table();
	tableResolvers.setCaption("Resolvers");
	tableResolvers.setImmediate(false);
	tableResolvers.setWidth("-1px");
	tableResolvers.setHeight("-1px");
	mainLayout.addComponent(tableResolvers);
	
	return mainLayout;
}
 
开发者ID:apache,项目名称:incubator-openaz,代码行数:25,代码来源:PIPResolverComponent.java


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