model/view object graph

Discussion in 'Java' started by visionset, Apr 25, 2007.

  1. visionset

    visionset Guest

    I have a graph of node and leaf objects that represent model data.
    Now I want to render these in a view.
    I'd like to have a Shape object for each leaf which maps the model
    data to something renderable.

    I don't want any view references in my model. The only way I can think to
    do this is have a parallel NodeView/LeafView graph, where a LeafView
    object is a composition of Leaf and the Shape.

    I'm certain it would be bad for LeafView to subclass Leaf

    I could construct the shape objects on the fly, but I'm not sure, with
    primitive graphics rendering, aren't they usually cached.

    --
    Mike W
     
    visionset, Apr 25, 2007
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. George Sakkis
    Replies:
    1
    Views:
    603
    Szabolcs Nagy
    Jan 29, 2007
  2. Dr Ann Huxtable

    Missing Graph.h and (Graph.lib) woes - any help

    Dr Ann Huxtable, Dec 21, 2004, in forum: C Programming
    Replies:
    6
    Views:
    932
    Dr Ann Huxtable
    Dec 21, 2004
  3. Jef Driesen
    Replies:
    3
    Views:
    2,855
    mlimber
    Jan 24, 2006
  4. Almoni
    Replies:
    0
    Views:
    3,342
    Almoni
    Jan 17, 2010
  5. Parthiv Joshi
    Replies:
    1
    Views:
    1,099
    Samuel L Matzen
    Jul 6, 2004
  6. Lin Jen-Shin
    Replies:
    0
    Views:
    376
    Lin Jen-Shin
    May 6, 2010
  7. Lin Jen-Shin
    Replies:
    0
    Views:
    411
    Lin Jen-Shin
    May 21, 2010
  8. Emilio Mayorga
    Replies:
    6
    Views:
    621
    Martien Verbruggen
    Oct 8, 2003
Loading...