gwt virtual keyboard

471 views
Skip to first unread message

Amrutha

unread,
Dec 27, 2011, 12:57:27 AM12/27/11
to Google Web Toolkit
I have created a login page and virtual keyboard using gwt designer.
When i click on show keyboard icon in login page, keyboard should come
there and if i press a key that particular key charactor or number
should appear in username field and password field.
How could i implement this using gwt?In short how could I implement a
gwt login page with virtual keyboard?

Kanagaraj M

unread,
Dec 27, 2011, 10:51:37 PM12/27/11
to google-we...@googlegroups.com
There are 2 ways to do it.

1. Include the needed elements (keyboard, username, password, submit button) in a GWT Panel
  And add that panel to RootPanel
  Handle the button event

2. Put place holders in the login page
  As the sample project in eclipse does
 Handle the submit action in login page or form submit


Amrutha

unread,
Dec 27, 2011, 11:21:10 PM12/27/11
to google-we...@googlegroups.com
Heii Kanagaraj,
 
      Thanks for your reply.I have added buttons in keyboard as images.Can you please tell me how can i get that particular button character in my username?How to code that in gwt?

Kanagaraj M

unread,
Dec 27, 2011, 11:39:51 PM12/27/11
to google-we...@googlegroups.com
write a click event listener.
Attach the listener to all the buttons.
receive the event, find which button is clicked and add the respective character to text box

Amrutha Thomas

unread,
Dec 28, 2011, 12:37:32 AM12/28/11
to google-we...@googlegroups.com
Heii Kanagaraj,
 
 I have added the code like this

Image image_1 =

new Image("Images/1.png");

image_1.addClickListener(

new ClickListener()

public void onClick(Widget sender){

textBox.setText((

"1" + sender.getTitle());

}

})

;


this code is working but when i click on this button it works only once when i try to click on it again it won't come in textbox.What should I do for that?
 
 

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/hwnVs8OMyXsJ.

To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.



--
with best regards,

Amrutha

Kanagaraj M

unread,
Dec 28, 2011, 12:44:16 AM12/28/11
to google-we...@googlegroups.com
You are overriding the values in the text box,
you have to append with already existing value

Amrutha Thomas

unread,
Dec 28, 2011, 12:52:56 AM12/28/11
to google-we...@googlegroups.com
can you please show me how to code that??
 
 
 
 
 
 


 
On Wed, Dec 28, 2011 at 11:14 AM, Kanagaraj M <kanaga...@gmail.com> wrote:
You are overriding the values in the text box,
you have to append with already existing value

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.

To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Kanagaraj M

unread,
Dec 28, 2011, 1:04:26 AM12/28/11
to google-we...@googlegroups.com

textBox.setText( textBox.getText()+sender.getTitle());

I dont understand why you are adding "1".


Amrutha Thomas

unread,
Dec 28, 2011, 1:08:18 AM12/28/11
to google-we...@googlegroups.com
if 1 is not added how it works,bcoz I have added the keys as images

On Wed, Dec 28, 2011 at 11:34 AM, Kanagaraj M <kanaga...@gmail.com> wrote:

textBox.setText( textBox.getText()+sender.getTitle());

I dont understand why you are adding "1".

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.

To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Kanagaraj M

unread,
Dec 28, 2011, 1:11:10 AM12/28/11
to google-we...@googlegroups.com
yes.
but you could have added different images. right?
while adding the image, set the respective title
as imageA.setTitle("A"); imageB.setTitle("B") respectively

and use textBox.setText( textBox.getText()+sender.getTitle());

Amrutha Thomas

unread,
Dec 28, 2011, 1:15:11 AM12/28/11
to google-we...@googlegroups.com
ohhh I have forgotten that Thanks yaar

Amrutha Thomas

unread,
Dec 28, 2011, 3:00:40 AM12/28/11
to google-we...@googlegroups.com

how to code for the other keys like capslock,arrow keys,tab,shift,backspace,space bar

Kanagaraj M

unread,
Dec 28, 2011, 3:38:30 AM12/28/11
to google-we...@googlegroups.com
for other keys
NativeEvent event = Document.get().createKeyDownEvent(...);
DomEvent.fireNativeEvent(event, this);

Amrutha Thomas

unread,
Dec 28, 2011, 4:04:34 AM12/28/11
to google-we...@googlegroups.com

but how can I use this code for a virtual keyboard??
 
 
 
 

 

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.

To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Kanagaraj M

unread,
Dec 28, 2011, 4:57:20 AM12/28/11
to google-we...@googlegroups.com
do this 
onclick of the respective buttons in the virtual keyboard

Amrutha Thomas

unread,
Dec 28, 2011, 5:31:11 AM12/28/11
to google-we...@googlegroups.com
can you show me the code with any key

On Wed, Dec 28, 2011 at 3:27 PM, Kanagaraj M <kanaga...@gmail.com> wrote:
do this 
onclick of the respective buttons in the virtual keyboard

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.

To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Amrutha Thomas

unread,
Dec 28, 2011, 6:18:32 AM12/28/11
to google-we...@googlegroups.com
I created a login page in gwt.Near my username and password field there are two icons .If I click on that icon virtual keyboard that I have created in gwt should pop up near username field and password field to enter username and password.How can I code it in gwt?Can anybody help me to solve this problem.

Jens

unread,
Dec 28, 2011, 10:24:47 AM12/28/11
to google-we...@googlegroups.com
You can use a PopupPanel for this.

Amrutha Thomas

unread,
Dec 30, 2011, 3:07:18 AM12/30/11
to google-we...@googlegroups.com
Hiii,
 
 
In my virtual keyboard I made my caplock key on  by using the code

image_29.addClickListener(

new ClickListener(){

public void onClick(Widget sender){

capsOn=true;

}

});

 

Now on the second click I need to off my caplock key.How can I code for that??

Amrutha Thomas

unread,
Jan 2, 2012, 1:25:42 AM1/2/12
to google-we...@googlegroups.com
How can I set tab order in my login page and customize focus using gwt virtual keyboard???
Reply all
Reply to author
Forward
0 new messages