lwuit-incubator
  1. lwuit-incubator
  2. LWUIT_INCUBATOR-2

Color Specification Congruency in Theme Task

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: current
    • Fix Version/s: milestone 1
    • Component/s: www
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      2

      Description

      In the ThemeTask, some style attributes needs the color specified as integer, as
      for example the border specification.

      SelectableButton.sel#border=(ROUNDED,15,15,9536)

      This is due to that the parsing of the number is done by using Integer.parseInt:

      — Round Border Code —
      int arcWidth = Integer.parseInt(tokenizer.nextToken());
      int arcHeight = Integer.parseInt(tokenizer.nextToken());
      if (!(tokenizer.hasMoreTokens()))

      { return Border.createRoundBorder(arcWidth, arcHeight); }

      return ...
      -------------------------

      Other attributes need hexadecimal values to pass in, like gradient, because it
      uses Integer.valueof with a radix of value 16.

      — Gradient code —
      if (key.endsWith("bgGradient")) {
      StringTokenizer tok = new StringTokenizer(value, ",; ");
      int a = Integer.valueOf(tok.nextToken(), 16).intValue();
      int b = Integer.valueOf(tok.nextToken(), 16).intValue();
      if (tok.hasMoreTokens())

      { ... }

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

      Would be useful that the colors would be always specified in hexadecimal form,
      or do dectect if it is hexadecimal or decimal (would need a prefix like 0x for
      hexadecimal). More elaborated parsing would allow triplet RGB specification, but
      all of this is in hands of developers. Just hexadecimal values for everything
      would be enough for a first step.

        Activity

        Hide
        vprise added a comment -

        Please use the LWUIT issue tracking system (not the LWUIT-incubator) for filing
        bugs against LWUIT. Unfortunately I don't have the means of moving this bug
        myself with its current state.

        Thanks.

        Show
        vprise added a comment - Please use the LWUIT issue tracking system (not the LWUIT-incubator) for filing bugs against LWUIT. Unfortunately I don't have the means of moving this bug myself with its current state. Thanks.

          People

          • Assignee:
            lwuit-incubator-issues
            Reporter:
            yakumo
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: