Package org.jboss.as.console.mbui.widgets

Examples of org.jboss.as.console.mbui.widgets.ModelNodeCellTable


        final InteractionUnit<StereoTypes> interactionUnit;

        ModelNodeCellTableAdapter(final InteractionUnit<StereoTypes> interactionUnit, final EventBus coordinator)
        {
            this.panel = new VerticalPanel();
            this.table = new ModelNodeCellTable(5);
            this.interactionUnit = interactionUnit;

            DMRMapping DMRMapping = this.interactionUnit.findMapping(MappingType.DMR);

            List<ResourceAttribute> attributes = DMRMapping.getAttributes();
View Full Code Here


        final InteractionUnit<StereoTypes> interactionUnit;

        ModelNodeCellTableAdapter(final InteractionUnit<StereoTypes> interactionUnit, final EventBus coordinator)
        {
            this.panel = new VerticalPanel();
            this.table = new ModelNodeCellTable(5);
            this.interactionUnit = interactionUnit;

            DMRMapping DMRMapping = this.interactionUnit.findMapping(MappingType.DMR);

            List<ResourceAttribute> attributes = DMRMapping.getAttributes();
View Full Code Here

            public void onSelectionChange(SelectionChangeEvent event) {
                download.setEnabled(selectionModel.getSelectedObject() != null);
                view.setEnabled(selectionModel.getSelectedObject() != null);
            }
        });
        table = new ModelNodeCellTable(10, providesKey);
        table.setSelectionModel(selectionModel);
        dataProvider = new ListDataProvider<>(providesKey);
        dataProvider.addDataDisplay(table);
        ColumnSortEvent.ListHandler<ModelNode> sortHandler = new ColumnSortEvent.ListHandler<ModelNode>(
                dataProvider.getList());
View Full Code Here

            public void onSelectionChange(SelectionChangeEvent event) {
                download.setEnabled(selectionModel.getSelectedObject() != null);
                view.setEnabled(selectionModel.getSelectedObject() != null);
            }
        });
        table = new ModelNodeCellTable(10, providesKey);
        table.setSelectionModel(selectionModel);
        dataProvider = new ListDataProvider<>(providesKey);
        dataProvider.addDataDisplay(table);
        ColumnSortEvent.ListHandler<ModelNode> sortHandler = new ColumnSortEvent.ListHandler<ModelNode>(
                dataProvider.getList());
View Full Code Here

            public Object getKey(ModelNode item) {
                return item.get(FILE_NAME);
            }
        };
        selectionModel = new SingleSelectionModel<>(providesKey);
        ModelNodeCellTable table = new ModelNodeCellTable(10, providesKey);
        table.setSelectionModel(selectionModel);
        dataProvider = new ListDataProvider<>(providesKey);
        dataProvider.addDataDisplay(table);
        // TODO Somehow sorting does not work
        sortHandler = new ColumnSortEvent.ListHandler<ModelNode>(dataProvider.getList());
        table.addColumnSortHandler(sortHandler);
        panel.add(table);

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

        // column: name
        TextColumn<ModelNode> nameColumn = new TextColumn<ModelNode>() {
            @Override
            public String getValue(ModelNode node) {
                return node.get(FILE_NAME).asString();
            }
        };
        nameColumn.setSortable(true);
        sortHandler.setComparator(nameColumn, new Comparator<ModelNode>() {
            @Override
            public int compare(ModelNode node1, ModelNode node2) {
                return node1.get(FILE_NAME).asString().compareTo(node2.get(FILE_NAME).asString());
            }
        });
        table.addColumn(nameColumn, "Log File Name");

        // column: last modified
        TextColumn<ModelNode> lastModifiedColumn = new TextColumn<ModelNode>() {
            @Override
            public String getValue(ModelNode node) {
                return node.get(LAST_MODIFIED_DATE).asString();
            }
        };
        lastModifiedColumn.setSortable(true);
        sortHandler.setComparator(lastModifiedColumn, new Comparator<ModelNode>() {
            @Override
            public int compare(ModelNode node1, ModelNode node2) {
                return node1.get(LAST_MODIFIED_DATE).asString().compareTo(node2.get(LAST_MODIFIED_DATE).asString());
            }
        });
        table.addColumn(lastModifiedColumn, "Date - Time (UTC)");

        // column: size
        TextColumn<ModelNode> sizeColumn = new TextColumn<ModelNode>() {
            @Override
            public String getValue(ModelNode node) {
                double size = node.get(LogStore.FILE_SIZE).asLong() / 1024.0;
                return SIZE_FORMAT.format(size);
            }
        };
        sizeColumn.setSortable(true);
        sortHandler.setComparator(sizeColumn, new Comparator<ModelNode>() {
            @Override
            public int compare(ModelNode node1, ModelNode node2) {
                return node1.get(FILE_SIZE).asInt() - node2.get(FILE_SIZE).asInt();
            }
        });
        table.addColumn(sizeColumn, "Size (MB)");

        ScrollPanel scroll = new ScrollPanel(panel);
        LayoutPanel layout = new LayoutPanel();
        layout.add(scroll);
        layout.setWidgetTopHeight(scroll, 0, PX, 100, Style.Unit.PCT);
View Full Code Here

            }
        });
        tools.addToolButtonRight(remove);
        remove.setEnabled(false);

        table = new ModelNodeCellTable(12);
        table.addColumn(new ModelNodeColumn(new ModelNodeColumn.ValueAdapter() {
            @Override
            public String getValue(ModelNode model) {
                return model.asString();
            }
View Full Code Here

        final InteractionUnit<StereoTypes> interactionUnit;

        ModelNodeCellTableAdapter(final InteractionUnit<StereoTypes> interactionUnit, final EventBus coordinator)
        {
            this.panel = new VerticalPanel();
            this.table = new ModelNodeCellTable(5);
            this.interactionUnit = interactionUnit;

            DMRMapping DMRMapping = this.interactionUnit.findMapping(MappingType.DMR);

            List<ResourceAttribute> attributes = DMRMapping.getAttributes();
View Full Code Here

            public void onSelectionChange(SelectionChangeEvent event) {
                download.setEnabled(selectionModel.getSelectedObject() != null);
                view.setEnabled(selectionModel.getSelectedObject() != null);
            }
        });
        table = new ModelNodeCellTable(10, providesKey);
        table.setSelectionModel(selectionModel);
        dataProvider = new ListDataProvider<>(providesKey);
        dataProvider.addDataDisplay(table);
        ColumnSortEvent.ListHandler<ModelNode> sortHandler = new ColumnSortEvent.ListHandler<ModelNode>(
                dataProvider.getList());
View Full Code Here

TOP

Related Classes of org.jboss.as.console.mbui.widgets.ModelNodeCellTable

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.