title: Designing a complex data model for a TableView object
body: <p>I'm in the process of redesigning an application I wrote 10 years ago based on Swing to a JavaFX-based equivalent and trying to adjust to a new "way" of designing. One issue I'm having is designing the linked data structures that were the data models for many of the JTable entries. Without going int excruciation detail I'll provide the Swing design example:</p>
  
  <pre><code>Class obj_X{     //Very dynamic with values changing &amp; stored in an Array();`
   String A;
   Long B;
   Double C;
   Double D;
  }
  
  Class obj_Entry {  //stored as elements in an Array() and use as a swing TableModel;
    Double E;
    Double F;
    String G;
    obj_X  AssociatedObject; // some elements can be displayed in the table or
                             // computed e.g. this.E=F*
                             // (AssociatedObject.C/AsociatedObject.B);
  }
  
  Class obj_Monitor{ //stored as elements in an Array() and use as a Swing TableModel;
    Double AA;
    Double BB;  //Computed mathmatically from AA and AssociatedObject.B
    obj_X AssociatedObject; //some of the elements may be displayed in the table
  }
  </code></pre>
  
  <p>The idea of the design was to maintain the unique core data in the obj_X array which, in turn, could be used to compute/combine with other data in multiple JTable Data Models.</p>
  
  <p>It's pretty simple in JavaFX to define a Class with StringProperty, IntegerProperty etc. for a simple table, but I currently see no clear design without setting up some change listeners for the obj_X so when the based elements change, they trigger a change to the ObservableLists that would contain the Table's model data. In Swing, I controlled the update process of the data model by getting the new obj_X data, then telling each table data model, to update its data. I feel that with JavaFX I'm trying to learn to program in Cobol all over again. HAH! Thanks in advance for any suggestions. In the meantime, I'll keep digging for a solution!</p>