Examples of ListDataModel


Examples of org.beryl.gui.model.ListDataModel

    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

Examples of org.beryl.gui.model.ListDataModel

          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) {
      new MessageDialog(e);
    }
  }
View Full Code Here

Examples of org.beryl.gui.model.ListDataModel

    model.setValue("radio", "choice3");
    model.setValue("ssl", new Boolean(true));
    model.setValue("table.index", new int[] { 1 } );

    /* Create some items for the combo box / list */
    ListDataModel listModel = new ListDataModel();
    for (int i = 1; i < 11; i++)
      listModel.addValue("MVC item " + i);

    /* Create a table data model for the table widget and add
     * some rows to it */
    tableModel = new TableDataModel();
    tableModel.addRow(
View Full Code Here

Examples of org.beryl.gui.model.ListDataModel

  public void addChild(Widget widget, Object constraint) throws GUIException {
    if (widget instanceof Item) {
      try {
        if (listDataModel == null) {
          listDataModel = new ListDataModel();
          sendEvents = false;
          list.setModel(new ListDataModelAdapter(listDataModel));
        }
        listDataModel.addValue(this, widget);
        addChild(widget);
View Full Code Here

Examples of org.beryl.gui.model.ListDataModel

  public void addChild(Widget widget, Object constraint) throws GUIException {
    if (widget instanceof Item) {
      try {
        if (listDataModel == null) {
          listDataModel = new ListDataModel();
          sendEvents = false;
          comboBox.setModel(new ComboBoxDataModelAdapter(listDataModel));
        }
        listDataModel.addValue(this, widget);
        addChild(widget);
View Full Code Here

Examples of org.beryl.gui.model.ListDataModel

  public void addChild(Widget widget, Object constraint) throws GUIException {
    if (widget instanceof Item) {
      try {
        if (listDataModel == null) {
          listDataModel = new ListDataModel();
          sendEvents = false;
          iconView.setModel(new List.ListDataModelAdapter(listDataModel));
        }
        listDataModel.addValue(this, widget);
        addChild(widget);
View Full Code Here

Examples of org.beryl.gui.model.ListDataModel

public class ComboBoxEditor implements TableEditor {
  private ListDataModel dataModel = null;

  public ComboBoxEditor(String values[]) {
    dataModel = new ListDataModel();
    try {
      for (int i = 0; i < values.length; i++) {
        dataModel.addValue(values[i]);
      }
    } catch (GUIException e) {
View Full Code Here

Examples of org.beryl.gui.model.ListDataModel

      addTheme("com.jgoodies.plaf.plastic.theme.SkyYellow");
    }
  };

  public LookAndFeelChooser() throws GUIException {
    emptyModel = new ListDataModel();
    lnfModel = new ListDataModel();

    LnF lnf = new MetalLnF("javax.swing.plaf.metal.MetalLookAndFeel");
    lnf.addTheme("javax.swing.plaf.metal.DefaultMetalTheme");
    lnfModel.addValue(lnf);
    lnfModel.addValue(new LnF("com.sun.java.swing.plaf.windows.WindowsLookAndFeel") {
View Full Code Here

Examples of org.beryl.gui.model.ListDataModel

      }
    }

    protected void addTheme(String clazz) throws GUIException {
      if (themeModel == null)
        themeModel = new ListDataModel();
      themeModel.addValue(new Theme(clazz));
    }
View Full Code Here

Examples of org.beryl.gui.model.ListDataModel

    dataModel = new MapDataModel();
    dataModel.setValue("preset", nonePreset);
    dataModel.setValue("widget", className);

    ListDataModel presetModel = new ListDataModel();
    presetModel.addValue(nonePreset);

    for (Iterator i = info.getPresetEntries().iterator(); i.hasNext();) {
      presetModel.addValue(i.next());
    }

    dialog = constructDialog("InsertDialog", dataModel);
    ((ComboBox) dialog.getWidget("PresetBox")).setListDataModel(presetModel);
    ((Button) dialog.getWidget("AnchorButton")).setEnabled(info.getSupportsAnchor());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.