Package ru.snake.spritepacker.core

Examples of ru.snake.spritepacker.core.Animation


    setIcon(ICON_NAME, true);
  }

  @Override
  public void actionPerformed(ActionEvent arg0) {
    Animation animation = factory.getActiveAnimation();
    Sprite sprite = factory.getActiveSprite();

    if (animation == null || sprite == null) {
      Dialogs.warning(parent,
          Messages.getString("MoveSpriteDownAction.NO_SPRITE")); //$NON-NLS-1$

      return;
    }

    List<Sprite> list = animation.getSprites();
    int index = list.indexOf(sprite);

    if (index != -1 && index < list.size() - 1) {
      List<Sprite> ordered = new ArrayList<Sprite>(list);

      ordered.set(index, ordered.get(index + 1));
      ordered.set(index + 1, sprite);

      animation.setSprites(ordered);
      factory.updateSprites();
    }
  }
View Full Code Here


    setIcon(ICON_NAME, true);
  }

  @Override
  public void actionPerformed(ActionEvent arg0) {
    Animation animation = factory.getActiveAnimation();
    Sprite sprite = factory.getActiveSprite();

    if (animation == null || sprite == null) {
      Dialogs.warning(parent,
          Messages.getString("SetSpriteTextureAction.NO_SPRITE")); //$NON-NLS-1$
View Full Code Here

    putValue(MNEMONIC_KEY, KeyEvent.VK_A);
  }

  @Override
  public void actionPerformed(ActionEvent arg0) {
    Animation animation = factory.getActiveAnimation();

    if (animation == null) {
      Dialogs.warning(parent,
          Messages.getString("ExportAnimationAction.MESSAGE")); //$NON-NLS-1$
View Full Code Here

    if (!(value instanceof Animation)) {
      return;
    }

    Animation animation = (Animation) value;

    factory.setActiveAnimation(animation);
  }
View Full Code Here

    setIcon(ICON_NAME, true);
  }

  @Override
  public void actionPerformed(ActionEvent arg0) {
    Animation animation = factory.getActiveAnimation();

    if (animation == null) {
      Dialogs.warning(parent,
          Messages.getString("RemoveAnimationAction.NO_ANIMATION")); //$NON-NLS-1$
View Full Code Here

    putValue(MNEMONIC_KEY, KeyEvent.VK_L);
  }

  @Override
  public void actionPerformed(ActionEvent arg0) {
    Animation animation = factory.getActiveAnimation();

    if (animation == null) {
      Dialogs.warning(parent,
          Messages.getString("AlignAnimationAction.NO_ANIMATION")); //$NON-NLS-1$
View Full Code Here

    return factory.getActiveAnimation() != null;
  }

  @Override
  protected void processDoubleClick() {
    Animation animation = factory.getActiveAnimation();

    String newnane = Dialogs.inputString(parent,
        Messages.getString("AnimationMouseListener.MESSAGE"), //$NON-NLS-1$
        animation.name);
View Full Code Here

    putValue(MNEMONIC_KEY, KeyEvent.VK_E);
  }

  @Override
  public void actionPerformed(ActionEvent arg0) {
    Animation animation = factory.getActiveAnimation();

    if (animation == null) {
      Dialogs.warning(parent,
          Messages.getString("CenterAnimationAction.NO_ANIMATION")); //$NON-NLS-1$

      return;
    }

    if (Dialogs.confirm(parent,
        Messages.getString("CenterAnimationAction.MESSAGE"))) { //$NON-NLS-1$
      List<Sprite> list = animation.getSprites();

      for (Sprite each : list) {
        each.offsetX = each.getWidth() / 2;
        each.offsetY = each.getHeight() / 2;
      }
View Full Code Here

    setIcon(ICON_NAME, true);
  }

  @Override
  public void actionPerformed(ActionEvent arg0) {
    Animation animation = factory.getActiveAnimation();

    if (animation == null) {
      Dialogs.warning(parent,
          Messages.getString("MoveAnimationDownAction.NO_ANIMATION")); //$NON-NLS-1$
View Full Code Here

    setIcon(ICON_NAME, true);
  }

  @Override
  public void actionPerformed(ActionEvent arg0) {
    Animation animation = factory.getActiveAnimation();

    if (animation == null) {
      Dialogs.warning(parent,
          Messages.getString("MoveAnimationUpAction.NO_ANIMATION")); //$NON-NLS-1$
View Full Code Here

TOP

Related Classes of ru.snake.spritepacker.core.Animation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.