Skip to content

Conversation

@BobHanson
Copy link
Collaborator

// note to self: It is an annoyance that Eclipse does not recognize an annotation edit
// as a need to recompile automatically
// TODO: Create a j2s configuration tag "j2s.jaxb.packages= package;package;package..."
// that will direct the transpiler to create ANN in any class within this package.
// BH 11/4/2018 -- 3.2.4.02 broad JAXB support
// BH 10/27/2018 -- 3.2.4.01 support for JAXB FIELD+propOrder and NONE types
// BH 9/28/2018 -- 3.2.4.00 adds minimal support for JAXB

hansonr added 30 commits October 15, 2018 16:57
- full namespace support
- uses BigInteger for xs:integer
- correctly assigns Java primitive types in List and Map
- implements all xmlSchemas for dates
- implements @XmlAccessorType NONE fully and @XmlAccessorType FIELD with
propOrder.

- untested for implicit method access.
implemented:

@XmlAccessorType
@XmlAttribute
@xmlelement
@XmlJavaTypeAdapter
@XmlRootElement
@XmlSeeAlso
@XmlType
@XmlValue

not implemented yet:

@xmlid
@XmlEnum
@XmlEnumValue
buffer.data must be accessed without replacement, as there are two other
references to it.
a2s.A2SEvent calls component.getMouseEventTarget, which is package-local
in Java 8.
-- no longer required outside of SwingJS context.
The swingjs/a2s/* AWT/Swingjs adapter classes were moved
from a2s/* on 10/23/2018.

The swingjs/a2s package provides a method of using non-Swing AWT
components (Button, TextField, etc.) even though SwingJS requires
Swing components (JButton, JTextField, etc.). This is necessary because
SwingJS does not implement "mixed-mode" containers -- JPanels that have
AWT Buttons, for example. This possibility was clearly a nightmare for
Swing developers, and the code backing this capability was just way too
complex to even consider converting.

There is probably a reason this was never done before, but I have not
discovered it yet. That is to say, this works.

The intent is to provide a means of taking a project that is not
a Swing application or does not fully use Swing components and make it
work
in SwingJS with no special handling. In Java, a reference to
"java.awt.Button"
is just that. In JavaScript, that call is to a javax.swing.JButton via
the intermediary swingjs.a2s.Button.

It is still recommended to convert a non-Swing application or applet
prior to
working with SwingJS, because it is not guaranteed that this
implementation is
complete.

But, that said, this does work. Older AWT mouse events are passed on to
the
component as before, even though they are also passed on by the listener
mechanism introduced in Swing.
PUBLIC_MEMBER and PROPERTY *might* work as well
hansonr added 9 commits November 1, 2018 20:34
- ObjectFactory
- package-info
- class discovery/resolution

Note that JavaScript cannot get a file list from a package, so one or
the other, context set up unmarshal method must specify a Class or
Class[], not just a path.
JalviewJS session save JAXB; Jalview (Java app) drag drop.
// note to self: It is an annoyance that Eclipse does not recognize an
annotation edit
//               as a need to recompile automatically
// TODO: Create a j2s configuration tag "j2s.jaxb.packages=
package;package;package..."
//       that will direct the transpiler to create __ANN__ in any class
within this package.
@BobHanson BobHanson merged commit c33dfec into java2script:master Nov 7, 2018
@BobHanson
Copy link
Collaborator Author

// note to self: It is an annoyance that Eclipse does not recognize an annotation edit
// as a need to recompile automatically
// TODO: Create a j2s configuration tag "j2s.jaxb.packages= package;package;package..."
// that will direct the transpiler to create ANN in any class within this package.
// BH 11/4/2018 -- 3.2.4.02 broad JAXB support
// BH 10/27/2018 -- 3.2.4.01 support for JAXB FIELD+propOrder and NONE types
// BH 9/28/2018 -- 3.2.4.00 adds minimal support for JAXB

BobHanson added a commit that referenced this pull request Feb 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant