Esempio n. 1
0
  /**
   * From the "animationInfo" set of animation properties, set all these values into all the
   * Animation objects held as memeber data.
   *
   * @param transfer AnimationInfo to get properties from
   */
  public void setProperties(AnimationInfo transfer) {
    setBoxPanelVisible(transfer.getBoxesVisible());
    animationInfo.set(transfer);
    setSharing(animationInfo.shared);
    if (animationInfo.getAnimationGroup() != null) {
      setShareGroup(animationInfo.getAnimationGroup());
    }
    if (propertiesDialog != null) {
      propertiesDialog.setInfo(animationInfo);
    }

    try {
      if (anime != null) {
        anime.setAnimationInfo(animationInfo);
        DisplayMaster displayMaster = anime.getDisplayMaster();
        if (displayMaster != null) {
          displayMaster.dataChange();
        } else {
          if (getAnimationSetInfo().getActive()) {
            anime.setSet(getAnimationSetInfo().makeTimeSet(null));
          } else {
            anime.setSet(getAnimationSetInfo().getBaseTimes());
          }
        }
      }
    } catch (Exception exp) {
      LogUtil.logException("Error setting properties", exp);
    }
    updateRunButton();
    checkAutoUpdate();
  }
Esempio n. 2
0
 /**
  * autoupdate the set of synthetic times
  *
  * @param myTimestamp used to only have on thread active
  */
 private void updateAnimationSet(int myTimestamp) {
   try {
     while (true) {
       long seconds = (long) (animationInfo.getAnimationSetInfo().getPollMinutes() * 60);
       Misc.sleepSeconds(seconds);
       DisplayMaster displayMaster = getDisplayMaster();
       if ((displayMaster == null) || (anime == null) || (myTimestamp != timestamp)) {
         break;
       }
       displayMaster.dataChange();
     }
   } catch (Exception exc) {
     LogUtil.logException("Error updating animation set", exc);
   }
 }