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


Java ColumnSortEvent.ListHandler方法代码示例

本文整理汇总了Java中com.google.gwt.user.cellview.client.ColumnSortEvent.ListHandler方法的典型用法代码示例。如果您正苦于以下问题:Java ColumnSortEvent.ListHandler方法的具体用法?Java ColumnSortEvent.ListHandler怎么用?Java ColumnSortEvent.ListHandler使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.gwt.user.cellview.client.ColumnSortEvent的用法示例。


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

示例1: createAttributeNameColumn

import com.google.gwt.user.cellview.client.ColumnSortEvent; //导入方法依赖的package包/类
protected com.google.gwt.user.cellview.client.Column<Entry<String, String>, String> createAttributeNameColumn(ColumnSortEvent.ListHandler<Entry<String, String>> sortHandler) {
    // Attribute name.
    final Cell<String> nameCell = canManageAttributes() ? new EditTextCell() : new TextCell();
    final com.google.gwt.user.cellview.client.Column<Entry<String, String>, String> keyColumn = new com.google.gwt.user.cellview.client.Column<Entry<String, String>, String>(
            nameCell) {
        @Override
        public String getValue(final Entry<String, String> object) {
            return object.getKey() != null ? object.getKey() : "";
        }
    };
    keyColumn.setSortable(true);
    sortHandler.setComparator(keyColumn,
                              new Comparator<Entry<String, String>>() {
                                  @Override
                                  public int compare(Entry<String, String> o1,
                                                     Entry<String, String> o2) {
                                      return o1.getKey().compareTo(o2.getKey());
                                  }
                              });
    keyColumn.setFieldUpdater(canManageAttributes() ? keyModifiedEventHandler : null);

    return keyColumn;
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:24,代码来源:UserAttributesEditor.java

示例2: createAttributeValueColumn

import com.google.gwt.user.cellview.client.ColumnSortEvent; //导入方法依赖的package包/类
protected com.google.gwt.user.cellview.client.Column<Entry<String, String>, String> createAttributeValueColumn(ColumnSortEvent.ListHandler<Entry<String, String>> sortHandler) {
    // Attribute value.
    final Cell<String> valueCell = canManageAttributes() ? new EditTextCell() : new TextCell();
    final com.google.gwt.user.cellview.client.Column<Entry<String, String>, String> valueColumn = new com.google.gwt.user.cellview.client.Column<Entry<String, String>, String>(
            valueCell) {
        @Override
        public String getValue(final Entry<String, String> object) {
            return object.getValue() != null ? object.getValue() : "";
        }
    };
    valueColumn.setSortable(true);
    sortHandler.setComparator(valueColumn,
                              new Comparator<Entry<String, String>>() {
                                  @Override
                                  public int compare(Entry<String, String> o1,
                                                     Entry<String, String> o2) {
                                      return o1.getValue().compareTo(o2.getValue());
                                  }
                              });
    valueColumn.setFieldUpdater(canManageAttributes() ? valueModifiedEventHandler : null);

    return valueColumn;
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:24,代码来源:UserAttributesEditor.java

示例3: createColumns

import com.google.gwt.user.cellview.client.ColumnSortEvent; //导入方法依赖的package包/类
@Override
protected void createColumns(DefaultCellTable<Reference> table, ListDataProvider<Reference> dataProvider) {
    Column<Reference, String> nameColumn = new Column<Reference, String>(new ClickableTextCell()) {
        @Override
        public String getValue(Reference reference) {
            return reference.localName();
        }
    };
    nameColumn.setFieldUpdater(new FieldUpdater<Reference, String>() {
        @Override
        public void update(int index, Reference object, String value) {
            _presenter.onNavigateToReference(object, _application);
        }
    });
    nameColumn.setSortable(true);

    ColumnSortEvent.ListHandler<Reference> sortHandler = new ColumnSortEvent.ListHandler<Reference>(
            dataProvider.getList());
    sortHandler.setComparator(nameColumn, createColumnCommparator(nameColumn));

    table.addColumn(nameColumn, Singleton.MESSAGES.label_name());

    table.addColumnSortHandler(sortHandler);
    table.getColumnSortList().push(nameColumn);
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:26,代码来源:ApplicationReferencesList.java

示例4: createColumns

import com.google.gwt.user.cellview.client.ColumnSortEvent; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
protected void createColumns(DefaultCellTable<Component> table, ListDataProvider<Component> dataProvider) {
    final TextColumn<Component> nameColumn = new TextColumn<Component>() {
        @Override
        public String getValue(Component component) {
            ComponentProviderProxy provider = _componentProviders.getExtensionProviderByComponentName(component
                    .getName());
            if (provider == null) {
                return component.getName();
            }
            return provider.getDisplayName();
        }
    };
    nameColumn.setSortable(true);

    ColumnSortEvent.ListHandler<Component> sortHandler = new ColumnSortEvent.ListHandler<Component>(
            dataProvider.getList());
    sortHandler.setComparator(nameColumn, createColumnCommparator(nameColumn));

    table.addColumn(nameColumn, Singleton.MESSAGES.label_name());

    table.addColumnSortHandler(sortHandler);
    table.getColumnSortList().push(nameColumn);
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:26,代码来源:ExtensionsList.java

示例5: buildViewColumns

import com.google.gwt.user.cellview.client.ColumnSortEvent; //导入方法依赖的package包/类
protected void buildViewColumns() {
    //Remove existing columns should this be called again..
    int columnCount = view.getColumnCount();
    while (columnCount > 0) {
        view.removeColumn(0);
        columnCount = view.getColumnCount();
    }

    // Attach a column sort handler to the ListDataProvider to sort the list.
    final ColumnSortEvent.ListHandler<Notification> sortHandler = new ColumnSortEvent.ListHandler<>(logsProvider.getList());
    view.setColumnSortHandler(sortHandler);

    // Log's type.
    view.addColumn(createTypeColumn(sortHandler),
                   "Type");

    // Log element's UUID.
    view.addColumn(createContextColumn(),
                   "Context");

    // Log's message.
    view.addColumn(createMessageColumn(),
                   "Message");
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:25,代码来源:Notifications.java

示例6: createMessageColumn

import com.google.gwt.user.cellview.client.ColumnSortEvent; //导入方法依赖的package包/类
private com.google.gwt.user.cellview.client.Column<Notification, String> createMessageColumn(ColumnSortEvent.ListHandler<Notification> sortHandler) {
    // Log message.
    final Cell<String> messageCell = new TextCell();
    final com.google.gwt.user.cellview.client.Column<Notification, String> messageColumn = new com.google.gwt.user.cellview.client.Column<Notification, String>(messageCell) {
        @Override
        public String getValue(final Notification object) {
            return getNotificationSourceMessage(object);
        }
    };
    messageColumn.setSortable(false);
    return messageColumn;
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:13,代码来源:Notifications.java

示例7: initImagesGrid

import com.google.gwt.user.cellview.client.ColumnSortEvent; //导入方法依赖的package包/类
private void initImagesGrid() {
    imagesGrid = new CellTable<KieImage>(KEY_PROVIDER);
    imagesGrid.setWidth("100%", true);

    // Do not refresh the headers and footers every time the data is updated.
    imagesGrid.setAutoHeaderRefreshDisabled(true);
    imagesGrid.setAutoFooterRefreshDisabled(true);

    // Attach a column sort handler to the ListDataProvider to sort the list.
    ColumnSortEvent.ListHandler<KieImage> sortHandler = new ColumnSortEvent.ListHandler<KieImage>(imagesProvider.getList());
    imagesGrid.addColumnSortHandler(sortHandler);

    // Create a Pager to control the table.
    SimplePager.Resources pagerResources = GWT.create(SimplePager.Resources.class);
    pager = new SimplePager(SimplePager.TextLocation.CENTER, pagerResources, false, 0, true);
    pager.setDisplay(imagesGrid);

    // Add a selection model so we can select cells.
    final SelectionModel<KieImage> selectionModel = new MultiSelectionModel<KieImage>(KEY_PROVIDER);
    imagesGrid.setSelectionModel(selectionModel,
            DefaultSelectionEventManager.<KieContainer>createCheckboxManager());

    // Initialize the columns.
    initTableColumns(selectionModel, sortHandler);

    // Add the CellList to the adapter in the database.
    addDataDisplay(imagesGrid);
}
 
开发者ID:kiegroup,项目名称:kie-docker-ci,代码行数:29,代码来源:ImagesView.java

示例8: initArtifactsGrid

import com.google.gwt.user.cellview.client.ColumnSortEvent; //导入方法依赖的package包/类
private void initArtifactsGrid() {
    artifactsGrid = new CellTable<KieArtifact>(KEY_PROVIDER);
    artifactsGrid.setWidth("100%", true);

    // Do not refresh the headers and footers every time the data is updated.
    artifactsGrid.setAutoHeaderRefreshDisabled(true);
    artifactsGrid.setAutoFooterRefreshDisabled(true);

    // Attach a column sort handler to the ListDataProvider to sort the list.
    ColumnSortEvent.ListHandler<KieArtifact> sortHandler = new ColumnSortEvent.ListHandler<KieArtifact>(gridProvider.getList());
    artifactsGrid.addColumnSortHandler(sortHandler);

    // Create a Pager to control the table.
    SimplePager.Resources pagerResources = GWT.create(SimplePager.Resources.class);
    pager = new SimplePager(SimplePager.TextLocation.CENTER, pagerResources, false, 0, true);
    pager.setDisplay(artifactsGrid);

    // Add a selection model so we can select cells.
    final SelectionModel<KieArtifact> selectionModel = new MultiSelectionModel<KieArtifact>(KEY_PROVIDER);
    artifactsGrid.setSelectionModel(selectionModel,
            DefaultSelectionEventManager.<KieArtifact>createCheckboxManager());

    // Initialize the columns.
    initTableColumns(selectionModel, sortHandler);

    // Add the CellList to the adapter in the database.
    addDataDisplay(artifactsGrid);
}
 
开发者ID:kiegroup,项目名称:kie-docker-ci,代码行数:29,代码来源:ArtifactsView.java

示例9: KieContainersExplorer

import com.google.gwt.user.cellview.client.ColumnSortEvent; //导入方法依赖的package包/类
@UiConstructor
public KieContainersExplorer() {

    containerList = new CellTable<KieContainer>(KEY_PROVIDER);
    containerList.setWidth("100%", true);

    // Do not refresh the headers and footers every time the data is updated.
    containerList.setAutoHeaderRefreshDisabled(true);
    containerList.setAutoFooterRefreshDisabled(true);

    // Attach a column sort handler to the ListDataProvider to sort the list.
    ColumnSortEvent.ListHandler<KieContainer> sortHandler = new ColumnSortEvent.ListHandler<KieContainer>(containersProvider.getList());
    containerList.addColumnSortHandler(sortHandler);

    // Create a Pager to control the table.
    SimplePager.Resources pagerResources = GWT.create(SimplePager.Resources.class);
    pager = new SimplePager(SimplePager.TextLocation.CENTER, pagerResources, false, 0, true);
    pager.setDisplay(containerList);

    // Add a selection model so we can select cells.
    final SelectionModel<KieContainer> selectionModel = new MultiSelectionModel<KieContainer>(KEY_PROVIDER);
    containerList.setSelectionModel(selectionModel,
            DefaultSelectionEventManager.<KieContainer>createCheckboxManager());

    // Initialize the columns.
    initTableColumns(selectionModel, sortHandler);

    // Add the CellList to the adapter in the database.
    addDataDisplay(containerList);
    
    initWidget(uiBinder.createAndBindUi(this));
}
 
开发者ID:kiegroup,项目名称:kie-docker-ci,代码行数:33,代码来源:KieContainersExplorer.java

示例10: createTypeColumn

import com.google.gwt.user.cellview.client.ColumnSortEvent; //导入方法依赖的package包/类
private Column<Notification, String> createTypeColumn(final ColumnSortEvent.ListHandler<Notification> sortHandler) {
    final Cell<String> typeCell = new TextCell();
    final Column<Notification, String> typeColumn = new Column<Notification, String>(typeCell) {
        @Override
        public String getValue(final Notification object) {
            return getNotificationTypeMessage(object);
        }
    };
    typeColumn.setSortable(true);
    sortHandler.setComparator(typeColumn,
                              (o1, o2) -> o1.getType().compareTo(o2.getType()));
    return typeColumn;
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:14,代码来源:Notifications.java

示例11: buildViewColumns

import com.google.gwt.user.cellview.client.ColumnSortEvent; //导入方法依赖的package包/类
protected void buildViewColumns() {
    int columnCount = view.getColumnCount();
    while (columnCount > 0) {
        view.removeColumn(0);
        columnCount = view.getColumnCount();
    }
    // Attach a column sort handler to the ListDataProvider to sort the list.
    ColumnSortEvent.ListHandler<Notification> sortHandler = new ColumnSortEvent.ListHandler<Notification>(logsProvider.getList());
    view.setColumnSortHandler(sortHandler);
    // Log's type.
    final com.google.gwt.user.cellview.client.Column<Notification, String> typeColumn = createTypeColumn(sortHandler);
    if (typeColumn != null) {
        view.addColumn(typeColumn,
                       "Type");
    }
    // Log element's UUID.
    final com.google.gwt.user.cellview.client.Column<Notification, String> contextColumn = createContextColumn(sortHandler);
    if (contextColumn != null) {
        view.addColumn(contextColumn,
                       "Context");
    }
    // Log's message.
    final com.google.gwt.user.cellview.client.Column<Notification, String> messageColumn = createMessageColumn(sortHandler);
    if (messageColumn != null) {
        view.addColumn(messageColumn,
                       "Message");
    }
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:29,代码来源:Notifications.java

示例12: createTypeColumn

import com.google.gwt.user.cellview.client.ColumnSortEvent; //导入方法依赖的package包/类
private com.google.gwt.user.cellview.client.Column<Notification, String> createTypeColumn(ColumnSortEvent.ListHandler<Notification> sortHandler) {
    // Log type..
    final Cell<String> typeCell = new TextCell();
    final com.google.gwt.user.cellview.client.Column<Notification, String> typeColumn = new com.google.gwt.user.cellview.client.Column<Notification, String>(typeCell) {
        @Override
        public String getValue(final Notification object) {
            return getNotificationTypeMessage(object);
        }
    };
    typeColumn.setSortable(true);
    sortHandler.setComparator(typeColumn,
                              (o1, o2) -> o1.getType().compareTo(o2.getType()));
    return typeColumn;
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:15,代码来源:Notifications.java

示例13: createContextColumn

import com.google.gwt.user.cellview.client.ColumnSortEvent; //导入方法依赖的package包/类
private com.google.gwt.user.cellview.client.Column<Notification, String> createContextColumn(ColumnSortEvent.ListHandler<Notification> sortHandler) {
    // Log element's context.
    final Cell<String> contextCell = new TextCell();
    final com.google.gwt.user.cellview.client.Column<Notification, String> contextColumn = new com.google.gwt.user.cellview.client.Column<Notification, String>(contextCell) {
        @Override
        public String getValue(final Notification object) {
            return getNotificationContextMessage(object);
        }
    };
    contextColumn.setSortable(false);
    return contextColumn;
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:13,代码来源:Notifications.java

示例14: setColumnSortHandler

import com.google.gwt.user.cellview.client.ColumnSortEvent; //导入方法依赖的package包/类
@Override
public UserAttributesEditor.View setColumnSortHandler(ColumnSortEvent.ListHandler<Map.Entry<String, String>> sortHandler) {
    attributesGrid.addColumnSortHandler(sortHandler);
    return this;
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:6,代码来源:UserAttributesEditorView.java

示例15: setColumnSortHandler

import com.google.gwt.user.cellview.client.ColumnSortEvent; //导入方法依赖的package包/类
@Override
public Notifications.View setColumnSortHandler(final ColumnSortEvent.ListHandler<Notification> sortHandler) {
    logsGrid.addColumnSortHandler(sortHandler);
    return this;
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:6,代码来源:NotificationsView.java


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