05-18-2007, 06:49 PM | #1 |
Banned
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
Light weight AWT widget Booster Pack
Getting close enough to have its own thread and a teaser shot.
|
05-19-2007, 01:35 AM | #2 |
Banned
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
I put on the Gwen Steffani and got my mind right.
Layouts are now working. Panel affects layout correctly. Buttons now render and work correctly. The text base lines align correctly with Labels (unlike with iRex's SimpleButton, which is broken.) Labels now render and work correctly (complete with alignment.) TextFields now render correctly but I've still got to get the focus stuff working so you can key in text. But you can set the text from a button though (as seen in screen cap.) Get your java coding fingers ready. |
Advert | |
|
05-19-2007, 02:34 AM | #3 |
Banned
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
A very simple calculator I whipped up to test with.
|
05-19-2007, 10:12 AM | #4 |
Developer
Posts: 345
Karma: 3473
Join Date: Apr 2007
Location: Brooklyn, NY, USA
Device: iRex iLiad v1, Blackberry Tour, Kindle DX, iPad.
|
Hey, Scotty, I just want to say, this is excellent work. I haven't said much because I know literally nothing at all about Java, but I can see how this could be a really promising developing platform. You're doing fantastic stuff, and just the existence of this might be enough to prompt me to learn something about Java, just so I can use it. Keep it up!
|
05-21-2007, 03:33 PM | #5 |
Banned
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
@jharker
Thanks! TextField is now very close to being releasable, still needs a couple mundane things done to it: respect editable, respect max chars, grok backspace... But I can now enter text! I've also written my own classes for controlling the e-Ink refreshes (Quick and Full) and for the Tool Bar. The test case has been upgraded to use them. I think my API's are more approachable than iRex's lightly ported C API's. |
Advert | |
|
05-22-2007, 02:29 AM | #6 |
No es el toro que piensas
Posts: 44
Karma: 10
Join Date: Mar 2007
Device: iRex iliad
|
This is nice stuff, congratulations Scotty.
I suppose this could be a silly question to you, but how did you managed to use java.awt.Button et al? I'm currently using the irex's SimpleButton to have buttons and I developed a custom Label class to manage with labels (which is currently working ok, still testing), and I can see in your test?.java files that you are able to call without problem Button, Label and TextField classes. That classes were causing exceptions from trying to use them in my tests, and I remeber that in the early times of iliad java porting it did the same to you too. Maybe I was lost in translation from your posts? You are doing a great work, keep it on! |
05-22-2007, 04:31 AM | #7 |
Banned
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
The JVM won't load Swing classes but will load AWT classes.
The iRex SimpleButton is neither AWT nor Swing and has a bug in its font handling, don't get too attached to it. The kit I've put together fully supports the various layout managers making putting the various widgets up on the screen easier. They also fully support the AWT event delegation model to handle UI interactions. I'll be bundling what I've got so far and posting them later today. I've got a couple more to implement before I can get my port of Jarnal to start playing nice. Jarnal is Swing based but I'll be porting it over to my AWT kit bit by bit and post as it grows. I'm pretty impressed with how feature packed it is and I'm eager to have it as a tool. I just hope I can get it to run nicely on the roughly 32MB of heap available. |
05-22-2007, 08:58 AM | #8 |
fruminous edugeek
Posts: 6,745
Karma: 551260
Join Date: Oct 2006
Location: Northeast US
Device: iPad, eBw 1150
|
Looks like your text field would take hand written input, too, with the keyboard up with the HWR option. Is that right?
(You are so cool... ) |
05-22-2007, 11:27 AM | #9 | |
Banned
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
Quote:
Yes ma'am, the hand writing works as well. Eventually it would be possible to support writing directly into the TextField on the screen and have the HWR process it. But for now we have to settle for the pop up panel. |
|
05-22-2007, 04:56 PM | #10 |
Banned
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
I thought I'd have a nice surprise and release the new widgets and a PDF viewer...
But I just learned the hard way that PBP-1.0 doesn't just mean AWT with all the widgets torn out. Some of the supplied classes have been gutted of methods as well. java.awt.Shape for example is but a pale shadow of the full AWT version.. The PDF Viewer was kind of expecting to have a full Graphics2D environment to implement Postscript upon. You can get the PBP-1.0 Java Doc here: http://javashoplm.sun.com/ECom/docs/...actionId=noreg Another gotcha for you other java developers out there: java.io.File's createTempFile/createNewFile. The System.getProperty("java.io.tmpdir") is set to a non-functional value. But even after dealing with that I was getting no love at all from createNewFile. I had to do my own file creation calls via new File("name of temp file") and feed that to an OutputStream constructor to get a file I could write to. I also discovered that Runtime.getRuntime().totalMemory() and Runtime.getRuntime().freeMemory() return roughly 128MB of memory. Looks like something else iRex needs to tweak. |
05-22-2007, 09:18 PM | #11 |
fruminous edugeek
Posts: 6,745
Karma: 551260
Join Date: Oct 2006
Location: Northeast US
Device: iPad, eBw 1150
|
Wow. I'm kind of surprised that's legal according to the Java spec.
|
05-23-2007, 03:34 AM | #12 | ||
No es el toro que piensas
Posts: 44
Karma: 10
Join Date: Mar 2007
Device: iRex iliad
|
Quote:
Quote:
This comes from the java apps I'm developing to iliad, to remember my old knowledge of java and my curiosity to develop something to the thing. You're great, man! |
||
05-23-2007, 12:47 PM | #13 | |
Banned
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
First Widget Kit Release
Quote:
Attached find the source to get Button, Label, TextComponent, TextField, and Panel for your Java coding pleasure. |
|
05-23-2007, 04:28 PM | #14 |
Banned
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
Version 0.2 now features check boxes
How about some check boxes?
This kit has java.awt.Checkbox and java.awt.CheckboxGroup. Yes, very simple rendering but they're light weight widgets. But you do get circles for radio buttons and squares for checkboxes! Don't forget, as with the other widgets, screen refresh is delegated to your ItemListener... Code:
public void itemStateChanged(ItemEvent event) { Checkbox cb = (Checkbox)event.getSource(); cb.repaint(); DisplayControl.quickRefresh(); } |
05-24-2007, 02:31 AM | #15 | |
No es el toro que piensas
Posts: 44
Karma: 10
Join Date: Mar 2007
Device: iRex iliad
|
Quote:
Sir, thank you very much for your help! Like we say in spanish "¡Que grande eres, maestro!" I'll quickly start to try them! |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
2-pack Geek Gear ear light, $13 shipped | jj2me | Deals and Resources (No Self-Promotion or Affiliate Links) | 2 | 01-11-2010 12:37 PM |
Opera (Labs edition) EPUB reader Widget | mjh215 | Reading and Management | 0 | 11-03-2008 11:16 AM |
iLiad Java Viewer Booster Pack | scotty1024 | iRex Developer's Corner | 46 | 02-06-2008 08:19 PM |
iLiad fullscreen java awt frame | helch | iRex Developer's Corner | 0 | 08-10-2007 03:30 AM |
iLiad Widget style | tomchek | iRex Developer's Corner | 5 | 08-02-2007 11:16 AM |