Pivot
  1. Pivot
  2. PIVOT-526

listview and treeview items should have their own "renderer" property

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Not A Problem
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: wtk
    • Labels:
      None

      Description

      I was trying to change the way the selection looks when an item is selected (versus non-selected). This was to provide additional annotations for the selected item (for me, I wanted to change the highlighted box color, highlight box size, and text font would change based on selection status). I can do this if I write a more complex renderer with the logic built into it, or I could break this logic out and when the item is selected us the renderer from my basket of renderers based on state e.g. the selected state. I am a total flub at writing renderers and gave up on this for today but this was my thought around controls with items in them.

      I don't think anyone is going be perish without this, but it does allow clients of the library to provide their own renders to reflect their own state versus a single renderer that has a bunch of switches in it to reflect state. This makes per-item rendering easier to write...even in the existing pivot code actually. You could probably factor out a subclass to handle common rendering for controls with items in them.

      You can mark this one for the future. I'm not sure I am using the word renderer correctly here. Its' whatever "<insert class name here>" is used to draw the individual items. I'm not sure this is the skin or the renderer.

      If a default renderer is used when none is present on the item, you would fall back into the current approach. Hence, the existing API does not need to change at all but the "item" api would be enhanced.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        8h 27m 1 Greg Brown 13/Jun/10 23:54
        Resolved Resolved Closed Closed
        690d 10h 56m 1 Sandro Martini 04/May/12 10:51
        Sandro Martini made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Greg Brown made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Not A Problem [ 8 ]
        Hide
        Greg Brown added a comment -

        Renderers are used to "rubber stamp" content and generally use the same (or similar) format for each item. If you find that you need a different format for each item, you may be better off using a container rather than a data-driven component:

        ListView -> vertical BoxPane
        TableView -> TablePane
        TreeView -> nested Rollups

        If you really need to use a data-driven component to present your data, you might want to take an approach similar to what we do in TableViewMultiCellRenderer.

        Show
        Greg Brown added a comment - Renderers are used to "rubber stamp" content and generally use the same (or similar) format for each item. If you find that you need a different format for each item, you may be better off using a container rather than a data-driven component: ListView -> vertical BoxPane TableView -> TablePane TreeView -> nested Rollups If you really need to use a data-driven component to present your data, you might want to take an approach similar to what we do in TableViewMultiCellRenderer.
        Appddevvv created issue -

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development