예제 #1
0
 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);
   }
 }
예제 #2
0
  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());
  }