com.google.gwt.view.client.ListDataProvider Java Examples

The following examples show how to use com.google.gwt.view.client.ListDataProvider. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PooledConnectionFactoryRuntimeView.java    From core with GNU Lesser General Public License v2.1 6 votes vote down vote up
Widget asWidget() {
    serverName = new ContentHeaderLabel();

    ProvidesKey<Property> providesKey = Property::getName;
    table = new DefaultCellTable<>(10, providesKey);
    provider = new ListDataProvider<>(providesKey);
    provider.addDataDisplay(table);
    selectionModel = new SingleSelectionModel<>(providesKey);

    setupTable();

    formPanel = new VerticalPanel();
    formPanel.setStyleName("fill-layout-width");

    MultipleToOneLayout layout = new MultipleToOneLayout()
            .setPlain(true)
            .setHeadlineWidget(serverName)
            .setDescription(SafeHtmlUtils.fromString(Console.CONSTANTS.subsys_messaging_pooled_stats_desc()))
            .setMaster(Console.MESSAGES.available("Pooled Connection Factory"), table)
            .setMasterTools(setupMasterTools())
            .addDetail("Pool Statistics", formPanel.asWidget());

    return layout.build();
}
 
Example #2
Source File: ConnectorMetricView.java    From core with GNU Lesser General Public License v2.1 6 votes vote down vote up
public ConnectorMetricView(HttpMetricPresenter presenter) {

        this.presenter = presenter;
        this.table = new DefaultCellTable(5);

        ProvidesKey<Property> keyProvider = new ProvidesKey<Property>() {
            @Override
            public Object getKey(Property property) {
                return property.getName();
            }
        };

        this.dataProvider = new ListDataProvider<Property>(keyProvider);
        this.dataProvider.addDataDisplay(table);
        this.table.setSelectionModel(new SingleSelectionModel<Property>(keyProvider));
    }
 
Example #3
Source File: RemotingEditor.java    From core with GNU Lesser General Public License v2.1 6 votes vote down vote up
RemotingEditor(DispatchAsync dispatcher, SecurityContext securityContext,
               StatementContext statementContext, AddressTemplate addressTemplate,
               ResourceDescription resourceDescription) {
    this.dispatcher = dispatcher;
    this.securityContext = securityContext;
    this.statementContext = statementContext;
    this.addressTemplate = addressTemplate;
    this.resourceDescription = resourceDescription;

    ProvidesKey<Property> providesKey = new ProvidesKey<Property>() {
        @Override
        public Object getKey(Property item) {
            return item.getName();
        }
    };
    table = new DefaultCellTable<>(5, providesKey);
    dataProvider = new ListDataProvider<>(providesKey);
    selectionModel = new SingleSelectionModel<>(providesKey);
    //noinspection unchecked
    dataProvider.addDataDisplay(table);
    table.setSelectionModel(selectionModel);
}
 
Example #4
Source File: PIDTable.java    From core with GNU Lesser General Public License v2.1 6 votes vote down vote up
Widget asWidget() {
    VerticalPanel layout = new VerticalPanel();
    layout.setStyleName("fill-layout-width");

    table = new DefaultCellTable<ConfigAdminData>(10);
    dataProvider = new ListDataProvider<ConfigAdminData>();
    dataProvider.addDataDisplay(table);

    TextColumn<ConfigAdminData> pidColumn = new TextColumn<ConfigAdminData>() {
        @Override
        public String getValue(ConfigAdminData pidEntry) {
            return pidEntry.getPid();
        }
    };
    table.addColumn(pidColumn, Console.CONSTANTS.subsys_configadmin_PIDShort());
    layout.add(table);

    DefaultPager pager = new DefaultPager();
    pager.setDisplay(table);
    layout.add(pager);

    return layout;
}
 
Example #5
Source File: ConfigEditorWS.java    From core with GNU Lesser General Public License v2.1 6 votes vote down vote up
public ConfigEditorWS(DispatchAsync dispatcher, Dispatcher circuit, SecurityContext securityContext,
        StatementContext statementContext, AddressTemplate addressTemplate,
        ResourceDescription resourceDescription, String title, WebServicePresenter presenter) {

    this.circuit = circuit;
    this.dispatcher = dispatcher;
    this.securityContext = securityContext;
    this.statementContext = statementContext;
    this.addressTemplate = addressTemplate;
    this.resourceDescription = resourceDescription;
    this.title = title;
    this.presenter = presenter;

    ProvidesKey<Property> providesKey = Property::getName;

    table = new DefaultCellTable<>(5, providesKey);
    dataProvider = new ListDataProvider<>(providesKey);
    selectionModel = new SingleSelectionModel<>(providesKey);
    dataProvider.addDataDisplay(table);
    table.setSelectionModel(selectionModel);
}
 
