Package kartoMNT.karto.outils

Examples of kartoMNT.karto.outils.MsgInfo


              // Mise � jour des dimensions et du graphique des MNT
          updateDimension();
          panelMNT.addRectangle(new Rectangle2D.Float(mnt.getX1(),mnt.getY1(),mnt.getX2()-mnt.getX1(),mnt.getY2()-mnt.getY1()));    
         
            }catch (FileNotFoundException ex){
                    MsgInfo msg=new MsgInfo(parent,MsgInfo.INFO,MsgInfo.OK,"\""+fileName+"\":\n"+ResourceManager.get("fileNotFound"));
            }
            catch (IOException ex){
                    MsgInfo msg=new MsgInfo(parent,MsgInfo.INFO,MsgInfo.OK,"\""+fileName+"\":\n"+ResourceManager.get("readError")+"\n"+ex.getMessage());
            }
       
        }
           
    }
View Full Code Here


    // pour la saisie des pas d'�chantillonnage
    boolean fail=false;
    MNT currentMNT;
   
    if(nbMNT<=0){
      MsgInfo msg=new MsgInfo(parent,MsgInfo.WARN,MsgInfo.OK,ResourceManager.get("selecMNTError"));
    } else {
      // R�cup�ration des valeurs des pas d'�chantillonnage
      // Si le champ est laiss� vide, on laisse le pas � 0 et
      // on lui donnera la valeur du pas du premier MNT
      currentMNT = (MNT) vectMNT.elementAt(0);
      float pasx = currentMNT.getPasX();
      float pasy = currentMNT.getPasY();
     
      try{
        // Gestion des param�tres du MNT:
        // PAR DEFAUT:
        // les pas sont ceux du premier MNT de la liste
        // les dimensions sont les dimensions maximales possibles (actualis�es au furet � mesure)
        // PASX
        if(echXTextField.getText().equals("")){
          // aucune valeur n'a �t� donn�e pour pasX,
          // On donne celle du premier MNT:
          pasX = pasx;
          System.out.println(ResourceManager.get("defPX")+": "+pasX);
        } else {
          if(modeSelect==PAS_ECHANTILLONNAGE){
            pasX=Float.parseFloat(echXTextField.getText());
            if(pasX<=0){
              MsgInfo msg=new MsgInfo(parent,MsgInfo.WARN,MsgInfo.OK,ResourceManager.get("pXErr"));
               fail=true;
            
          } else {
            nbEchX=Integer.parseInt(echXTextField.getText());
            if(nbEchX<=0){
              MsgInfo msg=new MsgInfo(parent,MsgInfo.WARN,MsgInfo.OK,ResourceManager.get("nXErr"));
               fail=true;
             }
           } 
        }
       
        // PASY
        if(echYTextField.getText().equals("")){
          // aucune valeur n'a �t� donn�e pour pasY,
          // On donne celle du premier MNT:
          pasY = pasy;
          System.out.println(ResourceManager.get("defPY")+": "+pasY);
        } else {
          if(modeSelect==PAS_ECHANTILLONNAGE){
            pasY=Float.parseFloat(echYTextField.getText());
            if(pasY<=0){
              MsgInfo msg=new MsgInfo(parent,MsgInfo.WARN,MsgInfo.OK,ResourceManager.get("pXErr"));
               fail=true
            }
          } else {
            nbEchY=Integer.parseInt(echYTextField.getText());
            if(nbEchY<=0){
              MsgInfo msg=new MsgInfo(parent,MsgInfo.WARN,MsgInfo.OK,ResourceManager.get("nXErr"));         fail=true;
             }
           } 
        }
       
        // X0
        if(xoTextField.getText().equals("")){
          // aucune valeur n'a �t� donn�e pour X0,
          System.out.println(ResourceManager.get("defXo")+": "+x0);
        } else {
          x0=Float.parseFloat(xoTextField.getText());
        }
       
        // Y0
        if(yoTextField.getText().equals("")){
          // aucune valeur n'a �t� donn�e pour Y0;
          System.out.println(ResourceManager.get("defYo")+": "+y0);
        } else {
          y0=Float.parseFloat(yoTextField.getText());
        }
       
        // XM
        if(xmTextField.getText().equals("")){
          // aucune valeur n'a �t� donn�e pour Xm,
          System.out.println(ResourceManager.get("defXm")+": "+xm);
        } else {
          xm=Float.parseFloat(xmTextField.getText());
        }
       
        // YM
        if(ymTextField.getText().equals("")){
          // aucune valeur n'a �t� donn�e pour Ym,
          System.out.println(ResourceManager.get("defYm")+": "+ym);
        } else {
          ym=Float.parseFloat(ymTextField.getText());
        }
       
        if(x0>=xm){
          MsgInfo msg=new MsgInfo(parent,MsgInfo.WARN,MsgInfo.OK,ResourceManager.get("xDimErr"));
           fail=true
        }
        if(y0>=ym){
          MsgInfo msg=new MsgInfo(parent,MsgInfo.WARN,MsgInfo.OK,ResourceManager.get("yDimErr"));         fail=true
        }
      } catch (Exception nfe){
          // Erreur(s) dans les valeurs entr�es
          MsgInfo msg=new MsgInfo(parent,MsgInfo.WARN,MsgInfo.OK,ResourceManager.get("dataMNTErr"));
          fail=true;
      }
       
     
      // Tests sur les donn�es:
View Full Code Here

                    documentKarto.setLignesDeNiveaux(dstimg);

                }
            catch(NumberFormatException ne)
                {
                    MsgInfo msg=new MsgInfo(frame,MsgInfo.ERROR,MsgInfo.OK,ResourceManager.get("fillError"));

                }

        }
