Package org.beryl.gui.widgets

Examples of org.beryl.gui.widgets.List


  private MapDataModel dataModel = null;

  public DnDTest() throws GUIException {
    dataModel = new MapDataModel();
    frame = constructFrame("DnDTest", dataModel);
    List list1 = (List) frame.getWidget("List1");
    List list2 = (List) frame.getWidget("List2");

    ListDataModel strings = new ListDataModel();
    for (int i = 1; i <= 10; i++)
      strings.addValue("Item " + i);

    list1.setListDataModel(strings);
    list2.setListDataModel(new ListDataModel());

    dataModel.setValue("list1.value", new Object[] {
    });

    frame.show();
View Full Code Here


          transferable.addData("text/x-stringarray", values);
          event.setData(transferable);
        }
      } else if (event.getName().equals("drop")) {
        Object values[] = (Object[]) event.getData();
        List list2 = (List) event.getSource();
        ListDataModel model = list2.getListDataModel();

        for (int i = 0; i < values.length; i++)
          model.addValue(list2, values[i]);
      }
    } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.beryl.gui.widgets.List

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.