Package de.sistemich.mafrasi.stopmotion.gui

Examples of de.sistemich.mafrasi.stopmotion.gui.Frame


      if(copiedFiles_ != null){
        File[] tmpFiles = new File[copiedFiles_.length];
        File tmpDir = new File(Settings.getPropertyString(ConstantKeys.project_dir), "tmp/");
        tmpDir.mkdirs();
        for(int i = copiedFiles_.length - 1; i >= 0; i--){
          Frame f = FrameManager.getInstance().getFrameAtIndex(i);
          try {
            File in = f.getFile();
            File out = new File(tmpDir, f.getFile().getName());
            FileChannel inChannel = new FileInputStream(in).getChannel();
            FileChannel outChannel = new FileOutputStream(out).getChannel();

            inChannel.transferTo(0, inChannel.size(), outChannel);
View Full Code Here


      tmpDir.mkdirs();
     
      Frame[] tmpFrames = new Frame[frames.length];
      for(int i = 0; i < frames.length; i++){
        File newFile = new File(tmpDir, frames[frames.length - 1 - i].getFile().getName());
        tmpFrames[i] = new Frame(newFile);
        frames[i].moveTo(tmpFrames[i]);
      }
     
      for(int i = 0; i < tmpFrames.length; i++){
        tmpFrames[i].moveTo(frames[frames.length - 1 - i]);
View Full Code Here

  public void frameRemoved(FrameUpdateEvent e) {}

  @Override
  public void frameUpdateFinished(FrameUpdateEvent e) {
    if(FrameManager.getInstance().getFrameCount() > 1){
      Frame lastFrame = FrameManager.getInstance().getFrameAtIndex(Math.max(FrameManager.getInstance().getFrameCount() - 1, 0));
      Frame lastFrame2 = FrameManager.getInstance().getFrameAtIndex(Math.max(FrameManager.getInstance().getFrameCount() - 2, 0));
      if (e.getFrames()[e.getFrames().length - 1] == lastFrame
          || e.getFrames()[e.getFrames().length - 1] == lastFrame2) {

        try {
          setForegroundImage(FrameManager
              .getInstance()
              .getFrameAtIndex(
                  FrameManager.getInstance()
                      .getFrameCount() - 1).getFile());
        } catch (IOException e1) {
          e1.printStackTrace();
        }
        try {
          setBackgroundImage(FrameManager
              .getInstance()
              .getFrameAtIndex(
                  FrameManager.getInstance()
                      .getFrameCount() - 2).getFile());
        } catch (IOException e1) {
          e1.printStackTrace();
        }
      }
    }else if(FrameManager.getInstance().getFrameCount() > 0){
      Frame lastFrame = FrameManager.getInstance().getFrameAtIndex(Math.max(FrameManager.getInstance().getFrameCount() - 1, 0));
      if (e.getFrames()[e.getFrames().length - 1] == lastFrame) {

        try {
          setForegroundImage(FrameManager
              .getInstance()
View Full Code Here

TOP

Related Classes of de.sistemich.mafrasi.stopmotion.gui.Frame

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.