Skip to main content

At Rev 345 Scrolling Stops working (was working before new year/x-mas..)

3 replies [Last post]
Anonymous

Hi Shai / Chen,

At Revision 345 a screen of my application suddenly cannot be scrolled
anymore. It was working before I think New year X-mas for sure.

The screen itself is quite complex based on a form with combobox'es,
textareas, labels, buttons which is contained in a container where I
set:

- setScrollableY(true);
-setSmoothScrolling(true);

Thanks Ben

[att1.html]

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
tclee
Offline
Joined: 2009-01-06

In [b]LWUIT Revision 345[/b], if we set padding to form's content pane, the form can no longer scroll. Below is the code to reproduce the issue:

[code]
import com.sun.lwuit.Display;
import com.sun.lwuit.Form;
import com.sun.lwuit.Label;
import com.sun.lwuit.layouts.BoxLayout;
import javax.microedition.midlet.*;

/**
* Simple MIDlet to test scrolling issue in LWUIT Revision 345.
*/
public class ScrollIssueTestMIDlet extends MIDlet {
public void startApp() {
Display.init(this);

SimpleTestForm simpleTestForm = new SimpleTestForm();
simpleTestForm.show();
}

public void pauseApp() {}

public void destroyApp(boolean unconditional) {}
}

/**
* Simple test form to verify scrolling issue.
*/
class SimpleTestForm extends Form {

public SimpleTestForm() {
this.setTitle("Rev 345: Scroll Issue Test");
this.setLayout(new BoxLayout(BoxLayout.Y_AXIS));
this.setScrollable(true);

// *** If we attempt to set padding for content pane, form no longer
// *** scrolls.
// *** Commenting out this line below will enable scrolling again.
this.getContentPane().getStyle().setPadding(5, 5, 5, 5);

// Add lots of labels...
for (int i = 1; i <= 20; i++) {
Label label = new Label("Label " + i);
label.setFocusable(true);
this.addComponent(label);
}
}
}
[/code]

Chen Fishbein

Hi,
We had a related bug in the scrolling mechanism, I just checked in a
fix for that.

Regards,
Chen

lwuit-users@mobileandembedded.org wrote:
> In [b]LWUIT Revision 345[/b], if we set padding to form's content pane, the form can no longer scroll. Below is the code to reproduce the issue:
>
> [code]
> import com.sun.lwuit.Display;
> import com.sun.lwuit.Form;
> import com.sun.lwuit.Label;
> import com.sun.lwuit.layouts.BoxLayout;
> import javax.microedition.midlet.*;
>
> /**
> * Simple MIDlet to test scrolling issue in LWUIT Revision 345.
> */
> public class ScrollIssueTestMIDlet extends MIDlet {
> public void startApp() {
> Display.init(this);
>
> SimpleTestForm simpleTestForm = new SimpleTestForm();
> simpleTestForm.show();
> }
>
> public void pauseApp() {}
>
> public void destroyApp(boolean unconditional) {}
> }
>
> /**
> * Simple test form to verify scrolling issue.
> */
> class SimpleTestForm extends Form {
>
> public SimpleTestForm() {
> this.setTitle("Rev 345: Scroll Issue Test");
> this.setLayout(new BoxLayout(BoxLayout.Y_AXIS));
> this.setScrollable(true);
>
> // *** If we attempt to set padding for content pane, form no longer
> // *** scrolls.
> // *** Commenting out this line below will enable scrolling again.
> this.getContentPane().getStyle().setPadding(5, 5, 5, 5);
>
> // Add lots of labels...
> for (int i = 1; i <= 20; i++) {
> Label label = new Label("Label " + i);
> label.setFocusable(true);
> this.addComponent(label);
> }
> }
> }
> [/code]
> [Message sent by forum member 'tclee' (tclee)]
>
> http://forums.java.net/jive/thread.jspa?messageID=324440
>
> ---------------------------------------------------------------------
> 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

saturon

Just checked it works on the latest drop...

-----Original Message-----
From: saturon [mailto:netbeans@vtxfree.ch]
Sent: Dienstag, 6. Januar 2009 22:53
To: users@lwuit.dev.java.net
Subject: At Rev 345 Scrolling Stops working (was working before new
year/x-mas..)

Hi Shai / Chen,

At Revision 345 a screen of my application suddenly cannot be scrolled
anymore. It was working before I think New year X-mas for sure.

The screen itself is quite complex based on a form with combobox'es,
textareas, labels, buttons which is contained in a container where I
set:

- setScrollableY(true);
-setSmoothScrolling(true);

Thanks Ben

[att1.html]