A GUI Framework for leJOS EV3

This is where you talk about the EV3 software itself, installation issues, and programming talk.

Moderators: roger, gloomyandy, skoehler

A GUI Framework for leJOS EV3

Postby misa.zhu » Wed Jun 11, 2014 5:22 pm

Hey guys,

I just built a GUI framework for leJOS EV3 and put it on github. It comes with Button/Window/Label/Image/Canva/Layout even virtual keyboard for input method.

here is the url : https://github.com/MisaZhu/EV3GUI.leJOS.git

Happy coding.
Misa.Z
misa.zhu
New User
 
Posts: 7
Joined: Wed Jun 11, 2014 5:16 pm

Re: A GUI Framework for leJOS EV3

Postby gloomyandy » Wed Jun 11, 2014 8:38 pm

Hi,
That is pretty cool. Not had chance to try it out yet, do you have any screen shots of it in use? Have you created this for a particular project? If so it would be good to see what it is you have planned!

Andy
User avatar
gloomyandy
leJOS Team Member
 
Posts: 4077
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: A GUI Framework for leJOS EV3

Postby misa.zhu » Thu Jun 12, 2014 8:58 am

Yes , I do have some screen shots and there are some examples in github. gonna upload some shots later.
misa.zhu
New User
 
Posts: 7
Joined: Wed Jun 11, 2014 5:16 pm

Re: A GUI Framework for leJOS EV3

Postby misa.zhu » Thu Jun 12, 2014 9:54 am

Image
Image
Image
Image
Image
Image
Image
Image
Image
misa.zhu
New User
 
Posts: 7
Joined: Wed Jun 11, 2014 5:16 pm

Re: A GUI Framework for leJOS EV3

Postby misa.zhu » Thu Jun 12, 2014 7:38 pm

Hey Andy,

I found that something wrong with drawString with anchor VCENTER, so I have to do the ugly way like bellows:

Code: Select all

   /*something wrong with anchor VCENTER in this version of leJOS, so I do ugly way*/
   if((anchor & GraphicsLCD.VCENTER) != 0) {
      y -= g.getFont().getHeight() / 2;
   }
   g.drawString(str, x+getAX(), y+getAY(), anchor, invert);



Hope it helps.

Misa.Z
misa.zhu
New User
 
Posts: 7
Joined: Wed Jun 11, 2014 5:16 pm

Re: A GUI Framework for leJOS EV3

Postby gloomyandy » Thu Jun 12, 2014 10:04 pm

Please see the notes in the following link on anchor points:
http://docs.oracle.com/javame/config/cl ... phics.html
The leJOS class is based upon this implementation. As you can see VCENTER is not supported for text operations.
User avatar
gloomyandy
leJOS Team Member
 
Posts: 4077
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: A GUI Framework for leJOS EV3

Postby Aswin » Fri Jun 13, 2014 6:34 am

Hi Miza,

This looks very nice! I especially like the keyboard. Good work.
Do you have plans for further development?

Aswin
My NXT blog: http://nxttime.wordpress.com/
Aswin
leJOS Team Member
 
Posts: 202
Joined: Tue Apr 26, 2011 9:18 pm
Location: Netherlands

Re: A GUI Framework for leJOS EV3

Postby misa.zhu » Fri Jun 13, 2014 7:37 am

Hey Aswin,

I will keep working on this project. More UI components are on the way. Actually I m trying to implement internationalisation right now, like Chinese .
misa.zhu
New User
 
Posts: 7
Joined: Wed Jun 11, 2014 5:16 pm


Return to EV3 Software

Who is online

Users browsing this forum: No registered users and 3 guests

more stuff