Menu

#2 Graph models should use java.util.Iterator

open
5
2003-07-06
2003-07-02
S Phelps
No

The design of the Graph2DModel interface does not allow
multiple clients to get access to series data unless
the client classes coordinate their access so that
client A does not call firstSeries() whilst client B is
calling nextSeries() (Ideally the model interface
should return an instance of java.util.Iterator that
the client class can use to iterate over the serieses)

Discussion

  • Mark Hale

    Mark Hale - 2003-07-06
    • labels: 449612 -->
    • milestone: 185700 -->
    • assigned_to: markhale --> nobody
     
  • Mark Hale

    Mark Hale - 2003-07-06

    Logged In: YES
    user_id=133877

    See 764666. All updates should be coordinated via
    SwingUtilities.invokeLater(). This will be treated as a
    feature request for Graph2DModel to support the Iterator
    interface.

     
  • Mark Hale

    Mark Hale - 2003-07-06

    Logged In: YES
    user_id=133877

    Moved to feature requests.

     
  • Mark Hale

    Mark Hale - 2003-07-06
    • labels: --> Graphs and Charts
    • assigned_to: nobody --> markhale
     
  • Mark Hale

    Mark Hale - 2003-07-15

    Logged In: YES
    user_id=133877

    Possible design:
    Single unified GraphModel interface {
    addGraphDataListener(GraphDataListener l);
    removeGraphDataListener(GraphDataListener l);
    Enumeration/Iterator series();
    }
    With separate Data2DSeries, Data3DSeries, CategoryDataSeries
    interfaces, returned by the series iterator.

    Disadvantages: possible performance decrease: requires extra
    object creation and casting operations.

     
  • Mark Hale

    Mark Hale - 2003-08-14

    Logged In: YES
    user_id=133877

    Java Generics would make the Iterator run-time safe.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.