Uploaded image for project: 'Pivot'
  1. Pivot
  2. PIVOT-783

Calling setScale on scaleDecorator doesn't update the display

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Not A Problem
    • 2.0
    • 2.0.3
    • wtk
    • None

    Description

      When you call setScale on a scaleDecorator that's already in the display tree, the display does not update. You can't see the effect of the change until something else causes a repaint.

      Looking at the code, isn't this an issue for decorators in general? I don't see any mechanism for decorators to notify the component (or components?) that they are attached to that they've changed. If you're not going to notify, then shouldn't decorators be immutable objects? (Of course, that would break a lot of code.)

      FWIW, a demonstration:

      <Window title="Scale change" maximized="true"
      xmlns:bxml="http://pivot.apache.org/bxml"
      xmlns:effects="org.apache.pivot.wtk.effects"
      xmlns="org.apache.pivot.wtk">
      <BoxPane orientation="vertical" preferredWidth="300">
      <PushButton buttonData="Change">
      <buttonPressListeners>
      function buttonPressed(button)

      { scaleDecorator.setScale(2.0); }

      </buttonPressListeners>
      </PushButton>
      <Label text="This text should get twice as big when I push the button">
      <decorators>
      <effects:ScaleDecorator bxml:id="scaleDecorator"
      horizontalAlignment="left" verticalAlignment="top" />
      </decorators>
      </Label>
      </BoxPane>
      </Window>

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            bvanmelle Bill van Melle
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Issue deployment