Example #6
Source File: HandlerEditor.java    From core with GNU Lesser General Public License v2.1 6 votes vote down vote up
public HandlerEditor(Dispatcher circuit, SecurityContext securityContext,
                     AddressTemplate addressTemplate,
                     ResourceDescription resourceDescription) {

    this.securityContext = securityContext;
    this.resourceDescription = resourceDescription;
    this.circuit = circuit;
    this.addressTemplate = addressTemplate;

    ProvidesKey<Property> providesKey = Property::getName;

    table = new DefaultCellTable<>(5, providesKey);
    dataProvider = new ListDataProvider<>(providesKey);
    selectionModel = new SingleSelectionModel<>(providesKey);
    //noinspection unchecked
    dataProvider.addDataDisplay(table);
    table.setSelectionModel(selectionModel);
}
 
Example #7
Source File: ConstantPermissionMappingEditor.java    From core with GNU Lesser General Public License v2.1 6 votes vote down vote up
@SuppressWarnings("unchecked")
public Widget asWidget() {
    VerticalPanel panel = new VerticalPanel();
    panel.addStyleName("fill-layout-width");

    setupTable();
    dataProvider = new ListDataProvider<>();
    dataProvider.addDataDisplay(table);

    panel.add(setupTableButtons());

    panel.add(table);
    DefaultPager pager = new DefaultPager();
    pager.setDisplay(table);
    panel.add(pager);
    return panel;
}
 
Example #8
Source File: SimplePermissionMappingEditor.java    From core with GNU Lesser General Public License v2.1 6 votes vote down vote up
private void setupPermissionsTable() {
    tablePermissions = new DefaultCellTable<>(5);

    Column<ModelNode, String> className = createColumn ("class-name");
    Column<ModelNode, String> module = createColumn ("module");
    Column<ModelNode, String> targetName = createColumn ("target-name");
    Column<ModelNode, String> action = createColumn ("action");
    tablePermissions.addColumn(className, "Class name");
    tablePermissions.addColumn(module, "Module");
    tablePermissions.addColumn(targetName, "Target name");
    tablePermissions.addColumn(action, "Action");
    dataProviderPermissions = new ListDataProvider<>();
    dataProviderPermissions.addDataDisplay(tablePermissions);

    popupDialogOptions.showCancel(false);
    permissionPopupLayout.setStyleName("window-content");
    permissionPopupLayout.add(tablePermissions);
}
 
Example #9
Source File: SimplePermissionMappingEditor.java    From core with GNU Lesser General Public License v2.1 6 votes vote down vote up
@SuppressWarnings("unchecked")
public Widget asWidget() {
    VerticalPanel panel = new VerticalPanel();
    panel.addStyleName("fill-layout-width");

    setupTable();
    dataProvider = new ListDataProvider<>();
    dataProvider.addDataDisplay(table);

    setupPermissionsTable();
    panel.add(setupTableButtons());


    panel.add(table);
    DefaultPager pager = new DefaultPager();
    pager.setDisplay(table);
    panel.add(pager);
    return panel;
}
 
Example #10
Source File: ServerList.java    From core with GNU Lesser General Public License v2.1 6 votes vote down vote up
public ServerList(CommonHttpPresenter presenter, boolean isRuntimeView) {

        this.presenter = presenter;
        this.isRuntimeView = isRuntimeView;

        ProvidesKey<Property> keyProvider = new ProvidesKey<Property>() {
            @Override
            public Object getKey(Property property) {
                return property.getName();
            }
        };

        if (isRuntimeView)
        {
            this.RESOURCE_ADDRESS = AddressTemplate.of("/{implicit.host}/{selected.server}/subsystem=undertow/server=*");
        }
        else
        {
            this.RESOURCE_ADDRESS = AddressTemplate.of("{selected.profile}/subsystem=undertow/server={undertow.server}");
        }

        this.table = new DefaultCellTable(5, keyProvider);
        this.dataProvider = new ListDataProvider<Property>();
        this.dataProvider.addDataDisplay(table);
        this.table.setSelectionModel(new SingleSelectionModel<Property>(keyProvider));
    }
 
