Skip to content

Conversation

@BobHanson
Copy link
Owner

No description provided.

hansonr added 30 commits October 23, 2018 16:18
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
- 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.
hansonr added 29 commits November 14, 2018 22:35
- better alignment and sizes of checkboxs and radiobtns
- adds dynamic adding and removing of menu items
- adds MenuListener events
- better alignment and sizes of checkboxs and radiobtns
- adds dynamic adding and removing of menu items
- adds MenuListener events
adds move cursor for JSplitPane
corrects EventDispatchThread miscoding
adds dummy frame consideration for SwingUtilities.SharedOwnerFrame
sets mouse click for multiple click from jqevent.originalEvent
adds JSplitPane drag cursor on mouse move
fixes JComboBox not being disabled
fixes early setCursor before peer is created
@BobHanson BobHanson merged commit e65a3de into master Nov 21, 2018
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.

2 participants