Skip to main content

ScrollDemo in LWUIT

12 replies [Last post]
borut123
Offline
Joined: 2007-02-05

Scrolling in LWUITDemo in ScrollDemo example works perfectly until I press "SELECT" softkey. After the middle softkey has been pressed, next keypress will be discarded.

So if I press "DOWN" right after the "SELECT" has been pressed, the selection stays on the same item. I press "DOWN" again, and then it moves to the next item.

Is this a bug or a lwuit feature? Can it be somehow fixed?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
francisdb
Offline
Joined: 2006-06-16

Okay, I see why, thanks for the suggestion!

Qunhuan Mei

Hi again,

We know by extending LWUIT's List-DefaultListCellRenderer pattern (plus Shai's helpful message and code snippet), we can control the display of the content from single lined focus item in our own way.

I was just wondering, still by extending LWUIT's List-DefaultListCellRenderer pattern or other LWUIT patterns, if it is possible to implement:

1. Multiple lined list (instead of single line)
2. Multiple lines for focused item, while the rest is in single line

Many thanks,

Qunhuan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

chen

Hi Qunhuan,
You should create your own renderer to renderer the List items (Check
out the Renderer samples in the LWUIT Demo).
You can to create some Containers nesting to achieve your desired look.

Regards,
Chen

Qunhuan Mei wrote:
> Hi again,
>
> We know by extending LWUIT's List-DefaultListCellRenderer pattern (plus Shai's helpful message and code snippet), we can control the display of the content from single lined focus item in our own way.
>
> I was just wondering, still by extending LWUIT's List-DefaultListCellRenderer pattern or other LWUIT patterns, if it is possible to implement:
>
> 1. Multiple lined list (instead of single line)
> 2. Multiple lines for focused item, while the rest is in single line
>
> Many thanks,
>
> Qunhuan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

Qunhuan Mei

Hi again Chen,

I see what you mean, thanks very much!

Regards,

Qunhuan

-----Original Message-----
From: Chen.Fishbein@Sun.COM [mailto:Chen.Fishbein@Sun.COM]
Sent: 24 June 2008 15:11
To: users@lwuit.dev.java.net
Subject: Re: Is it possible to implement a list in multiple lines for each list item or just focused item and how?

Hi Qunhuan,
You should create your own renderer to renderer the List items (Check
out the Renderer samples in the LWUIT Demo).
You can to create some Containers nesting to achieve your desired look.

Regards,
Chen

Qunhuan Mei wrote:
> Hi again,
>
> We know by extending LWUIT's List-DefaultListCellRenderer pattern (plus Shai's helpful message and code snippet), we can control the display of the content from single lined focus item in our own way.
>
> I was just wondering, still by extending LWUIT's List-DefaultListCellRenderer pattern or other LWUIT patterns, if it is possible to implement:
>
> 1. Multiple lined list (instead of single line)
> 2. Multiple lines for focused item, while the rest is in single line
>
> Many thanks,
>
> Qunhuan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

francisdb
Offline
Joined: 2006-06-16

Hi,

This issue is very annoying and counterintuitive, I have a menu list and whenever the user returns to the menu he can click the same item again but he needs to push up or down twice to move the cursor.

I also have a file browser implemented using a List and when setting a new model for a new directory (action event) the user again has to puch up or down twice to navigate.

I'd like to know where this behavior comes in handy?

chen

Hi,
When you click on the List the List preforms the actions and then losses
the foucs.
This is a very common behavior if you have more then a List widget on
the screen.
For example think of a Form with a List on the Center and a button on
the bottom, when you choose an item from the list you press on the fire
key and then you can navigate down to the button.
In your use case I assume you have only a List on the entire screen,
what you can do is to call to List.requestFocus() when you have finished
with your actions.

Regards,
Chen

lwuit-users@mobileandembedded.org wrote:
> Hi,
>
> This issue is very annoying and counterintuitive, I have a menu list and whenever the user returns to the menu he can click the same item again but he needs to push up or down twice to move the cursor.
>
> I also have a file browser implemented using a List and when setting a new model for a new directory (action event) the user again has to puch up or down twice to navigate.
>
> I'd like to know where this behavior comes in handy?
> [Message sent by forum member 'francisdb' (francisdb)]
>
> http://forums.java.net/jive/thread.jspa?messageID=282228
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

Shai Almog

Hi Borut123,
this is the default behavior of the list allowing it us to navigate
out of the list easily.
setHandlesFocus(true) can be invoked on action events occurring on
the list (it will be made public in the next drop) if you aren't
interested in this behavior.

Thanks,
Shai.

> Scrolling in LWUITDemo in ScrollDemo example works perfectly until
> I press "SELECT" softkey. After the middle softkey has been
> pressed, next keypress will be discarded.
>
> So if I press "DOWN" right after the "SELECT" has been pressed, the
> selection stays on the same item. I press "DOWN" again, and then it
> moves to the next item.
>
> Is this a bug or a lwuit feature? Can it be somehow fixed?
> [Message sent by forum member 'borut123' (borut123)]
>
> http://forums.java.net/jive/thread.jspa?messageID=281881
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

Qunhuan Mei

Hi there,

Just wondering if there is any way we could change the transparency level for the tinted area outside a dialog (in the intention to expand the usage of a "dialog").

Thanks,

Qunhuan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

chen

