private void hierarchyAdd(ElementList list, Widget w) { SingleWidget sw; list.addWidget(sw = new SingleWidget(w)); handlers.put(w, sw); for (Widget ww : w.getDrawList()) { if (!ww.disposed) hierarchyAdd(list, ww); } }
private void init() { pageMain = loaded.getWidget("back").copy(); List<Media> installedMedias = data.getInstalledMediaList(); player.updatePlayerMedias(installedMedias); { Widget area = pageMain.getWidget("area"); ElementList list = new ElementList(); for (Media m : installedMedias) { list.addWidget(createMedia(m)); } area.addComponent(list); } EventLoader.load(pageMain, this); gui.addWidget(pageMain); gui.postEvent(new UpdateMediaEvent()); }