Search in sources :

Example 1 with MenuItem

use of com.googlecode.wicket.jquery.ui.widget.menu.MenuItem in project openmeetings by apache.

the class VideoInfo method newDownloadMenuList.

private List<IMenuItem> newDownloadMenuList() {
    List<IMenuItem> list = new ArrayList<>();
    // mp4
    list.add(new MenuItem(EXTENSION_MP4, JQueryIcon.ARROWTHICKSTOP_1_S) {

        private static final long serialVersionUID = 1L;

        @Override
        public boolean isEnabled() {
            BaseFileItem r = rm.getObject();
            return r != null && r.exists(EXTENSION_MP4) && !r.isReadOnly();
        }

        @Override
        public void onClick(AjaxRequestTarget target) {
            download.initiate(target);
        }
    });
    return list;
}
Also used : BaseFileItem(org.apache.openmeetings.db.entity.file.BaseFileItem) AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) IMenuItem(com.googlecode.wicket.jquery.ui.widget.menu.IMenuItem) ArrayList(java.util.ArrayList) IMenuItem(com.googlecode.wicket.jquery.ui.widget.menu.IMenuItem) MenuItem(com.googlecode.wicket.jquery.ui.widget.menu.MenuItem)

Aggregations

IMenuItem (com.googlecode.wicket.jquery.ui.widget.menu.IMenuItem)1 MenuItem (com.googlecode.wicket.jquery.ui.widget.menu.MenuItem)1 ArrayList (java.util.ArrayList)1 BaseFileItem (org.apache.openmeetings.db.entity.file.BaseFileItem)1 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)1