View Full Code Here

                    c.setFileName(name);
                    c.read(dis);

                    if(c.getCarte()==null){
      if(importIm!=null){
          MsgInfo msg=new MsgInfo(frame,MsgInfo.INFO,MsgInfo.OUI|MsgInfo.NON,c.getCarteFileName()+"\n"+ResourceManager.get("imNotFound1"));
                            if(msg.reponse()==MsgInfo.OUI)
                              importIm.actionPerformed(null);
                        }else{
                            MsgInfo msg=new MsgInfo(frame,MsgInfo.INFO,MsgInfo.OUI|MsgInfo.NON,c.getCarteFileName()+"\n"+ResourceManager.get("imNotFound2"));
                        }
                    }

                    dis.close();
                    container2.addDocument(c,name);
                }

            }catch (FileNotFoundException ex){
                    MsgInfo msg=new MsgInfo(frame,MsgInfo.INFO,MsgInfo.OK,name+"\n"+ResourceManager.get("fileNotFound"));
            }
            catch (IOException ex)
                {
                    MsgInfo msg=new MsgInfo(frame,MsgInfo.WARN,MsgInfo.OK,name+"\n"+ResourceManager.get("readError")+"\n"+ex.getMessage());
                }
            catch (DocumentKartoException ex)
                {
                    MsgInfo msg=new MsgInfo(frame,MsgInfo.INFO,MsgInfo.OK,name+"\n"+ResourceManager.get("badFormat"));
                }

        }
View Full Code Here

        doct.setMNT(mnt);
         
        container2.addDocument(doct,name);

  }catch (FileNotFoundException ex){
      MsgInfo msg=new MsgInfo(frame,MsgInfo.INFO,MsgInfo.OK,name+"\n"+ResourceManager.get("fileNotFound"));
  }
  catch (IOException ex)
      {
    MsgInfo msg=new MsgInfo(frame,MsgInfo.INFO,MsgInfo.OK,name+"\n"+ResourceManager.get("readError")+"\n"+ex.getMessage());
      }
           
    }
View Full Code Here

TOP

Related Classes of kartoMNT.karto.outils.MsgInfo

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.