Exemple #1
0
 /**
  * Returns a parameter giving expressions for the error values associated with a given coordinate
  * axis, indexed by a table-identifying label. The value taken by this parameter is a string which
  * is either a single (symmetric) numeric error expression or two comma-separated error
  * expressions.
  *
  * @param axName axis label
  * @param tlabel table identifier
  * @return error pair parameter
  */
 private Parameter createErrorParameter(String axName, String tlabel) {
   Parameter param = new Parameter(axName.toLowerCase() + "error" + tlabel);
   param.setUsage("<expr>|[<lo-expr>],[<hi-expr>]");
   param.setPrompt("Error bound(s) in " + axName + " for table " + tlabel);
   param.setNullPermitted(true);
   param.setDescription(
       new String[] {
         "<p>Gives expressions for the errors on " + axName,
         "coordinates for table " + tlabel + ".",
         "The following forms are permitted:",
         "<ul>",
         "<li><code>&lt;expr&gt;</code>: symmetric error value</li>",
         "<li><code>&lt;lo-expr&gt;,&lt;hi-expr&gt;</code>:"
             + "distinct lower and upper error values</li>",
         "<li><code>&lt;lo-expr&gt;,</code>: lower error value only</li>",
         "<li><code>,&lt;hi-expr&gt;</code>: upper error value only</li>",
         "<li><code>null</code>: no errors</li>",
         "</ul>",
         "The expression in each case is a numeric algebraic expression",
         "based on column names",
         "as described in <ref id='jel'/>.",
         "</p>",
       });
   return param;
 }
Exemple #2
0
    /**
     * Constructor.
     *
     * @param axName axis name
     */
    public AxisParameterSet(String axName) {
      axName_ = axName.toLowerCase();
      loParam_ = new DoubleParameter(axName_ + "lo");
      loParam_.setPrompt("Lower bound for " + axName_ + " axis");
      loParam_.setDescription(
          new String[] {
            "<p>The lower limit for the plotted " + axName_ + " axis.",
            "If not set, a value will be chosen which is low enough",
            "to accommodate all the data.",
            "</p>",
          });
      loParam_.setNullPermitted(true);

      hiParam_ = new DoubleParameter(axName_ + "hi");
      hiParam_.setPrompt("Upper bound for " + axName_ + " axis");
      hiParam_.setDescription(
          new String[] {
            "<p>The upper limit for the plotted " + axName_ + " axis.",
            "If not set, a value will be chosen which is high enough",
            "to accommodate all the data.",
            "</p>",
          });
      hiParam_.setNullPermitted(true);

      logParam_ = new BooleanParameter(axName_ + "log");
      logParam_.setPrompt("Logarithmic scale on " + axName_ + " axis?");
      logParam_.setDescription(
          new String[] {
            "<p>If false (the default), the scale on the " + axName_,
            "axis is linear; if true it is logarithmic.",
            "</p>",
          });
      logParam_.setDefault("false");

      flipParam_ = new BooleanParameter(axName_ + "flip");
      flipParam_.setPrompt("Reversed direction on " + axName_ + "axis?");
      flipParam_.setDescription(
          new String[] {
            "<p>If set true, the scale on the " + axName_ + " axis",
            "will increase in the opposite sense from usual",
            "(e.g. right to left rather than left to right).",
            "</p>",
          });
      flipParam_.setDefault("false");

      labelParam_ = new Parameter(axName_ + "label");
      labelParam_.setPrompt("Label for axis " + axName_);
      labelParam_.setDescription(
          new String[] {
            "<p>Specifies a label to be used for annotating axis " + axName_ + ".",
            "A default values based on the plotted data will be used",
            "if no value is supplied for this parameter.",
            "</p>",
          });
      labelParam_.setNullPermitted(true);
    }
Exemple #3
0
 /**
  * Constructs a new subset name parameter.
  *
  * @param stlabel table/subset parameter label
  * @return new subset name parameter
  */
 private Parameter createSubsetNameParameter(String stlabel) {
   Parameter nameParam = new Parameter(STYLE_PREFIX + "name" + stlabel);
   nameParam.setNullPermitted(true);
   nameParam.setPrompt("Label for subset " + stlabel);
   nameParam.setDescription(
       new String[] {
         "<p>Provides a name to use for a subset with the symbolic label",
         stlabel + ".",
         "This name will be used for display in the legend,",
         "if one is displayed.",
         "</p>",
       });
   return nameParam;
 }
Exemple #4
0
 /**
  * Constructs a new text label expression parameter.
  *
  * @param tlabel table parameter label
  * @return new text label expression parameter
  */
 private Parameter createLabelParameter(String tlabel) {
   Parameter labelParam = new Parameter("txtlabel" + tlabel);
   labelParam.setPrompt("Label annotating each plotted point");
   labelParam.setDescription(
       new String[] {
         "<p>Gives an expression which will label each plotted point.",
         "If given, the text (or number) resulting from evaluating",
         "the expression will be written near each point which is",
         "plotted.",
         "</p>",
       });
   labelParam.setNullPermitted(true);
   return labelParam;
 }
Exemple #5
0
 /**
  * Returns a parameter giving an expression for the coordinate values used by this axis. It is
  * indexed by a table-identifying label.
  *
  * @param tlabel table identifier
  * @return parameter giving JEL expression for coordinate data
  */
 public Parameter createCoordParameter(String tlabel) {
   Parameter param = new Parameter(axName_ + "data" + tlabel);
   param.setUsage("<expr>");
   param.setPrompt("Value to plot on " + axName_ + " axis" + " for table " + tlabel);
   param.setDescription(
       new String[] {
         "<p>Gives a column name or expression for the " + axName_,
         "axis data for table " + tlabel + ".",
         "The expression is a numeric algebraic expression",
         "based on column names",
         "as described in <ref id=\"jel\"/>",
         "</p>",
       });
   return param;
 }
Exemple #6
0
 /**
  * Constructs a new subset inclusion expression parameter.
  *
  * @param stlabel table/subset parameter label
  * @return new subset expression parameter
  */
 private Parameter createSubsetExpressionParameter(String stlabel) {
   Parameter param = new Parameter(SUBSET_PREFIX + stlabel);
   param.setPrompt("Selection criterion for subset " + stlabel);
   param.setDescription(
       new String[] {
         "<p>Gives the selection criterion for the subset labelled",
         "\"<code>" + stlabel + "</code>\".",
         "This is a boolean expression which may be the name of",
         "a boolean-valued column or any other boolean-valued expression.",
         "Rows for which the expression evaluates true will be included",
         "in the subset, and those for which it evaluates false will not.",
         "</p>",
       });
   param.setUsage("<expr>");
   return param;
 }