metsci / glimpse

Dynamic and Interactive Visualization of Big Data In Java and OpenGL
http://glimpse.metsci.com
Other
17 stars 6 forks source link

GlimpseLayout is-a GlimpsePainter #8

Open ulmangt opened 12 years ago

ulmangt commented 12 years ago

GlimpseLayout implementing GlimpsePainter causes the potential for bugs because GlimpseLayout provides both addPainter and addLayout methods.

A GlimpseLayout should never really be passed as an argument to addPainter (because it won't take part in the layout). But it's currently allowed.

Suggested solution:

GlimpseLayout should have a single: method:

add( GlimpsePainter )

while reacts accordingly if the runtime type of the GlimpsePainter is GlimpseLayout.

addGlimpseLayout and addGlimpsePainter would either stick around for compatibility sake, or be removed.