Example #11
Source File: MechanismProviderFilteringSaslServerFilterEditor.java    From core with GNU Lesser General Public License v2.1 6 votes vote down vote up
@SuppressWarnings("unchecked")
public Widget asWidget() {
    VerticalPanel panel = new VerticalPanel();
    panel.addStyleName("fill-layout-width");

    setupTable();
    dataProvider = new ListDataProvider<>(nameProvider);
    dataProvider.addDataDisplay(table);

    panel.add(setupTableButtons());

    panel.add(table);
    DefaultPager pager = new DefaultPager();
    pager.setDisplay(table);
    panel.add(pager);
    return panel;
}
 
Example #12
Source File: JndiTreeParser.java    From core with GNU Lesser General Public License v2.1 6 votes vote down vote up
/**
 * Get the {@link NodeInfo} that provides the children
 * of the specified value.
 */
public <T> NodeInfo<?> getNodeInfo(T value) {

    final ListDataProvider<JndiEntry> dataProvider = new ListDataProvider<JndiEntry>();

    if (value instanceof JndiEntry) {
        JndiEntry entry = (JndiEntry)value;
        dataProvider.setList(entry.getChildren());
    } else {
        setFinish(new Command() {
            @Override
            public void execute() {
                dataProvider.setList(rootEntry.getChildren());
            }
        });
    }

    return new DefaultNodeInfo<JndiEntry>(dataProvider, new JndiEntryCell(), selectionModel, null);
}
 
Example #13
Source File: MasterDetailEditor.java    From core with GNU Lesser General Public License v2.1 6 votes vote down vote up
MasterDetailEditor(final SecurityContext securityContext,
        final StatementContext statementContext,
        final ResourceDescription resourceDescription,
        final String resourceName) {
    this.securityContext = securityContext;
    this.statementContext = statementContext;
    this.resourceDescription = resourceDescription;
    this.resourceName = resourceName;

    //noinspection Convert2MethodRef
    ProvidesKey<Property> providesKey = item -> item.getName();
    table = new DefaultCellTable<>(5, providesKey);
    dataProvider = new ListDataProvider<>(providesKey);
    selectionModel = new SingleSelectionModel<>(providesKey);
    //noinspection unchecked
    dataProvider.addDataDisplay(table);
    table.setSelectionModel(selectionModel);
}
 
Example #14
Source File: IOPanel.java    From core with GNU Lesser General Public License v2.1 6 votes vote down vote up
@SuppressWarnings("unchecked")
public IOPanel(AddressTemplate address, IOPresenter presenter) {
    this.address = address;
    this.presenter = presenter;
    this.providesKey = new ProvidesKey<Property>() {
        @Override
        public Object getKey(Property item) {
            return item.getName();
        }
    };
    this.table = new DefaultCellTable<>(5, providesKey);
    this.dataProvider = new ListDataProvider<Property>(providesKey);
    this.selectionModel = new SingleSelectionModel<Property>(providesKey);

    dataProvider.addDataDisplay(table);
    table.setSelectionModel(selectionModel);
}
 
Example #15
Source File: SecurityDomainRealmEditor.java    From core with GNU Lesser General Public License v2.1 6 votes vote down vote up
@SuppressWarnings("unchecked")
public Widget asWidget() {
    VerticalPanel panel = new VerticalPanel();
    panel.addStyleName("fill-layout-width");

    setupTable();
    dataProvider = new ListDataProvider<>();
    dataProvider.addDataDisplay(table);

    panel.add(setupTableButtons());

    panel.add(table);
    DefaultPager pager = new DefaultPager();
    pager.setDisplay(table);
    panel.add(pager);
    return panel;
}
 
Example #16
Source File: GenericListComplexAttribute.java    From core with GNU Lesser General Public License v2.1 6 votes vote down vote up
@SuppressWarnings("unchecked")
public Widget asWidget() {
    VerticalPanel panel = new VerticalPanel();
    panel.addStyleName("fill-layout-width");

    setupTable();
    dataProvider = new ListDataProvider<>();
    dataProvider.addDataDisplay(table);

    panel.add(setupTableButtons());

    panel.add(table);
    DefaultPager pager = new DefaultPager();
    pager.setDisplay(table);
    panel.add(pager);
    return panel;
}
 
