Package com.vaadin.ui.Table

Examples of com.vaadin.ui.Table.CellStyleGenerator


                public Component generateCell(Table source, Object itemId,
                        Object columnId) {
                    return new Label("Item " + itemId);
                }
            });
            table.setCellStyleGenerator(new CellStyleGenerator() {
                @Override
                public String getStyle(Table source, Object itemId,
                        Object propertyId) {
                    if (new Integer(4).equals(itemId)) {
                        if (propertyId == null) {
View Full Code Here


                return new Label(col1 + "-" + col2);
            }
        });

        t.addContainerProperty("col 4", String.class, "");
        t.setCellStyleGenerator(new CellStyleGenerator() {

            @Override
            public String getStyle(Table source, Object itemId,
                    Object propertyId) {
                if ("col 1 (red)".equals(propertyId)) {
View Full Code Here

        for (int i = 1; i <= rows; ++i) {
            testData(table.addItem("row" + i), i);
        }

        table.setCellStyleGenerator(new CellStyleGenerator() {
            @Override
            public String getStyle(Table source, Object itemId,
                    Object propertyId) {
                if (itemId.equals(lastDoubleClickedItemId)) {
                    return "bold";
View Full Code Here

    protected void setup() {
        TestUtils
                .injectCSS(getMainWindow(),
                        ".v-table-cell-content-red{background:red;}.v-table-row-blue{background:blue;}");

        CellStyleGenerator g = new CellStyleGenerator() {

            @Override
            public String getStyle(Table source, Object itemId,
                    Object propertyId) {
                if (propertyId != null && propertyId.equals("red")) {
View Full Code Here

    public void addRelatedItems(List items) {
        m_relatedItems.addAll(items);
    }

    public CellStyleGenerator createCellStyleGenerator() {
        return new CellStyleGenerator() {
            public String getStyle(Object itemId, Object propertyId) {
                if (propertyId == null) {
                    // no propertyId, styling row
                    for (RepositoryObject o : m_associatedItems) {
                        if (equals(itemId, o)) {
View Full Code Here

    attachmentTypes.setImmediate(true);
    attachmentTypes.setNullSelectionAllowed(false);
    attachmentTypes.setWidth(200, UNITS_PIXELS);
    attachmentTypes.setHeight(100, UNITS_PERCENTAGE);

    attachmentTypes.setCellStyleGenerator(new CellStyleGenerator() {
      private static final long serialVersionUID = 1L;
      public String getStyle(Object itemId, Object propertyId) {
        if("name".equals(propertyId)) {
          return ExplorerLayout.STYLE_RELATED_CONTENT_CREATE_LIST_LAST_COLUMN;
        }
View Full Code Here

    attachmentTypes.setImmediate(true);
    attachmentTypes.setNullSelectionAllowed(false);
    attachmentTypes.setWidth(200, UNITS_PIXELS);
    attachmentTypes.setHeight(100, UNITS_PERCENTAGE);

    attachmentTypes.setCellStyleGenerator(new CellStyleGenerator() {
      private static final long serialVersionUID = 1L;
      public String getStyle(Object itemId, Object propertyId) {
        if("name".equals(propertyId)) {
          return ExplorerLayout.STYLE_RELATED_CONTENT_CREATE_LIST_LAST_COLUMN;
        }
View Full Code Here

    selectionTable.setImmediate(true);
    selectionTable.setNullSelectionAllowed(false);
    selectionTable.setWidth(150, UNITS_PIXELS);
    selectionTable.setHeight(100, UNITS_PERCENTAGE);

    selectionTable.setCellStyleGenerator(new CellStyleGenerator() {
      private static final long serialVersionUID = 1L;
      public String getStyle(Object itemId, Object propertyId) {
        if("name".equals(propertyId)) {
          return ExplorerLayout.STYLE_RELATED_CONTENT_CREATE_LIST_LAST_COLUMN;
        }
View Full Code Here

    public void addRelatedItems(List items) {
      m_relatedItems.addAll(items);
    }
   
    public CellStyleGenerator createCellStyleGenerator() {
      return new CellStyleGenerator() {
            public String getStyle(Object itemId, Object propertyId) {
                if (propertyId == null) {
                    // no propertyId, styling row
                    for (RepositoryObject o : m_associatedItems) {
                        if (equals(itemId, o)) {
View Full Code Here

TOP

Related Classes of com.vaadin.ui.Table.CellStyleGenerator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.