Closed digitamo closed 8 years ago
Get the Get the Applet content :
I managed to get the Applet's content, So here is how to do it:
java.awt.Panel
that has the page's content, And you can set the page using the setPage(int) function, how convenient :wink: Put the Applet's content in a scroll view in the new UI :
Unfortunately DjVuBean.java inherits from java.awt.panel
which is different from java.swing.JPanel
by the way, And javafx
does not support awt
components only support swing JComponents
by means of swingNode
like the issue #23.
I've tried to put the DjVuBean.java inside a JPanel
:
But this didn't work out even for swing container not a SwingNode
, Because the Panel
and JPanel
have different implementations of drawing/painting the content.
I've tried to put the DjVuBean.java inside a JContainer like a JFrame
:
It worked in swing
because swing JContainers
supports awt
components but when I try to put the content of the JFrame
inside a SwingNode
it just doesn't work because the content is simply java.awt.Component
I've tried to make the DjVuBean.java extends a JPanel
:
This also doesn't work because java.swing.JPanel
and java.awt.Panel
have different implementation of rendering their content.
JPanel
with content rendering implementation in mind.Personally I prefer the Business (Data / Model) and view separation approach for several reasons:
@DJVUpp/2016 Please if you have any suggestions we can discuss it here #25 .
The page returned by the viewer module does not display annotations.