Package orxanimeditor.data.v1

Examples of orxanimeditor.data.v1.Project$RelativeFile


  public void actionPerformed(ActionEvent e) {
    AnimationSetViewer view = (AnimationSetViewer) animationSets.getSelectedComponent();
    if(e.getSource()==newAnimationSetButton) {
      String newSetName = JOptionPane.showInputDialog("New Animation Set Name:");
      if(newSetName==null || newSetName.isEmpty()) return;
      AnimationSet newSet = new AnimationSet(newSetName);
      editor.getData().addAnimationSet(newSet);
    } else  { // The rest of the buttons are related to a view
      if(view==null) { // So if no view is selected, an error is shown
        JOptionPane.showMessageDialog(editor, "No animation set selected!","Error!",JOptionPane.ERROR_MESSAGE);
        return;
View Full Code Here


    d.printEmptyLine();
    if(links.length>0) {
      String key = "LinkList";
      String value = "";
      for(int li = 0; li<links.length; li++) {
        Link link = links[li];
        value+=link.getName();
        if(li!=links.length-1) value+="#";
      }
      d.printKeyValue(key, value);
    }
    d.printEmptyLine();
View Full Code Here

              JOptionPane.QUESTION_MESSAGE, editor.animationManager.animationIcon,
            editor.getData().getAnimations(), null);
        if(chosen == null) return;
        view.addAnimation(chosen);
      } else if(e.getSource() == immediateLinkButton) {
        Link selectedLink = view.selectedLink;
        if(selectedLink!=null) {
          if(selectedLink.getProperty()==Link.IMMEDIATE_PROPERTY)
            selectedLink.setProperty(Link.NONE_PROPERTY);
          else
            selectedLink.setProperty(Link.IMMEDIATE_PROPERTY);
         
        }
      }
    }
  }
View Full Code Here

  }

 
  private Point getCenter(Animation animation) {
    if(set.containsSetSpecificAnimationData(animation)) {
      SetSpecificAnimationData animationData = set.getSetSpecificAnimationData(animation);
      if(animationData.getCenter()!=null)
        return animationData.getCenter();
    }
   
    return getDefaultCenter(animation);
  }
View Full Code Here

  public static void readEditorData(File file, EditorData data) {
        try
        {
           FileInputStream fileIn = new FileInputStream(file);
           ObjectInputStream in = new PackageNameModifiedObjectInputStream(fileIn);
           EditorData newData = (EditorData) in.readObject();
           in.close();
           fileIn.close();
           data.acquireFromData(newData,file);
           return;
       }catch(IOException i)
View Full Code Here

    return animationManager.getSelectedObjects();
  }
 
  public EditorMainWindow() {
    super("Orx Animation Editor");
    setData(new EditorData());
    prepareTree();
    setLayout(new BorderLayout());
   
    infoBar        = new InfoBar();
   
View Full Code Here

    if(editorDataChooser.showSaveDialog(EditorMainWindow.this)==JFileChooser.APPROVE_OPTION) {
      File projectFile=editorDataChooser.getSelectedFile();
      if(!projectFile.exists() && !Pattern.matches(".*\\..*",projectFile.getName())) {
        projectFile = new File(projectFile.getPath()+".oap");
      }
      getData().acquireFromData(new EditorData(),projectFile);
      projectChanged();
    }
  }
View Full Code Here

      Animation animation) {
    d.printSection(animation.getName());
    d.printKeyValue("DefaultKeyDuration",""+animation.getDefaultKeyDuration());
    Frame[] frames = animation.getFrames();
    for(int fi=0; fi<frames.length; fi++) {
      Frame f = frames[fi];
      d.printKeyValue("KeyData"+(fi+1),f.getName());
      if(f.getKeyDuration()>0)
        d.printKeyValue("KeyDuration"+(fi+1),""+f.getKeyDuration());
    }
    for(int fi=0; fi<frames.length; fi++) {
      Frame f = frames[fi];
      Point offset = f.getOffset();
      if(offset.x!=0 || offset.y!=0) {
        d.printKeyValue("KeyEventName"+(fi+1),"__"+fi);
        d.printKeyValue("__"+fi, "("+offset.x+","+offset.y+",0)");       
      }
    }
View Full Code Here

    return null;
  }

  @Override
  public long getFrameDelay(int index) {
    Frame frame = getFrame(index);
    return (long) (frame.getFinalFrameDuration()*1000);
  }
 
View Full Code Here

        for(Frame frame: animation.getFrames()) {
          paintFrame(g, frame);
        }
      }
      if (selected instanceof Frame) {
        Frame frame = (Frame) selected;
        paintFrame(g,frame);
      }   
    }
    if(freeOffsetStart != null && freeOffsetEnd != null) {
      Point base = toScreen(freeOffsetStart);
View Full Code Here

TOP

Related Classes of orxanimeditor.data.v1.Project$RelativeFile

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.