JavaFX and the Missing Interfaces

Pedro Duque Vieira pedro.duquevieira at gmail.com
Mon Nov 5 12:46:51 PST 2012


I've read your blog post.

May I suggest doing:

Interface IControl
{
  Control getControlRepresentation();
  (...)
}

This way you enforce every implementing class to have a Control
representation. And also as a plus you don't need to recur to casting when
you need to call methods from Control, because you can get a Control
representation via getControlRepresentation(). This is basically
composition instead of inheritance, which I think IMHO is better most of
the time.

Also one more note, the methods of the API are final because of security
reasons. I guess Java is to blame for this.

My 2cents, best regards,
-- 
Pedro Duque Vieira


More information about the openjfx-dev mailing list