Example #17
Source File: MasterDetailTemplate.java    From core with GNU Lesser General Public License v2.1 5 votes vote down vote up
public MasterDetailTemplate(LoggerPresenter presenter, AddressTemplate address, String title) {
    this.presenter = presenter;
    this.address = address;
    this.title = title;
    ProvidesKey<Property> providesKey = Property::getName;
    this.table = new DefaultCellTable(5, providesKey);
    this.dataProvider = new ListDataProvider<Property>(providesKey);
    this.dataProvider.addDataDisplay(table);
}
 
Example #18
Source File: CategoryView.java    From core with GNU Lesser General Public License v2.1 5 votes vote down vote up
public CategoryView(LoggerPresenter presenter) {
    this.presenter = presenter;
    ProvidesKey<Property> providesKey = Property::getName;
    this.table = new DefaultCellTable<>(5, providesKey);
    this.dataProvider = new ListDataProvider<>(providesKey);
    this.dataProvider.addDataDisplay(table);
}
 
Example #19
Source File: HostView.java    From core with GNU Lesser General Public License v2.1 5 votes vote down vote up
public HostView(HttpPresenter presenter) {
    this.presenter = presenter;
    this.table = new DefaultCellTable(5);
    this.dataProvider = new ListDataProvider<Property>();
    this.dataProvider.addDataDisplay(table);
    this.table.setSelectionModel(new SingleSelectionModel<Property>());
    securityContext = presenter.getSecurityFramework().getSecurityContext(presenter.getProxy().getNameToken());
    definition = presenter.getDescriptionRegistry().lookup(BASE_ADDRESS);
    filterRefEditor = new FilterRefEditor(presenter, BASE_ADDRESS.append("filter-ref=*"));
    selectionModel = new SingleSelectionModel<>();
}
 
Example #20
Source File: AbstractListenerView.java    From core with GNU Lesser General Public License v2.1 5 votes vote down vote up
public AbstractListenerView(HttpPresenter presenter, AddressTemplate baseAddress, String entityName) {
    this.presenter = presenter;
    this.baseAddress = baseAddress;
    this.entityName = entityName;

    ProvidesKey<Property> providesKey = Property::getName;
    this.table = new DefaultCellTable<>(5, providesKey);
    this.dataProvider = new ListDataProvider<>(providesKey);
    this.dataProvider.addDataDisplay(table);
    this.table.setSelectionModel(new SingleSelectionModel<Property>());
}
 
Example #21
Source File: ContainerList.java    From core with GNU Lesser General Public License v2.1 5 votes vote down vote up
public ContainerList(ServletPresenter presenter) {

        this.presenter = presenter;
        this.table = new DefaultCellTable(5);
        this.dataProvider = new ListDataProvider<Property>();
        this.dataProvider.addDataDisplay(table);
        this.table.setSelectionModel(new SingleSelectionModel<Property>());
    }
 
Example #22
Source File: GenericAliasEditor.java    From core with GNU Lesser General Public License v2.1 5 votes vote down vote up
public Widget asWidget() {
    VerticalPanel panel = new VerticalPanel();
    panel.addStyleName("fill-layout-width");

    setupTable();
    dataProvider = new ListDataProvider<>();
    dataProvider.addDataDisplay(table);

    panel.add(setupTableButtons());

    panel.add(table);
    DefaultPager pager = new DefaultPager();
    pager.setDisplay(table);
    panel.add(pager);
    selectionModel.addSelectionChangeHandler(selectionChangeEvent -> {
        ModelNode selected = selectionModel.getSelectedObject();
        if (selected != null) {
            removeButton.setEnabled(true);
            editButton.setEnabled(true);
        } else {
            removeButton.setEnabled(false);
            editButton.setEnabled(false);

        }
    });
    return panel;
}
 
Example #23
Source File: FilterEditor.java    From core with GNU Lesser General Public License v2.1 5 votes vote down vote up
public FilterEditor(FilterPresenter presenter, AddressTemplate addressTemplate, String title, boolean showDeprecated) {
    this.presenter = presenter;
    this.showDeprecated = showDeprecated;
    ProvidesKey<Property> providesKey = Property::getName;
    this.selectionModel = new SingleSelectionModel<>(providesKey);
    this.table = new DefaultCellTable(5, providesKey);
    this.table.setSelectionModel(selectionModel);
    this.dataProvider = new ListDataProvider<>(providesKey);
    this.dataProvider.addDataDisplay(table);
    securityContext = presenter.getSecurityFramework().getSecurityContext(presenter.getProxy().getNameToken());
    definition = presenter.getDescriptionRegistry().lookup(addressTemplate);
    this.addressTemplate = addressTemplate;
    this.title = title;
}
 
