src/main/java/edu/kit/informatik/pcc/webinterface/gui/VideoTable.java
/**
     * This method sets the table entries up.
     */
This method sets the table entries up.
This method sets the table entries up .
private void prepareEntries() {
        int i = 2;
        for (Video v : videos) {
            Button download = new Button(FontAwesome.DOWNLOAD);
            FileDownloader downloader = new FileDownloader(
                    VideoDataManager.createDownloadFileProxy(v.getId(), v.getName(), getSession()));
            downloader.extend(download);
            Button info = new Button(FontAwesome.INFO);
            info.addClickListener(
                    (ClickListener) event -> MessageBox.createInfo()
                            .withMessage(v.getInfo())
                            .open()
            );
            Button delete = new Button(FontAwesome.REMOVE);
            delete.addClickListener(
                    (ClickListener) event -> {
                        VideoDataManager.deleteVideo(v.getId(), getSession());
                        update();
                    }
            );
            this.addItem(new Object[]{v.getName(), download, info, delete}, i);
            i++;
        }
    }
private void prepareEntries ( ) { int i = 2 ; for ( Video v : videos ) { Button download = new Button ( FontAwesome . DOWNLOAD ) ; FileDownloader downloader = new FileDownloader ( VideoDataManager . createDownloadFileProxy ( v . getId ( ) , v . getName ( ) , getSession ( ) ) ) ; downloader . extend ( download ) ; Button info = new Button ( FontAwesome . INFO ) ; info . addClickListener ( ( ClickListener ) event -> MessageBox . createInfo ( ) . withMessage ( v . getInfo ( ) ) . open ( ) ) ; Button delete = new Button ( FontAwesome . REMOVE ) ; delete . addClickListener ( ( ClickListener ) event -> { VideoDataManager . deleteVideo ( v . getId ( ) , getSession ( ) ) ; update ( ) ; } ) ; this . addItem ( new Object [ ] { v . getName ( ) , download , info , delete } , i ) ; i ++ ; } }
This method sets the table entries up.
This method sets the table entries up .