示例#1
0
  @GuiCallback("scroll_bar")
  public void onProgressChange(Widget w, DraggedEvent event) {
    VerticalDragBar vdb = VerticalDragBar.get(w);

    ElementList list = ElementList.get(pageMain.getWidget("area"));
    list.setProgress((int) (vdb.getProgress() * list.getMaxProgress()));
  }
示例#2
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);
   }
 }
示例#3
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());
  }