lwuit
  1. lwuit
  2. LWUIT-470

Form BoxLayout(BoxLayout.Y_AXIS) too short if it contains an HTMLTable

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Invalid
    • Affects Version/s: current
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Current SVN Lwuit

      Description

      Hello,

      unfortunately this bug I'm facing can't contain much code, if the issue can't be resolved,
      I maybe could supply the code privately.

      I'm doing some rich text parsing from an XML file in this midlet, something like a lightweight HTMLComponent.

      I have a mainContainer with Layout set to mainContainer.setLayout(new BoxLayout(BoxLayout.Y_AXIS));

      For most of my XML files the scrollbar length is calculated fine.

      The problematic file creates a form which contains several Containers inside which Labels are embedded.
      On the end of the form there are several Buttons, inside a Container, too.

      If i now have a HTMLTable with HTMLTableModel in between those Containers the Container at the end of the form gets cut off.
      This table contains TextAreas and/or Labels in it's cells.
      See:

      http://img232.imageshack.us/img232/292/wrongscrollbarsize.jpg
      The large Image in here is actually a td in an HTMLTable.
      This also happens if the table contains no images.

      http://stackoverflow.com/questions/6660852/lwuit-table-layout-embedded-textareas
      Might be connected to this.

      I know this isn't much, but the problem must lie in HTMLTable or the way I'm using it.

      } else if (qName.equalsIgnoreCase("td")) {

      if (sb.length() > 0)

      { String sbt = new String(sb); sb.delete(0, sb.length()); TextArea c = new TextArea(sbt); c.setEditable(false); c.getStyle().setFont(smallFont); table.addCell(c, false, null); }

      } else if (qName.equalsIgnoreCase("tr"))

      { debugPrint("Row closed."); table.commitRow(); }

      else if (qName.equalsIgnoreCase("table")) {
      HTMLTable t = new HTMLTable(table);
      //without scrollable Y not all table rows are shown
      t.setScrollableY(true);
      //t.setPreferredW(screenWidth);

      //this is verboten. and will crash
      t.setLayout(new BoxLayout(BoxLayout.Y_AXIS));
      mainContainer.addComponent(t);
      tableBool = false;

        Activity

        Hide
        cond added a comment -

        I've now decided against using this HTMLTable, but this of course doesn't make the problem go away.

        Show
        cond added a comment - I've now decided against using this HTMLTable, but this of course doesn't make the problem go away.
        Hide
        vprise added a comment -

        There are several reasons I'm closing this issue:
        No way to reproduce this.
        HTMLTable is meant for use by the HTMLComponent and isn't a public API for a reason hence bugs against it are pretty much invalid (unless they are in the context of the HTMLComponent).
        The scrollbar length miscalculation is as far as I know always caused because of misuse of the EDT (changing LWUIT outside of the EDT).

        Show
        vprise added a comment - There are several reasons I'm closing this issue: No way to reproduce this. HTMLTable is meant for use by the HTMLComponent and isn't a public API for a reason hence bugs against it are pretty much invalid (unless they are in the context of the HTMLComponent). The scrollbar length miscalculation is as far as I know always caused because of misuse of the EDT (changing LWUIT outside of the EDT).

          People

          • Assignee:
            Unassigned
            Reporter:
            cond
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: