Package org.geoforge.guillc.event

Examples of org.geoforge.guillc.event.GfrEvtValidityChanged


      if (strUrl == null || strUrl.length() < 1)
         return false;

      if (super._alreadyExists(strUrl))
      {
         validityChanged(new GfrEvtValidityChanged(false, "This url is already imported."));
         return false;
      }

      strUrl = strUrl.trim();
      try
      {
         new URI(strUrl);
         new URL(strUrl);
      }
      catch (URISyntaxException excURISyntax)
      {
         validityChanged(new GfrEvtValidityChanged(false, "Wrong URL."));
         return false;
      }
      catch (MalformedURLException excMalformedURL)
      {
         validityChanged(new GfrEvtValidityChanged(false, "Wrong URL."));
         return false;
      }
      catch (Exception exc)
      {
         validityChanged(new GfrEvtValidityChanged(false, "Please enter a valid URL."));
         return false;
      }

      return true;
   }
View Full Code Here


           boolean blnValidity,
           String strMessage)
   {
      // Guaranteed to return a non-null array
      Object[] listeners = listenerList.getListenerList();
      GfrEvtValidityChanged e = null;
      // Process the listeners last to first, notifying
      // those that are interested in this event
      for (int i = listeners.length - 2; i >= 0; i -= 2)
      {
         if (listeners[i] == IGfrHandlerValidityListener.class)
         {
            if (e == null)
            {
               e = new GfrEvtValidityChanged(blnValidity, strMessage);
               ((IGfrHandlerValidityListener) listeners[i + 1]).validityChanged(e);
            }
         }
      }
   }
View Full Code Here

      {
         if (intLongitude == intLatitude)
         {
            boolean blnResult = false;
            String str = "Longitude and latitude are sharing the same column";
            validityChanged(new GfrEvtValidityChanged(blnResult, str));
            return blnResult;
         }

         if (intLongitude == intUniqueName)
         {
            boolean blnResult = false;
            String str = "Longitude and " + super.getUniqueName() + " are sharing the same column";
            validityChanged(new GfrEvtValidityChanged(blnResult, str));
            return blnResult;
         }

      }

      if (intLatitude != 0)
      {
         if (intLatitude == intUniqueName)
         {
            boolean blnResult = false;
            String str = "Latitude and " + super.getUniqueName() + " are sharing the same column";
            validityChanged(new GfrEvtValidityChanged(blnResult, str));
            return blnResult;
         }
      }

      return true;
View Full Code Here

      if (strUrl != null && strUrl.compareTo("") != 0)
      {
         if (!GfrValidatorUrlHttp.s_isOk(strUrl))
         {
            validityChanged(new GfrEvtValidityChanged(
                    false,
                    "Provide a valid URL"));
            return false;
         }
      }
View Full Code Here

      if (strName == null || strName.length() < 1)
         return false;

      if (this._alreadyExistsName_(strName))
      {
         validityChanged(new GfrEvtValidityChanged(false, "Name already exists"));
         return false;
      }

      return true;
   }
View Full Code Here

      Double dbl = GfrDouble.valueOf(str);

      if (dbl == null)
      {
         validityChanged(new GfrEvtValidityChanged(
                 false,
                 "Please provide valid depth value"));
         return false;
      }
     
      //-- Converting in meters to check the unicity of the depth.
      dbl = Double.valueOf(getValueDepthInMeters());

      if (this._alreadyExistsDepth_(dbl))
      {
         validityChanged(new GfrEvtValidityChanged(false, "Already existing with same depth"));
         return false;
      }
     
      if (!this._farEnoughFromExistingDepth_(dbl))
      {
         validityChanged(new GfrEvtValidityChanged(false, "Too close to existing depths"));
         return false;
      }
     
      if (dbl > this._dblMax_)
      {
         validityChanged(new GfrEvtValidityChanged(false, "Depth should be lower than : " +
                 String.format("%.2f", this._dblMax_)));
         return false;
      }
     
      if (dbl < this._dblMin_)
      {
         validityChanged(new GfrEvtValidityChanged(false, "Depth should be higher than : " +
                 String.format("%.2f", this._dblMin_)));
         return false;
      }

      return true;
View Full Code Here

      if (strName == null || strName.length() < 1)
         return false;

      if (super._alreadyExists(super._pnlSelectFolderLocation.getValuePath()))
      {
         validityChanged(new GfrEvtValidityChanged(false, _STR_ALREADY_EXISTS_WORKSPACE_));
         return false;
      }
     
      //-- !!! keep this order
      if(!super._nameEnablesOk())
View Full Code Here

      if (strName == null || strName.length() < 1)
         return false;

      if (super._alreadyExists(strName))
      {
         validityChanged(new GfrEvtValidityChanged(false, "Name already exists"));
         return false;
      }

      return true;
   }
View Full Code Here

         if (intGeometry == intUniqueName)
         {
            boolean blnResult = false;
            String str = "Geometry and " + super.getUniqueName() + " are sharing the same column";
            validityChanged(new GfrEvtValidityChanged(blnResult, str));
            return blnResult;
         }

      }
View Full Code Here

      {
         dbl = Double.parseDouble(strValue);
      }
      catch (Exception e)
      {
         validityChanged(new GfrEvtValidityChanged(false, "Please enter a valid value"));
         return false;
      }

      if (dbl < this._dblValueMin_)
      {
         validityChanged(new GfrEvtValidityChanged(false, "Value should be in higher to: " + this._dblValueMin_));
         return false;
      }


      return true;
View Full Code Here

TOP

Related Classes of org.geoforge.guillc.event.GfrEvtValidityChanged

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.