Package org.beryl.gui.widgets

Examples of org.beryl.gui.widgets.ComboBox


  public ComboBoxEditor(ListDataModel dataModel) {
    this.dataModel = dataModel;
  }

  public Widget getEditor(Table table, Object value, TableRow row, String key) throws GUIException {
    ComboBox comboBox = new ComboBox(null, null);
    MapDataModel mapDataModel = new MapDataModel();
    mapDataModel.setValue("value", value);
    comboBox.setProperty("valuekey", "value");
    comboBox.setDataModel(mapDataModel);
    comboBox.setListDataModel(dataModel);
    return comboBox;
  }
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")));
        }
View Full Code Here

TOP

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

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.