Package org.beryl.gui.model

Examples of org.beryl.gui.model.MapDataModel


              ((Dialog) source.getParentWidgetByClass(Dialog.class)).dispose();
            } catch (Exception e) {
              new MessageDialog(e);
            }
          }
        }, new MapDataModel());
        dialog.initDialog(frame);
        dialog.show();
      } else if (name.equals("popup")) {
        PopupMenu popup = (PopupMenu) constructWidget("PropertyPopup");
        popup.popup(event);
View Full Code Here


  public AnchorEditor(Widget parent, Element anchorNode, WidgetUserObject userObject) throws GUIException {
    this.anchorNode = anchorNode;
    this.userObject = userObject;
    this.parent = parent;
   
    dataModel = new MapDataModel();
    dialog = constructDialog("AnchorEditor", dataModel);
    group = (Group) dialog.getWidget("Group");
    okButton = (Button) dialog.getWidget("OKButton");

    customComponents = new HashMap();
View Full Code Here

public class StringAdapter implements PropertyAdapter {
  private TableEditor stringEditor = null;
 
  public static class StringEditor implements TableEditor {
    public Widget getEditor(Table table, Object value, TableRow row, String key) throws GUIException {
      MapDataModel dataModel = new MapDataModel();
      dataModel.setValue("value", value);

      Panel panel = new Panel(null, null);
      TextField textField = new TextField(panel, null);
      textField.setProperty("key", "value");
      textField.finalizeConstruction();
View Full Code Here

    throws GUIException {
    this.tree = tree;
    this.className = className;
    this.anchorElement = anchorElement;

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

    ListDataModel presetModel = new ListDataModel();
    presetModel.addValue(nonePreset);
View Full Code Here

public class NumberAdapter implements PropertyAdapter {
  private TableEditor numberEditor = null;

  private class NumberEditor implements TableEditor {
    public Widget getEditor(Table table, Object value, TableRow row, String key) throws GUIException {
      final MapDataModel dataModel = new MapDataModel();

      final String type = ((PropertyTableRow) row).getPropertyNode().getAttribute("type");

      dataModel.setValue("value", value);
      dataModel.setValue("value_str", value.toString());

      dataModel.addModelChangeListener(new ModelChangeListener() {
        public void modelChanged(ModelChangeEvent e) throws GUIException {
          if (e instanceof MapChangeEvent) {
            MapChangeEvent event = (MapChangeEvent) e;
            if (event.getKey().equals("value_str")) {
              try {
                if (type.equals("int"))
                  dataModel.setValue("value", new Integer((String) dataModel.getValue("value_str")));
                else if (type.equals("long"))
                  dataModel.setValue("value", new Long((String) dataModel.getValue("value_str")));
                else if (type.equals("float"))
                  dataModel.setValue("value", new Float((String) dataModel.getValue("value_str")));
                else if (type.equals("double"))
                  dataModel.setValue("value", new Double((String) dataModel.getValue("value_str")));
              } catch (Exception ex) {
                /* Ignore */
              }
            }
          }
 
View Full Code Here

  private Document document = null;
  private MapDataModel dataModel = null;

  public SkeletonDialog(Frame parent, Document document) throws GUIException {
    this.document = document;
    dataModel = new MapDataModel();
    dialog = constructDialog("SkeletonDialog", dataModel);
    final Button okButton = (Button) dialog.getWidget("OKButton");

    dataModel.addModelChangeListener(new ModelChangeListener() {
      public void modelChanged(ModelChangeEvent e) throws GUIException {
View Full Code Here

  public EventDialog(WidgetTree tree, Frame frame, WidgetUserObject object) throws GUIException {
    this.tree = tree;
    this.object = object;

    dataModel = new MapDataModel();
    dialog = (Dialog) constructDialog("EventDialog", dataModel);
    deleteButton = (Button) dialog.getWidget("DeleteButton");

    ((Table) dialog.getWidget("EventTable")).setTableDataModel(object.eventModel);
View Full Code Here

            tableModel.addRow(new PropertyEntryTableRow(entry));
          }
        }
      }

      dataModel = new MapDataModel();

      dialog = constructDialog("AddPropertyDialog", dataModel);

      propertyTable = (Table) dialog.getWidget("PropertyTable");
      okButton = (Button) dialog.getWidget("OKButton");
View Full Code Here

      }
    }
  };

  public WidgetTree(Builder builder) throws GUIException {
    dataModel = new MapDataModel();

    frame = constructFrame("WidgetTree", dataModel);
    treePopupMenu = (PopupMenu) constructWidget("WidgetPopup");
    propertyPopupMenu = (PopupMenu) constructWidget("PropertyPopup");
    emptyModel = new TableDataModel();

    widgetTree = (Tree) frame.getWidget("Tree");
    table = (Table) frame.getWidget("Table");
    rootNode = (TreeItem) frame.getWidget("RootNode");
    table.setTableDataModel(emptyModel);
    debuggingMapDataModel = new MapDataModel();
    debuggingMapDataModel.addModelChangeListener(new DebuggingModelChangeListener());
    dataModel.addModelChangeListener(this);
  }
View Full Code Here

  public AddEventDialog(WidgetTree tree, Dialog parent, WidgetUserObject object) throws GUIException {
    this.tree = tree;
    this.object = object;

    dataModel = new MapDataModel();
    dialog = constructDialog("AddEventDialog", dataModel);
    final Button okButton = (Button) dialog.getWidget("OKButton");

    dataModel.addModelChangeListener(new ModelChangeListener() {
      public void modelChanged(ModelChangeEvent e) throws GUIException {
View Full Code Here

TOP

Related Classes of org.beryl.gui.model.MapDataModel

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.