Examples of FunctionException


Examples of railo.runtime.exp.FunctionException

    if((o=parameters.removeEL(KeyImpl.init("EdgeAction")))!=null)setEdgeAction(ImageFilterUtil.toString(o,"EdgeAction"));
    if((o=parameters.removeEL(KeyImpl.init("Interpolation")))!=null)setInterpolation(ImageFilterUtil.toString(o,"Interpolation"));

    // check for arguments not supported
    if(parameters.size()>0) {
      throw new FunctionException(ThreadLocalPageContext.get(), "ImageFilter", 3, "parameters", "the parameter"+(parameters.size()>1?"s":"")+" ["+CollectionUtil.getKeyList(parameters,", ")+"] "+(parameters.size()>1?"are":"is")+" not allowed, only the following parameters are supported [Radius, Angle, CentreX, CentreY, Centre, EdgeAction, Interpolation]");
    }

    return filter(src, dst);
  }
View Full Code Here

Examples of railo.runtime.exp.FunctionException

public class ImageFilterUtil {

  public static float toFloatValue(Object value, String argName) throws FunctionException {
    float res = Caster.toFloatValue(value,Float.NaN);
    if(Float.isNaN(res)) {
      throw new FunctionException(ThreadLocalPageContext.get(), "ImageFilter", 3, "parameters", msg(value,"float",argName));
    }
    return res;
  }
View Full Code Here

Examples of railo.runtime.exp.FunctionException

  }

  public static int toIntValue(Object value, String argName) throws FunctionException {
    int res = Caster.toIntValue(value,Integer.MIN_VALUE);
    if(Integer.MIN_VALUE==res) {
      throw new FunctionException(ThreadLocalPageContext.get(), "ImageFilter", 3, "parameters", msg(value,"int",argName));
    }
    return res;
  }
View Full Code Here

Examples of railo.runtime.exp.FunctionException

    return res;
  }
  public static boolean toBooleanValue(Object value, String argName) throws FunctionException {
    Boolean res = Caster.toBoolean(value,null);
    if(res==null) {
      throw new FunctionException(ThreadLocalPageContext.get(), "ImageFilter", 3, "parameters", msg(value,"boolean",argName));
    }
    return res;
  }
View Full Code Here

Examples of railo.runtime.exp.FunctionException

    return res;
  }
  public static String toString(Object value, String argName) throws FunctionException {
    String res = Caster.toString(value,null);
    if(res==null) {
      throw new FunctionException(ThreadLocalPageContext.get(), "ImageFilter", 3, "parameters", msg(value,"String",argName));
    }
    return res;
  }
View Full Code Here

Examples of railo.runtime.exp.FunctionException

  }

  public static Colormap toColormap(Object value, String argName) throws FunctionException {
    if(value instanceof Colormap)
      return (Colormap) value;
    throw new FunctionException(ThreadLocalPageContext.get(), "ImageFilter", 3, "parameters", msg(value,"Colormap",argName)+" use function ImageFilterColorMap to create a colormap");
  }
View Full Code Here

Examples of railo.runtime.exp.FunctionException

   
    String[] arr = ListUtil.listToStringArray(str, ',');
    if(arr.length==2) {
      return new Point(Caster.toIntValue(arr[0]),Caster.toIntValue(arr[1]));
    }
    throw new FunctionException(ThreadLocalPageContext.get(), "ImageFilter", 3, "parameters", "use the following format [x,y]");
   
  }
View Full Code Here

Examples of railo.runtime.exp.FunctionException

        Material material = new LightFilter.Material();
        material.setDiffuseColor(toColorRGB(arr[0], argName+"[1]"));
        material.setOpacity(Caster.toFloatValue(arr[1]));
        return material;
      }
      throw new FunctionException(ThreadLocalPageContext.get(), "ImageFilter", 3, "parameters", "use the following format [color,opacity]");
     
    }
   
    throw new FunctionException(ThreadLocalPageContext.get(), "ImageFilter", 3, "parameters", "use the following format [\"color,opacity\"] or [{color='#cc0033',opacity=0.5}]");
   
  }
View Full Code Here

Examples of railo.runtime.exp.FunctionException

    throw new FunctionException(ThreadLocalPageContext.get(), "ImageFilter", 3, "parameters", "use the following format [\"color,opacity\"] or [{color='#cc0033',opacity=0.5}]");
   
  }

  public static Function2D toFunction2D(Object value, String argName) throws FunctionException {
    throw new FunctionException(ThreadLocalPageContext.get(), "ImageFilter", 3, "parameters", "type Function2D not supported yet!");
  }
View Full Code Here

Examples of railo.runtime.exp.FunctionException

    throw new FunctionException(ThreadLocalPageContext.get(), "ImageFilter", 3, "parameters", "type Function2D not supported yet!");
  }


  public static AffineTransform toAffineTransform(Object value, String argName) throws FunctionException {
    throw new FunctionException(ThreadLocalPageContext.get(), "ImageFilter", 3, "parameters", "type BufferedImage not supported yet!");
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.