[Xulu-commits] r68 - branches/1.8-gt2-2.6/src/edu/bonn/xulu/plugin/appl

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Nov 26 10:47:31 CET 2009


Author: mojays
Date: 2009-11-26 10:47:30 +0100 (Thu, 26 Nov 2009)
New Revision: 68

Modified:
   branches/1.8-gt2-2.6/src/edu/bonn/xulu/plugin/appl/RasterCalculatorPanel.java
Log:
Available operators shown in RasterCalculatorPanel now controlled by RasterOperationTreeParser (ParserOperatorsHints)

Modified: branches/1.8-gt2-2.6/src/edu/bonn/xulu/plugin/appl/RasterCalculatorPanel.java
===================================================================
--- branches/1.8-gt2-2.6/src/edu/bonn/xulu/plugin/appl/RasterCalculatorPanel.java	2009-11-23 15:49:35 UTC (rev 67)
+++ branches/1.8-gt2-2.6/src/edu/bonn/xulu/plugin/appl/RasterCalculatorPanel.java	2009-11-26 09:47:30 UTC (rev 68)
@@ -134,15 +134,9 @@
    *        durch die Unterklasse erfolgen!)
    */
   protected RasterCalculatorPanel(XuluModellingPlatform appl, boolean initGUI) {
-    super(false);
+    super(RasterCalculator.RASTER_CALC_PARSER,false);
     this.appl = appl;
 
-    // Zusaetzliche Operatoren und Konstanten
-    avOperators.add("X");            avOperatorsDesc.put("X",        "Raster cell X");
-    avOperators.add("Y");            avOperatorsDesc.put("Y",        "Raster cell Y");
-    avOperators.add("NoData");       avOperatorsDesc.put("NoData",   "NoData value");
-    avOperators.add("isNoData");     avOperatorsDesc.put("isNoData", "isNoData(.)");
-
     // Layout-Anordnung fuer GUI
     layoutConstraints.put( INRASTER_LABEL,   new GridBagConstraints(0,0,2,1,  0,  0,GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5,10,0,10),0,0) );
     layoutConstraints.put( INRASTER_TABLE,   new GridBagConstraints(0,1,2,1,1.0,1.0,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0,10,5,10),0,0) );
@@ -326,22 +320,7 @@
     RasterCalculator.checkRuleAndError(rule.getValue());
   }
 
-
   /**
-   * Liefert die Anzahl an geklammerten Parametern, die ein Operator hat.
-   * Erweitert die Methode der Oberklasse um den Operator {@code isNoData(.)}
-   * und die Filter-Referenz {@code F.}.
-   * @param op Operator
-   * @return 1 fuer {@code isNoData} und {@code F..}, sonst den Wert der {@code super}-Methode
-   */
-  protected int getParameterCount(String op) {
-    // Funktionen mit einem geklammerten Parameter
-    if (op.equalsIgnoreCase("isNoData") || op.charAt(0) == 'F')
-      return 1;
-    return super.getParameterCount(op);
-  }
-
-  /**
    * Laed Standard-Filter aus der Datei {@code <Plugin-Dir>\RasterCalculator\default_filter.inp}
    * in den Datenpool.
    * @see #DEFAULT_FILTER_FILENAME
@@ -465,7 +444,7 @@
     }
     return null;
   }
-
+  
   ///////////////////////////////////////////////////////////////////
   /////////////////   Table fuer die DnD-Tabellen   /////////////////
   ///////////////////////////////////////////////////////////////////



More information about the Xulu-commits mailing list