Example #24
Source File: PersonPanelView.java    From demo-gwt-springboot with Apache License 2.0 5 votes vote down vote up
private void initFilterDataProvider(DataGrid<PersonDto> dataGrid) {
	dataProviderFilter = new ListDataProvider<>(new ArrayList<PersonDto>(0));
	dataProviderFilter.addDataDisplay(dataGrid);

	// Set the message to display when the table is empty.
	dataGrid.setEmptyTableWidget(new Label("No Data"));

}
 
Example #25
Source File: JMSBridgeList.java    From core with GNU Lesser General Public License v2.1 5 votes vote down vote up
JMSBridgeList(JMSBridgePresenter presenter) {
    this.presenter = presenter;
    ProvidesKey<Property> providesKey = Property::getName;
    this.table = new DefaultCellTable<>(8, providesKey);
    this.dataProvider = new ListDataProvider<>(providesKey);
    this.dataProvider.addDataDisplay(table);
    this.selectionModel = new SingleSelectionModel<>(providesKey);
    this.table.setSelectionModel(selectionModel);
}
 
Example #26
Source File: PooledConnectionFactoryView.java    From core with GNU Lesser General Public License v2.1 5 votes vote down vote up
@SuppressWarnings("unchecked")
Widget asWidget() {
    serverName = new ContentHeaderLabel();

    ProvidesKey<Property> providesKey = Property::getName;
    table = new DefaultCellTable<>(10, providesKey);
    provider = new ListDataProvider<>(providesKey);
    provider.addDataDisplay(table);
    selectionModel = new SingleSelectionModel<>(providesKey);

    setupTable();

    VerticalPanel formPanel = new VerticalPanel();
    formPanel.setStyleName("fill-layout-width");
    formPanel.add(modelForm.getHelp().asWidget());
    formPanel.add(modelForm.getForm().asWidget());

    MultipleToOneLayout layout = new MultipleToOneLayout()
            .setPlain(true)
            .setHeadlineWidget(serverName)
            .setDescription(SafeHtmlUtils.fromString(pooledConnectionDescription.get(DESCRIPTION).asString()))
            .setMaster(Console.MESSAGES.available("Pooled Connection Factory"), table)
            .setMasterTools(setupMasterTools())
            .addDetail(Console.CONSTANTS.common_label_attributes(), formPanel.asWidget());

    return layout.build();
}
 
Example #27
Source File: ServiceViewTemplate.java    From core with GNU Lesser General Public License v2.1 5 votes vote down vote up
public ServiceViewTemplate(EEPresenter presenter, String title, AddressTemplate address) {

        this.title = title;
        this.presenter = presenter;
        this.address = address;
        ProvidesKey<Property> providesKey = Property::getName;
        this.table = new DefaultCellTable<>(5, providesKey);
        this.dataProvider = new ListDataProvider<>(providesKey);
        this.dataProvider.addDataDisplay(table);
    }
 
Example #28
Source File: ApplicationSecurityDomainView.java    From core with GNU Lesser General Public License v2.1 5 votes vote down vote up
public ApplicationSecurityDomainView(EJB3Presenter presenter) {
    this.presenter = presenter;
    this.selectionModel = new SingleSelectionModel<>();
    ProvidesKey<Property> providesKey = Property::getName;
    this.table = new DefaultCellTable<>(5, providesKey);
    this.table.setSelectionModel(selectionModel);
    this.dataProvider = new ListDataProvider<>(providesKey);
    this.dataProvider.addDataDisplay(this.table);
}
 
Example #29
Source File: ThreadPoolView.java    From core with GNU Lesser General Public License v2.1 5 votes vote down vote up
public ThreadPoolView(EJB3Presenter presenter) {
    this.presenter = presenter;
    ProvidesKey<Property> providesKey = Property::getName;
    this.table = new DefaultCellTable<>(5, providesKey);
    this.dataProvider = new ListDataProvider<>(providesKey);
    this.dataProvider.addDataDisplay(table);
}
 
Example #30
Source File: BeanPoolView.java    From core with GNU Lesser General Public License v2.1 5 votes vote down vote up
public BeanPoolView(EJB3Presenter presenter) {
    this.presenter = presenter;
    ProvidesKey<Property> providesKey = Property::getName;
    this.table = new DefaultCellTable(5, providesKey);
    this.dataProvider = new ListDataProvider<>(providesKey);
    this.dataProvider.addDataDisplay(table);
}