Hi,
Check out the Form.setTintColor(int tintColor) method the expected value
is 0xAARRGGBB.
You can also change this globally by using the
UIManager.getInstance().getLookAndFeel().setDefaultFormTintColor(int
defaultFormTintColor).

Regards,
Chen

Qunhuan Mei wrote:
> Hi there,
>
> Just wondering if there is any way we could change the transparency level for the tinted area outside a dialog (in the intention to expand the usage of a "dialog").
>
> Thanks,
>
> Qunhuan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

Qunhuan Mei

Hi Chen,

Thanks for your message but it does not seem to work.

I have tried both commands in various places, either in the LWUIT demo or in my own specific dialog, with various values (e.g. 0xff000000, 0x00ffffff, 0, 0xffffffff, etc). None of them seem to have any effect.

Is it a bug?

Kind regards,

Qunhuan

-----Original Message-----
From: Chen.Fishbein@Sun.COM [mailto:Chen.Fishbein@Sun.COM]
Sent: 24 June 2008 12:04
To: users@lwuit.dev.java.net
Subject: Re: How to change the transparency of tinted area outside a dialog please?

Hi,
Check out the Form.setTintColor(int tintColor) method the expected value
is 0xAARRGGBB.
You can also change this globally by using the
UIManager.getInstance().getLookAndFeel().setDefaultFormTintColor(int
defaultFormTintColor).

Regards,
Chen

Qunhuan Mei wrote:
> Hi there,
>
> Just wondering if there is any way we could change the transparency level for the tinted area outside a dialog (in the intention to expand the usage of a "dialog").
>
> Thanks,
>
> Qunhuan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

chen

Hi Qunhuan,

Try this sample:
Form tint = new Form("Tinted");
tint.setTintColor(0x7fff0000);
tint.show();
Dialog.show("Dialog", "On Tint", "OK", null);

Qunhuan Mei wrote:
> Hi Chen,
>
> Thanks for your message but it does not seem to work.
>
> I have tried both commands in various places, either in the LWUIT demo or in my own specific dialog, with various values (e.g. 0xff000000, 0x00ffffff, 0, 0xffffffff, etc). None of them seem to have any effect.
>
> Is it a bug?
>
> Kind regards,
>
> Qunhuan
>
> -----Original Message-----
> From: Chen.Fishbein@Sun.COM [mailto:Chen.Fishbein@Sun.COM]
> Sent: 24 June 2008 12:04
> To: users@lwuit.dev.java.net
> Subject: Re: How to change the transparency of tinted area outside a dialog please?
>
> Hi,
> Check out the Form.setTintColor(int tintColor) method the expected value
> is 0xAARRGGBB.
> You can also change this globally by using the
> UIManager.getInstance().getLookAndFeel().setDefaultFormTintColor(int
> defaultFormTintColor).
>
> Regards,
> Chen
>
> Qunhuan Mei wrote:
>
>> Hi there,
>>
>> Just wondering if there is any way we could change the transparency level for the tinted area outside a dialog (in the intention to expand the usage of a "dialog").
>>
>> Thanks,
>>
>> Qunhuan
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
>> For additional commands, e-mail: users-help@lwuit.dev.java.net
>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>
>

[att1.html]
[att1.dat]

Qunhuan Mei

Hi again Chen,

Thanks very much indeed. It works now.

What I missed is that the "tintcolor" has to be set to the form which leads to the dialog, not set to the dialog(form) itself!

Cheers,

Qunhuan

From: Chen.Fishbein@Sun.COM [mailto:Chen.Fishbein@Sun.COM]
Sent: 24 June 2008 13:56
To: users@lwuit.dev.java.net
Subject: Re: How to change the transparency of tinted area outside a dialog please?

Hi Qunhuan,

Try this sample:
Form tint = new Form("Tinted");
tint.setTintColor(0x7fff0000);
tint.show();
Dialog.show("Dialog", "On Tint", "OK", null);
[cid:image001.png@01C8D603.B7060490]

Qunhuan Mei wrote:

Hi Chen,

Thanks for your message but it does not seem to work.

I have tried both commands in various places, either in the LWUIT demo or in my own specific dialog, with various values (e.g. 0xff000000, 0x00ffffff, 0, 0xffffffff, etc). None of them seem to have any effect.

Is it a bug?

Kind regards,

Qunhuan

-----Original Message-----

From: Chen.Fishbein@Sun.COM [mailto:Chen.Fishbein@Sun.COM]

Sent: 24 June 2008 12:04

To: users@lwuit.dev.java.net

Subject: Re: How to change the transparency of tinted area outside a dialog please?

Hi,

Check out the Form.setTintColor(int tintColor) method the expected value

is 0xAARRGGBB.

You can also change this globally by using the

UIManager.getInstance().getLookAndFeel().setDefaultFormTintColor(int

defaultFormTintColor).

Regards,

Chen

Qunhuan Mei wrote:

Hi there,

Just wondering if there is any way we could change the transparency level for the tinted area outside a dialog (in the intention to expand the usage of a "dialog").

Thanks,

Qunhuan

---------------------------------------------------------------------

To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net

For additional commands, e-mail: users-help@lwuit.dev.java.net

---------------------------------------------------------------------

To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net

For additional commands, e-mail: users-help@lwuit.dev.java.net

---------------------------------------------------------------------

To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net

For additional commands, e-mail: users-help@lwuit.dev.java.net

[att1.html]
[image001.png]