Examples of MapDataModel


Examples of org.encog.workbench.models.MapDataModel

    Container content  = this.getContentPane();
    content.setLayout(new BorderLayout());
    this.panelButtons = new JPanel();
    this.panelButtons.setLayout(new FlowLayout(FlowLayout.LEFT));
    content.add(this.panelButtons,BorderLayout.NORTH);
    this.model = new MapDataModel(data);
    this.table = new JTable(this.model);
    this.scroll = new JScrollPane(this.table);
    content.add(this.scroll,BorderLayout.CENTER);
    this.btnAdd = new JButton("Add Row");
    this.btnDel = new JButton("Delete Row");
View Full Code Here

Examples of org.jboss.seam.jsf.MapDataModel

   {
      Map<String, Person> map = new HashMap<String, Person>();
      map.put("0", new Person("Gavin"));
      map.put("1", new Person("Tom"));
     
      javax.faces.model.DataModel mapDataModel = new MapDataModel();
     
      assert mapDataModel.getRowCount() == -1;
      assert mapDataModel.getRowData() == null;
      assert !mapDataModel.isRowAvailable();
     
      mapDataModel = new MapDataModel(map);
     
      assert mapDataModel.getWrappedData() instanceof Map;
     
      assert map.get("0").equals(((Map) mapDataModel.getWrappedData()).get("0"));
      assert map.get("1").equals(((Map) mapDataModel.getWrappedData()).get("1"));
     
      mapDataModel.setRowIndex(10);
     
      assert !mapDataModel.isRowAvailable();
     
      boolean failed = false;
      try
      {
         mapDataModel.getRowData();
      }
      catch (IllegalArgumentException e)
      {
         failed = true;
      }
     
      assert failed;
     
      mapDataModel.setRowIndex(1);
     
      assert mapDataModel.isRowAvailable();
      assert mapDataModel.getRowIndex() == 1;
      assert mapDataModel.getRowCount() == 2;
     
      // JBSEAM-1660
      try
      {
         mapDataModel.setWrappedData(null);
      }
      catch (NullPointerException e)
      {
         // Spec allows passing null
         assert false;
View Full Code Here

Examples of org.jboss.seam.jsf.MapDataModel

     
      Map<String, Person> map = new HashMap<String, Person>();
      map.put("0", new Person("Gavin"));
      map.put("1", new Person("Tom"));
     
      javax.faces.model.DataModel mapDataModel = new MapDataModel(map);   
      mapDataModel.setRowIndex(1);

      Object object = null;
      try
      {
         object = serialize(mapDataModel);
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.