Package org.beryl.gui.widgets

Examples of org.beryl.gui.widgets.Button


    dataModel.setValue("value", value);

    Panel panel = new Panel(null, null);
    panel.setProperty("border", BorderFactory.createEmptyBorder(1, 1, 1, 1));

    Button button = new Button(panel, null);
    button.setProperty("text", "Edit ...");
    button.addListener("clicked",  name, new GUIEventListener() {
      int counter = 0;

      public void eventOccured(GUIEvent event) {
        counter++;
        if (counter > 1) {
View Full Code Here


  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 {
        okButton.setEnabled(
          dataModel.getValue("file") != null
            && dataModel.getValue("package") != null
            && !((String) dataModel.getValue("package")).trim().equals(""));
      }
    });

    okButton.setEnabled(false);
    dialog.initDialog(parent);
    dialog.show();
  }
View Full Code Here

    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 {
        okButton.setEnabled(
          dataModel.getValue("event") != null
            && dataModel.getValue("name") != null
            && !((String) dataModel.getValue("name")).trim().equals(""));
      }
    });
View Full Code Here

  private class LayoutEditor implements TableEditor {
    public Widget getEditor(Table table, Object value, TableRow row, String key) throws GUIException {
      Panel panel = new Panel(null, null);

      ComboBox comboBox = new ComboBox(panel, null);
      final Button button = new Button(panel, null);
      final MapDataModel dataModel = new MapDataModel();
      dataModel.setValue("userobject", ((PropertyTableRow) row).getUserObject());
      dataModel.setValue("frame", table.getParentWidgetByClass(Frame.class));
      dataModel.setValue("node", ((PropertyTableRow) row).getPropertyNode());

      button.setProperty("text", "...");
      button.addListener("clicked", "modify", LayoutAdapter.this);
      panel.addChild(comboBox, "Center");
      panel.addChild(button, "East");
      comboBox.setProperty("valuekey", "value");
      comboBox.setListDataModel(layoutModel);
      panel.recursiveSetDataModel(dataModel);
      dataModel.addModelChangeListener(new ModelChangeListener() {
        public void modelChanged(ModelChangeEvent e) throws GUIException {
          button.setEnabled("hig".equals(dataModel.getValue("value")));
        }
      });
      dataModel.setValue("value", value);
      return panel;
    }
View Full Code Here

TOP

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

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.