Package org.uberfire.client.tables

Examples of org.uberfire.client.tables.ResizableHeader


    }

    public void addColumn( final Column<JarListPageRow, ?> column,
                           final Comparator<JarListPageRow> comparator,
                           final String columnName ) {
        cellTable.addColumn( column, new ResizableHeader( columnName,
                                                          cellTable,
                                                          column ) );
    }
View Full Code Here


            @Override
            public String getValue( JarListPageRow row ) {
                return row.getName();
            }
        };
        cellTable.addColumn( nameColumn, new ResizableHeader(M2RepoEditorConstants.INSTANCE.Name(),
                                                              cellTable,
                                                              nameColumn ) );

        final Column<JarListPageRow, String> pathColumn = new Column<JarListPageRow, String>( new TextCell() ) {
            @Override
            public String getValue( JarListPageRow row ) {
                return row.getPath();
            }
        };
        cellTable.addColumn( pathColumn, new ResizableHeader( M2RepoEditorConstants.INSTANCE.Path(),
                                                              cellTable,
                                                              pathColumn ) );

        final Column<JarListPageRow, Date> lastModifiedColumn = new Column<JarListPageRow, Date>( new DateCell( DateTimeFormat.getFormat( DateTimeFormat.PredefinedFormat.DATE_TIME_MEDIUM ) ) ) {
            @Override
            public Date getValue( JarListPageRow row ) {
                return row.getLastModified();
            }
        };
        cellTable.addColumn( lastModifiedColumn, new ResizableHeader( M2RepoEditorConstants.INSTANCE.LastModified(),
                                                                      cellTable,
                                                                      lastModifiedColumn ) );

        // Add "View kjar detail" button column
        final Column<JarListPageRow, String> openColumn = new Column<JarListPageRow, String>( new ButtonCell() {{
            setSize( ButtonSize.MINI );
        }} ) {
            public String getValue( JarListPageRow row ) {
                return M2RepoEditorConstants.INSTANCE.Open();
            }
        };
        openColumn.setFieldUpdater( new FieldUpdater<JarListPageRow, String>() {
            public void update( int index,
                                JarListPageRow row,
                                String value ) {
                m2RepoService.call( new RemoteCallback<String>() {
                    @Override
                    public void callback( final String response ) {
                        JarDetailPopup popup = new JarDetailPopup( response );
                        popup.show();
                    }
                } ).loadPOMStringFromJar( row.getPath() );
            }
        } );
        cellTable.addColumn( openColumn, new ResizableHeader( M2RepoEditorConstants.INSTANCE.Open(),
                                                              cellTable,
                                                              openColumn ) );
    }
View Full Code Here

TOP

Related Classes of org.uberfire.client.tables.ResizableHeader

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.