Package de.taliis.editor

Examples of de.taliis.editor.openedFile


    // TODO Auto-generated method stub
  }

  public JPanel createView() {
    // get file
    openedFile of = fm.getActiveFile();
   
    if (of == null || !(of.obj instanceof adt))
      return null;
    adt obj = (adt) of.obj;
    for(Plugin p : pp) {
View Full Code Here


   * We use popup windows for basic operations like
   * - copy
   * - delete
   */
  private void initPopup(int x,int y) {
    openedFile of = fm.getActiveFile();
    adt obj=(adt)of.obj;
    MCNK f=obj.mcnk[x*16+y];
    int ID=0;
   
    ID=f.getAreaID();
View Full Code Here

  }

  public void actionPerformed(ActionEvent e) {
      if(e.getSource()==mSetID){
        // get file
        openedFile of = fm.getActiveFile();

        AreaIDPopUp a= new AreaIDPopUp(null);
        adt obj = (adt) of.obj;
        obj.mcnk[xpos*16+ypos].setAreaID(a.areaid);
       
      }
    else
      if(e.getSource()==mHoleEditor){
        // get file
        openedFile of = fm.getActiveFile();
        adt obj=(adt)of.obj;
        HoleDialog a= new HoleDialog(null,obj.mcnk[xpos*16+ypos].getHoles());
        obj.mcnk[xpos*16+ypos].setHoles(a.holeval);
      }
    else
      if(e.getSource()==mFlagEditor){
        // get file
        openedFile of = fm.getActiveFile();
        adt obj=(adt)of.obj;
        FlagsDialog a= new FlagsDialog(null,obj.mcnk[xpos*16+ypos].getFlags());
        obj.mcnk[xpos*16+ypos].setFlags(a.flagval);
    }
    else
      if(e.getSource()==mAddTex){
        // get file
        openedFile of = fm.getActiveFile();
        adt obj=(adt)of.obj;
        String[] texs=new String[obj.mtex.entrys.length];
        for(int k=0;k<obj.mtex.entrys.length;k++){
          texs[k]=obj.mtex.entrys[k].toString();
        }
        TextureDialog a=new TextureDialog(null,texs,0,0);
        obj.mcnk[xpos*16+ypos].setNLayers(obj.mcnk[xpos*16+ypos].getNLayers()+1);
        obj.mcnk[xpos*16+ypos].mcly.add(a.textureid,a.groundid);
        obj.mcnk[xpos*16+ypos].mcal.createLayer();
      }
    else
        for(int i=0;i<mTextures.length;i++){
          if(e.getSource()==mTextures[i]){
            openedFile of = fm.getActiveFile();
            adt obj=(adt)of.obj;
            String[] texs=new String[obj.mtex.entrys.length];
            for(int k=0;k<obj.mtex.entrys.length;k++){
              texs[k]=obj.mtex.entrys[k].toString();
            }
View Full Code Here

   */
  public String getDBCValue_s(String dbcname,int vCol,int dCol,int row){
    String rets="";
    dbc src;
    //request (load) DBC file
    openedFile of = null;
   
    // ask the file loader
    for(openedFile af : fm.getFileList()) {
      if(af.f.getName().endsWith(dbcname)) {
        of = af;
View Full Code Here

    popup.add(mSetID);

  }

  public JPanel createView() {
    openedFile of = fm.getActiveFile();
    if (of == null || !(of.obj instanceof adt))
      return null;
    paintPicture();
    initPopup();
    JPanel f = new JPanel();
View Full Code Here

  @Override
  public void actionPerformed(ActionEvent e) {
    // TODO Auto-generated method stub
    if(e.getSource()==mSetID){
      // get file
      openedFile of = fm.getActiveFile();

      AreaIDPopUp a= new AreaIDPopUp(null);
      adt obj = (adt) of.obj;
      obj.mcnk[xpos*16+ypos].setAreaID(a.areaid);
      paintPicture();
 
View Full Code Here

    }
  }
 
  private void paintPicture(){
    // get file
    openedFile of = fm.getActiveFile();



    // get data
    adt obj = (adt) of.obj;
View Full Code Here

  public openedFile requestRessource(String filename) {   
    File dest = requestFile(filename);
    if(dest==null) return null;
   
    // register file
    openedFile of;
   
    try {
      of = fm.openFile(dest);
    } catch(Exception e) {
      return null;
    }
   
    of.setFileOpener(of.OPENED_BY_PLUGIN);

    es.updateTable();
    return of;
 
View Full Code Here

    }
   
    else if(e.getSource()==mSave) {
      if(fm.getActiveFile()==null) return;
     
      openedFile of = fm.getActiveFile();
     
      // do we need to detect a (new) file name?
      if(of.f==null) {
        menSaveAs();
      }
View Full Code Here

    */
   private int menSaveAs() {
    if(fm.getActiveFile()==null) return -1;
   
    JFileChooser fc = new JFileChooser();
    openedFile s = fm.getActiveFile();
    if(s.f!=null)
      fc.setCurrentDirectory( s.f );
    fc.showSaveDialog( null );
     
    if(fc.getSelectedFile()==null) return -2;
View Full Code Here

TOP

Related Classes of de.taliis.editor.openedFile

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.