Extending Shape or implementing DelegateShape
Duncan Mak
duncanmak at gmail.com
Sat Nov 28 22:44:41 UTC 2020
Hello,
I'm interested in having a Node in my scene graph that I can change later
on, without losing its place in the scene.
I saw that in the old JavaFX 1.x, there used to be a type named
DelegateShape
<https://docs.oracle.com/cd/E17802_01/javafx/javafx/1.3/docs/api/javafx.scene.shape/javafx.scene.shape.DelegateShape.html>
which
seems to be exactly what I'm looking for.
I've tried defining my own Shape subclass, but the docs don't say what I
need to override. There's also a line in the docs that says that:
An application should not extend the Shape class directly. Doing so may
> lead to an UnsupportedOperationException being thrown.
Is it possible to write my own DelegateShape in JavaFX 15? Or should Shape
and Node be considered effective "sealed"?
--
Duncan.
More information about the openjfx-dev
mailing list