<?xml version="1.0" encoding="utf-8" ?>

<!--
 * @(#)ScriptedFunction.xml
 *
 * Copyright: Yokogawa, All rights reserved.
 * YOKOGAWA PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 *
 * Author:    R.Houtman
 *
 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 *  Changes ....
 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 *  Who When    Change  What
 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 *  HMN Aug-14  i11118  First version
 *  HMN Aug-15  i11349  Support for R10.02
 *  HMN Jan-18  e11920  Correct Bound for input[]
 *  VNU Sep-18  e11987  Enabled HTML component
 *  HVS Jun-20  e12272  Port to JViews 2017.2
 *
-->

<componentType name="ScriptedFunction"
  containedBy="Function"
  icon="stock_function_javascript-16.png"
  description="ScriptedFunction"
  class="fasttools.jwui.components.functions.scriptedfunction.ScriptedFunction"
  paletteOrder="306" >

  <category name="General">
    <property name="name" type="java.lang.String" defaultAllowed="no" connectAllowed="no"/>
  </category>
  
  <category name="Transformation">
    <property name="x" type="double" defaultAllowed="no" setter="setXAsFloat" getter="getXAsFloat" connectAllowed="no" advanced="yes"/>
    <property name="y" type="double" defaultAllowed="no" setter="setYAsFloat" getter="getYAsFloat" connectAllowed="no" advanced="yes"/>
    <property name="top" type="double" defaultAllowed="no" connectAllowed="no" advanced="yes"/>
    <property name="bottom" type="double" defaultAllowed="no" connectAllowed="no" advanced="yes"/>
    <property name="left" type="double" defaultAllowed="no" connectAllowed="no" advanced="yes"/>
    <property name="right" type="double" defaultAllowed="no" connectAllowed="no" advanced="yes"/>
    <property name="rotation" type="double" defaultAllowed="no" connectAllowed="no" advanced="yes"/>
    <property name="shear" type="double" defaultAllowed="no" connectAllowed="no" advanced="yes"/>
  </category>
  
  <category name="Function">
    <property name="script"      type="java.lang.String" />
    <property name="inputCount"  type="int"  connectAllowed="no" advanced="yes"/>
    <property name="outputCount" type="int"  connectAllowed="no" advanced="yes"/>
    <property name="language"    type="java.lang.String"  connectAllowed="no" advanced="yes"/>    
  </category>
  
  <category name="Runtime">
    <property name="clearError" type="boolean"          />
    <property name="error"      type="boolean"          bound="yes" writeAllowed="no" save="no" defaultAllowed="no" setter="setError" getter="isError"/>
    <property name="errorText"  type="java.lang.String" bound="yes" writeAllowed="no" save="no" defaultAllowed="no" setter="setErrorText" getter="getErrorText"/>

    <property name="globalExecutionDuration"  type="float" bound="yes" writeAllowed="no" save="no" defaultAllowed="no" advanced="yes"/>    
    <property name="executionDuration"  type="float" bound="yes" writeAllowed="no" save="no" defaultAllowed="no" advanced="yes"/>    
  </category>
  
  <category name="Inputs">
    <property name="input" array="0..getLastInputIndex" bound="no" type="java.lang.Object" setter="setInputValue" getter="getInputValue" advanced="yes"/>
  </category>

  <category name="Outputs">
    <property name="output" array="0..getLastOutputIndex" type="java.lang.Object" bound="yes" defaultAllowed="no" setter="setOutputValue" getter="getOutputValue" advanced="yes" writeAllowed="no" save="no"/>
  </category>
   
  
</componentType>