It's not a secret anymore!
The moose likes JavaFX and the fly likes mixin extending custom node Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JavaFX
Bookmark "mixin extending custom node" Watch "mixin extending custom node" New topic

mixin extending custom node

bryan lim
Ranch Hand

Joined: Dec 26, 2008
Posts: 140
I am having a issue of mixin not able to extend CustomNode since it can only extends other mixin or interface.

But i want to inherit CustomNode so that i can have draggable functionality. and int he future, i might want to inherit more functionality, that's why i need mixin for multiple inheritance.

anybody knows a solution to this?

thanks! n_n
bryan lim
Ranch Hand

Joined: Dec 26, 2008
Posts: 140
anybody can help me out here?
Jim Clarke
Ranch Hand

Joined: Jun 15, 2009
Posts: 49
It's not possible to include CustomNode (abstract class) into a Mixin.
avi tshuva

Joined: Sep 07, 2009
Posts: 1

Well, you can use the fact (?) that the concrete class will be a Node, and treats your mixin as a Node by applying dynamic type casting on the instance you work on...

Not very pretty, but sometimes it's the most elegant of the options you got...

I agree. Here's the link:
subject: mixin extending custom node
It's not a secret anymore!