Pivot
  1. Pivot
  2. PIVOT-534

Expose transtion durations & rates in Terra theme skins as styles to allow them to be configured

    Details

      Description

      org.apache.pivot.wtk.skin.CardPaneSkin
      add selectionChangeRate

      org.apache.pivot.wtk.skin.terra.TerraAccordionSkin
      add selectionChangeDuration
      add selectionChangeRate

      org.apache.pivot.wtk.skin.terra.TerraExpanderSkin
      add expandDuration
      add expandRate

      org.apache.pivot.wtk.skin.terra.TerraRollupSkin
      add expandDuration
      add expandRate

      org.apache.pivot.wtk.skin.terra.TerraSheetSkin
      add transitionDuration
      add transitionRate

      org.apache.pivot.wtk.skin.terra.TerraTabPaneSkin
      add selectionChangeDuration
      add selectionChangeRate

        Issue Links

          Activity

          Hide
          Chris Bartlett added a comment -

          On a related note, the current hard coded transition rates seem too low to me. (Totally unscientific observation backed up with no stats!)
          They do not look particularly smooth and even give the impression of a slow or overworked workstation.

          If this improvement is accepted, it might be worth increasing the transition rates in demos & tutorials to better demonstrate how slick Pivot can be.

          Show
          Chris Bartlett added a comment - On a related note, the current hard coded transition rates seem too low to me. (Totally unscientific observation backed up with no stats!) They do not look particularly smooth and even give the impression of a slow or overworked workstation. If this improvement is accepted, it might be worth increasing the transition rates in demos & tutorials to better demonstrate how slick Pivot can be.
          Hide
          Greg Brown added a comment -

          The transitions have always looked pretty good to me. Could you provide a screen grab that demonstrates the behavior?

          Show
          Greg Brown added a comment - The transitions have always looked pretty good to me. Could you provide a screen grab that demonstrates the behavior?
          Hide
          Chris Bartlett added a comment -

          Attached a patch for the 6 classes.

          Note that the names of the styles vary between classes, so if desired, I can upload another patch with standardized names.
          Perhaps simply 'transitionDuration' & 'transitionRate' ?

          Show
          Chris Bartlett added a comment - Attached a patch for the 6 classes. Note that the names of the styles vary between classes, so if desired, I can upload another patch with standardized names. Perhaps simply 'transitionDuration' & 'transitionRate' ?
          Hide
          Chris Bartlett added a comment -

          I'll try to find a tool to do video captures of the Windows desktop/applications and post along with some specs on my machines & environment details for reference.
          Any preferences on video formats? I assume that I'll be able to attach (zipped) video to this ticket if I can keep the file size down.

          FWIW, I have only used Pivot on 3 different machines. All are running various 1.6 JREs on various Windows versions, and all are approx 1 year old but fairly low spec.

          I really notice the difference when changing the transition rate for a Sheet from 30 to 100, while maintaining the same duration.

          Show
          Chris Bartlett added a comment - I'll try to find a tool to do video captures of the Windows desktop/applications and post along with some specs on my machines & environment details for reference. Any preferences on video formats? I assume that I'll be able to attach (zipped) video to this ticket if I can keep the file size down. FWIW, I have only used Pivot on 3 different machines. All are running various 1.6 JREs on various Windows versions, and all are approx 1 year old but fairly low spec. I really notice the difference when changing the transition rate for a Sheet from 30 to 100, while maintaining the same duration.
          Hide
          Sandro Martini added a comment -

          Hi to all,
          > On a related note, the current hard coded transition rates seem too low to me. (Totally unscientific observation backed up with no stats!)
          > They do not look particularly smooth and even give the impression of a slow or overworked workstation.
          I was thinking on a feature like this time ago (mainly using some a little outdated PC with Windows XP and Vista), but then forget it ... so I like it, and if wanted I could make it also for the 1.5.1 release, Ok ?

          On the names rationalization, I'm in favor of it, if not for the 1.5.1 we could wait for the 2.0 (but they aren't part of a real published API, so I don't see too much problems changing them now) ... what do you think ?

          @Greg: maybe on Mac this is shown better.
          @Chris: have you tried at least on Java 6 Update 18 or higher ?

          Bye,
          Sandro

          Show
          Sandro Martini added a comment - Hi to all, > On a related note, the current hard coded transition rates seem too low to me. (Totally unscientific observation backed up with no stats!) > They do not look particularly smooth and even give the impression of a slow or overworked workstation. I was thinking on a feature like this time ago (mainly using some a little outdated PC with Windows XP and Vista), but then forget it ... so I like it, and if wanted I could make it also for the 1.5.1 release, Ok ? On the names rationalization, I'm in favor of it, if not for the 1.5.1 we could wait for the 2.0 (but they aren't part of a real published API, so I don't see too much problems changing them now) ... what do you think ? @Greg: maybe on Mac this is shown better. @Chris: have you tried at least on Java 6 Update 18 or higher ? Bye, Sandro
          Hide
          Greg Brown added a comment -

          I'd like to get more detailed information on the system specs, if possible. As I said, I haven't seen any significant performance issues, even when running Windows in a VM. 30fps is a pretty standard frame rate. Lower end machines may not be able to support that, but higher-end ones can. If we bump it up to 100fps, then the higher end machines will be working much harder than they need to - they already render fine at 30fps so they would be doing 3x as much work with no visible improvement.

          If we can make some optimizations to help improve performance on lower-end systems, that's great. However, I don't think we need to try to guarantee the same level of performance on every possible system configuration.

          Show
          Greg Brown added a comment - I'd like to get more detailed information on the system specs, if possible. As I said, I haven't seen any significant performance issues, even when running Windows in a VM. 30fps is a pretty standard frame rate. Lower end machines may not be able to support that, but higher-end ones can. If we bump it up to 100fps, then the higher end machines will be working much harder than they need to - they already render fine at 30fps so they would be doing 3x as much work with no visible improvement. If we can make some optimizations to help improve performance on lower-end systems, that's great. However, I don't think we need to try to guarantee the same level of performance on every possible system configuration.
          Hide
          Chris Bartlett added a comment -

          Although this issue won't allow transitions to be turned off, it would allow them to be configured to be less 'intrusive'.

          Show
          Chris Bartlett added a comment - Although this issue won't allow transitions to be turned off, it would allow them to be configured to be less 'intrusive'.
          Hide
          Chris Bartlett added a comment -

          The following are now available as styles

          org.apache.pivot.wtk.skin.CardPaneSkin - selectionChangeDuration & selectionChangeRate
          org.apache.pivot.wtk.skin.terra.TerraAccordionSkin - selectionChangeDuration & selectionChangeRate
          org.apache.pivot.wtk.skin.terra.TerraCalendarButtonSkin - closeTransitionDuration & closeTransitionRate
          org.apache.pivot.wtk.skin.terra.TerraColorChooserButtonSkin - closeTransitionDuration & closeTransitionRate
          org.apache.pivot.wtk.skin.terra.TerraExpanderSkin - expandDuration & expandRate
          org.apache.pivot.wtk.skin.terra.TerraListButtonSkin - closeTransitionDuration & closeTransitionRate
          org.apache.pivot.wtk.skin.terra.TerraMenuButtonSkin - closeTransitionDuration & closeTransitionRate
          org.apache.pivot.wtk.skin.terra.TerraMenuPopupSkin - closeTransitionDuration & closeTransitionRate
          org.apache.pivot.wtk.skin.terra.TerraRollupSkin - expandDuration & expandRate
          org.apache.pivot.wtk.skin.terra.TerraSheetSkin - stateTransitionDuration & stateTransitionRate
          org.apache.pivot.wtk.skin.terra.TerraSuggestionPopupSkin - closeTransitionDuration & closeTransitionRate
          org.apache.pivot.wtk.skin.terra.TerraTabPaneSkin - selectionChangeDuration & selectionChangeRate
          org.apache.pivot.wtk.skin.terra.TerraTooltipSkin - closeTransitionDuration & closeTransitionRate

          Show
          Chris Bartlett added a comment - The following are now available as styles org.apache.pivot.wtk.skin.CardPaneSkin - selectionChangeDuration & selectionChangeRate org.apache.pivot.wtk.skin.terra.TerraAccordionSkin - selectionChangeDuration & selectionChangeRate org.apache.pivot.wtk.skin.terra.TerraCalendarButtonSkin - closeTransitionDuration & closeTransitionRate org.apache.pivot.wtk.skin.terra.TerraColorChooserButtonSkin - closeTransitionDuration & closeTransitionRate org.apache.pivot.wtk.skin.terra.TerraExpanderSkin - expandDuration & expandRate org.apache.pivot.wtk.skin.terra.TerraListButtonSkin - closeTransitionDuration & closeTransitionRate org.apache.pivot.wtk.skin.terra.TerraMenuButtonSkin - closeTransitionDuration & closeTransitionRate org.apache.pivot.wtk.skin.terra.TerraMenuPopupSkin - closeTransitionDuration & closeTransitionRate org.apache.pivot.wtk.skin.terra.TerraRollupSkin - expandDuration & expandRate org.apache.pivot.wtk.skin.terra.TerraSheetSkin - stateTransitionDuration & stateTransitionRate org.apache.pivot.wtk.skin.terra.TerraSuggestionPopupSkin - closeTransitionDuration & closeTransitionRate org.apache.pivot.wtk.skin.terra.TerraTabPaneSkin - selectionChangeDuration & selectionChangeRate org.apache.pivot.wtk.skin.terra.TerraTooltipSkin - closeTransitionDuration & closeTransitionRate
          Hide
          Chris Bartlett added a comment -

          Going back to the discussion on transition rates & durations in the KitchenSink demo...

          For the KitchenSink demo it might be worth tweaking the transition settings to take into account the content contained in the different RollUps. It is probably one of the most viewed demos and as such should be trying to show the best of Pivot. I'm not suggesting setting the frame rates artificially high, merely to adjust the settings in order to demonstrate how slick various transitions can look.

          The RollUps whose transitions look the least smooth to my eyes are 'Splitters' and 'Menus' as they are tall and also have dark content compared to the background. The 'Buttons' and 'Trees' RollUps are also quite tall but look a little less jerky to me possibly due to their lighter content.

          I have been struggling to produce some good screen captures to demonstrate this, but just looking at the figures involved might suffice for now.

          A RollUp has a default transition duration of 250 milliseconds and transition rate of 30 frames per second.
          (30 fps * 0.25 seconds) = 7.5 'paints' over the duration of the transition (assuming a perfect world with sufficient processing power and perfect, high resolution clocks)

          If a RollUp contains relatively tall components (for this example I will use 750 pixels to keep the maths simple), then on average it would have to expand the RollUp by 100 pixels per paint.
          However, if the contained components were only 375 pixels high, an average paint would cover an expansion of 50 pixels.
          RollUps use Quadratic easing rather than simple Linear, so the expanded height changes between paints varies, but that is not especially relevant here, rather the total 'distance' covered by the expansion.

          Show
          Chris Bartlett added a comment - Going back to the discussion on transition rates & durations in the KitchenSink demo... For the KitchenSink demo it might be worth tweaking the transition settings to take into account the content contained in the different RollUps. It is probably one of the most viewed demos and as such should be trying to show the best of Pivot. I'm not suggesting setting the frame rates artificially high, merely to adjust the settings in order to demonstrate how slick various transitions can look. The RollUps whose transitions look the least smooth to my eyes are 'Splitters' and 'Menus' as they are tall and also have dark content compared to the background. The 'Buttons' and 'Trees' RollUps are also quite tall but look a little less jerky to me possibly due to their lighter content. I have been struggling to produce some good screen captures to demonstrate this, but just looking at the figures involved might suffice for now. A RollUp has a default transition duration of 250 milliseconds and transition rate of 30 frames per second. (30 fps * 0.25 seconds) = 7.5 'paints' over the duration of the transition (assuming a perfect world with sufficient processing power and perfect, high resolution clocks) If a RollUp contains relatively tall components (for this example I will use 750 pixels to keep the maths simple), then on average it would have to expand the RollUp by 100 pixels per paint. However, if the contained components were only 375 pixels high, an average paint would cover an expansion of 50 pixels. RollUps use Quadratic easing rather than simple Linear, so the expanded height changes between paints varies, but that is not especially relevant here, rather the total 'distance' covered by the expansion.
          Hide
          Greg Brown added a comment -

          I don't think this is an unreasonable suggestion, but then again, I have never noticed a performance issue with the current transition rates. Feel free to play around with it if you think you can get better results.

          Show
          Greg Brown added a comment - I don't think this is an unreasonable suggestion, but then again, I have never noticed a performance issue with the current transition rates. Feel free to play around with it if you think you can get better results.

            People

            • Assignee:
              Chris Bartlett
              Reporter:
              Chris Bartlett
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development