[Rxtx] gui v1.0, example of use
Naranjo Manuel Francisco
naranjo.manuel at gmail.com
Sat Sep 30 11:05:47 MDT 2006
Great work Doug!!!
Maybe an AWT could be of any use. But a Swing one is more than enough.
Cheers,
Manuel
2006/9/30, Dr. Douglas Lyon <lyon at docjava.com>:
> Hi All,
> Here is an example of how you might use
> my serial port panel:
> public static void main(String[] args) {
> final ClosableJFrame cf = new ClosableJFrame();
> Container c = cf.getContentPane();
> c.add(
> new RunSerialPortPanel() {
> public void run() {
> SerialPortBean x1 = getValue();
> System.out.println(x1);
> cf.pack();
> }
> });
> cf.pack();
> cf.setVisible(true);
> }
>
> The run method is invoke when the user click "OK" in the panel.
> The SerialPortBean is then serialized into the user preferences and the
> instance of the SerialPortBean value is returned from a getValue invocation.
>
> The FlowControl is set to be the same for both input and output. That might
> be limiting, for some people, I don't know.
>
> The implementation of the RunSerialPortPanel is working, but it is not
> really clean, yet. If people like this sort of thing, I can clean it up and
> release the source code as a part of the JCP reference implementation (i.e.,
> a sample to show how this might be done).
>
> Do people care about an AWT version?
> Thanks!
> - DL
>
> >Looks fine. If this is made available as a panel, then it could
> >easily be used in situations where multiple serial ports need to be
> >configured, or where someone wants to embed it into another panel.
> >
> >While I haven't seen your soure code, allowing to 'hide' or
> >'gray-out' certain fields could be handy. Some use cases seem to
> >indicate that sometimes the extra settings are hidden by some
> >applications since they are assumed values.
> >
> >BTW In case you are interested I did a quick search with Google
> >to see some dialogs already implemented:
> >
> >http://ajmas.dyndns.org/serialports/
> >
> >The vast majority use a simple layout you suggested. The main
> >exception seems to be the MacOS 9 selector where images are used for
> >the ports.
> >
> >I was also wondering whether a URL format could be handy for
> >serial port specification. For example:
> >
> > serial://com1?4800,1,8,none,none
> >
> > serial://dev/myport?4800,1,8,none,none
> >
> >But this last point is really the subject of another e-mail.
> >
> >Andre
> >
> >>
> >> From: "Dr. Douglas Lyon" <lyon at docjava.com>
> >> Date: 2006/09/30 Sat AM 07:43:04 EDT
> >> To: RXTX Developers and Users <rxtx at qbang.org>
> >> Subject: [Rxtx] gui v1.0
> >>
> >> Hi All,
> >> Here is my first attempt at GUI for serial ports:
> >>
> >>http://show.docjava.com:8086/book/cgij/code/jnlp/gui.run.RunSerialPortPanel.jnlp
> >>
> >> The features:
> >> 1. It works on PPC Mac, x86Linux and WinDOZE.
> >> 2. It persists the settings from one run to the next in user preferences.
> >> 3. It only configures one serial port (if you need to communicate with many
> >> serial ports at the same time, this is not for you).
> >> 4. It uses Swing
> >> 5. It can probably work on other platforms, I just don't have
> >> the native methods for the jar files linked into the web start application,
> >> yet.
> >> 6. It is simple looking.
> >>
> >> Please let me know what you think of it.
> >>
> >> Thanks!
> >> - DL
> >>
> >>
> >> _______________________________________________
> >> Rxtx mailing list
> >> Rxtx at qbang.org
> >> http://mailman.qbang.org/mailman/listinfo/rxtx
> >>
> >
> >_______________________________________________
> >Rxtx mailing list
> >Rxtx at qbang.org
> >http://mailman.qbang.org/mailman/listinfo/rxtx
>
> _______________________________________________
> Rxtx mailing list
> Rxtx at qbang.org
> http://mailman.qbang.org/mailman/listinfo/rxtx
>
--
Naranjo, Manuel Francisco
naranjo.manuel at gmail.com
More information about the Rxtx
mailing list