Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > iRex > iRex Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 05-18-2007, 06:49 PM   #1
scotty1024
Banned
scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.
 
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.
Attached Thumbnails
Click image for larger version

Name:	awt.png
Views:	569
Size:	30.1 KB
ID:	3560  
scotty1024 is offline   Reply With Quote
Old 05-19-2007, 01:35 AM   #2
scotty1024
Banned
scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.
 
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.
Attached Thumbnails
Click image for larger version

Name:	awt.png
Views:	472
Size:	27.2 KB
ID:	3563  
scotty1024 is offline   Reply With Quote
Advert
Old 05-19-2007, 02:34 AM   #3
scotty1024
Banned
scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.
 
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.
Attached Thumbnails
Click image for larger version

Name:	calculator.png
Views:	514
Size:	24.1 KB
ID:	3564  
Attached Files
File Type: zip calc.zip (1.4 KB, 404 views)
scotty1024 is offline   Reply With Quote
Old 05-19-2007, 10:12 AM   #4
jharker
Developer
jharker could sell banana peel slippers to a Deveel.jharker could sell banana peel slippers to a Deveel.jharker could sell banana peel slippers to a Deveel.jharker could sell banana peel slippers to a Deveel.jharker could sell banana peel slippers to a Deveel.jharker could sell banana peel slippers to a Deveel.jharker could sell banana peel slippers to a Deveel.jharker could sell banana peel slippers to a Deveel.jharker could sell banana peel slippers to a Deveel.jharker could sell banana peel slippers to a Deveel.jharker could sell banana peel slippers to a Deveel.
 
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!
jharker is offline   Reply With Quote
Old 05-21-2007, 03:33 PM   #5
scotty1024
Banned
scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.
 
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.
Attached Thumbnails
Click image for larger version

Name:	typed.png
Views:	455
Size:	69.8 KB
ID:	3608  
Attached Files
File Type: zip test3.zip (1.1 KB, 451 views)
scotty1024 is offline   Reply With Quote
Advert
Old 05-22-2007, 02:29 AM   #6
tororebelde
No es el toro que piensas
tororebelde began at the beginning.
 
tororebelde's Avatar
 
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!
tororebelde is offline   Reply With Quote
Old 05-22-2007, 04:31 AM   #7
scotty1024
Banned
scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.
 
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.
scotty1024 is offline   Reply With Quote
Old 05-22-2007, 08:58 AM   #8
nekokami
fruminous edugeek
nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.
 
nekokami's Avatar
 
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... )
nekokami is offline   Reply With Quote
Old 05-22-2007, 11:27 AM   #9
scotty1024
Banned
scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.
 
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
Quote:
Originally Posted by nekokami
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... )
Thank you for your kind words.

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.
scotty1024 is offline   Reply With Quote
Old 05-22-2007, 04:56 PM   #10
scotty1024
Banned
scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.
 
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.
scotty1024 is offline   Reply With Quote
Old 05-22-2007, 09:18 PM   #11
nekokami
fruminous edugeek
nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.
 
nekokami's Avatar
 
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.
nekokami is offline   Reply With Quote
Old 05-23-2007, 03:34 AM   #12
tororebelde
No es el toro que piensas
tororebelde began at the beginning.
 
tororebelde's Avatar
 
Posts: 44
Karma: 10
Join Date: Mar 2007
Device: iRex iliad
Quote:
Originally Posted by scotty1024
The iRex SimpleButton is neither AWT nor Swing and has a bug in its font handling, don't get too attached to it.
Thanks for the advice!

Quote:
Originally Posted by scotty1024
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 was really curious how are you using the JVM or what are you doing to use the AWT Button or Label classes, since I'm not able to use them. Probably i'm doing something wrong, so I eager to your posts too
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!
tororebelde is offline   Reply With Quote
Old 05-23-2007, 12:47 PM   #13
scotty1024
Banned
scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.
 
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
Lightbulb First Widget Kit Release

Quote:
Originally Posted by tororebelde
I was really curious how are you using the JVM or what are you doing to use the AWT Button or Label classes, since I'm not able to use them. Probably i'm doing something wrong, so I eager to your posts too
You have a problem with your -classpath, namely you haven't included my widget kit.

Attached find the source to get Button, Label, TextComponent, TextField, and Panel for your Java coding pleasure.
Attached Files
File Type: zip widgets-0.1.zip (8.3 KB, 388 views)
scotty1024 is offline   Reply With Quote
Old 05-23-2007, 04:28 PM   #14
scotty1024
Banned
scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.
 
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();
    }
Attached Thumbnails
Click image for larger version

Name:	checkbox.png
Views:	433
Size:	32.1 KB
ID:	3633  
Attached Files
File Type: zip widgets-0.2.zip (11.4 KB, 374 views)
scotty1024 is offline   Reply With Quote
Old 05-24-2007, 02:31 AM   #15
tororebelde
No es el toro que piensas
tororebelde began at the beginning.
 
tororebelde's Avatar
 
Posts: 44
Karma: 10
Join Date: Mar 2007
Device: iRex iliad
Quote:
Originally Posted by scotty1024
Attached find the source to get Button, Label, TextComponent, TextField, and Panel for your Java coding pleasure.
Oh, yes!

Sir, thank you very much for your help! Like we say in spanish "¡Que grande eres, maestro!"

I'll quickly start to try them!
tororebelde is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 12:04 PM.


MobileRead.com is a privately owned, operated and funded community.