예제 #1
0
  public static Scale makeShape() {
    Scale s = new Scale();
    s.setName("scale_shape");
    s.aesName = "shape";

    Param p;
    ParamVector pv;

    p = new ParamScaleLegend("legend", s.aesName, false);
    p.setTitle("");
    p.setViewType(ParamScaleLegend.VIEW_SCALE);
    s.params.add(p);

    pv = new ParamVector();
    pv.setName("limits");
    pv.setTitle("Included levels");
    pv.setNumeric(false);
    s.params.add(p);

    p = new ParamLogical();
    p.setName("solid");
    p.setTitle("Use solid points");
    p.setValue(new Boolean(true));
    p.setDefaultValue(new Boolean(true));
    s.params.add(p);

    return s;
  }
예제 #2
0
  public static Scale makeGradientn(String aes) {
    Scale s = new Scale();
    s.setName("scale_" + aes + "_gradientn");
    s.aesName = aes;

    Param p;
    ParamVector pv;

    p = new ParamScaleLegend("legend", s.aesName, true);
    p.setTitle("");
    p.setViewType(ParamScaleLegend.VIEW_SCALE);
    s.params.add(p);

    pv = new ParamVector();
    pv.setName("colours");
    pv.setTitle("Colours");
    pv.setNumeric(false);
    s.params.add(pv);

    p = new ParamCharacter();
    p.setName("space");
    p.setTitle("Colour space");
    p.setViewType(Param.VIEW_COMBO);
    p.setValue("rgb");
    p.setDefaultValue("rgb");
    p.setOptions(new String[] {"rgb", "Lab"});
    s.params.add(p);

    p = new ParamNone("Data");
    p.setViewType(ParamNone.VIEW_SEPERATOR);
    s.params.add(p);

    p = new ParamVector();
    p.setName("limits");
    p.setTitle("Data range");
    p.setViewType(Param.VIEW_TWO_VALUE_ENTER);
    s.params.add(p);

    p = new ParamCharacter();
    p.setName("trans");
    p.setTitle("Transform");
    p.setViewType(Param.VIEW_COMBO);
    p.setValue("identity");
    p.setDefaultValue("identity");
    p.setOptions(transformations);
    p.setLabels(transformationNames);
    s.params.add(p);

    return s;
  }
예제 #3
0
  public static Scale makeManual(String aes) {
    Scale s = new Scale();
    s.setName("scale_" + aes + "_manual");
    s.aesName = aes;

    Param p;
    ParamVector pv;

    p = new ParamScaleLegend("legend", s.aesName, false);
    p.setTitle("");
    p.setViewType(ParamScaleLegend.VIEW_SCALE);
    s.params.add(p);

    pv = new ParamVector();
    pv.setName("values");
    pv.setTitle("Values");
    pv.setNumeric(!(aes.equals("colour") || aes.equals("fill")));
    s.params.add(pv);

    return s;
  }
예제 #4
0
  public static Scale makeDiscrete(String aes) {
    Scale s = new Scale();
    s.setName("scale_" + aes + "_discrete");
    s.aesName = aes;

    Param p;

    p = new ParamScaleLegend("legend", s.aesName, false);

    p.setViewType(ParamScaleLegend.VIEW_SCALE);
    s.params.add(p);

    p = new ParamVector();
    p.setName("expand");
    p.setTitle("Expand");
    p.setValue(new String[] {"0.05", "0.55"});
    p.setDefaultValue(new String[] {"0.05", "0.55"});
    p.setViewType(Param.VIEW_TWO_VALUE_ENTER);
    s.params.add(p);

    ParamVector pv = new ParamVector();
    pv.setName("limits");
    pv.setNumeric(false);
    pv.setTitle("Included levels");
    s.params.add(pv);

    p = new ParamLogical();
    p.setName("drop");
    p.setTitle("Drop unused levels");
    p.setViewType(Param.VIEW_CHECK_BOX);
    p.setValue(new Boolean(true));
    p.setDefaultValue(new Boolean(true));
    s.params.add(p);

    return s;
  }
예제 #5
0
  public static Scale makeAlpha() {
    Scale s = new Scale();
    s.setName("scale_alpha");
    s.aesName = "alpha";

    Param p;
    ParamNumeric pn;
    ParamVector pv;

    p = new ParamScaleLegend("legend", s.aesName, true);
    p.setTitle("");
    p.setViewType(ParamScaleLegend.VIEW_SCALE);
    s.params.add(p);

    p = new ParamVector();
    p.setName("limits");
    p.setTitle("Data range");

    s.params.add(p);

    pv = new ParamVector();
    pv.setName("range");
    pv.setTitle("Alpha range");
    pv.setViewType(Param.VIEW_TWO_VALUE_ENTER);
    pv.setValue(new String[] {"0", "1"});
    pv.setDefaultValue(new String[] {"0", "1"});
    pv.setLowerBound(new Double(0));
    pv.setUpperBound(new Double(1));
    s.params.add(pv);

    p = new ParamCharacter();
    p.setName("trans");
    p.setTitle("Transform");
    p.setViewType(Param.VIEW_COMBO);
    p.setValue("identity");
    p.setDefaultValue("identity");
    p.setOptions(transformations);
    p.setLabels(transformationNames);
    s.params.add(p);

    return s;
  }
예제 #6
0
  public static Scale makeHue(String aes) {
    Scale s = new Scale();
    s.setName("scale_" + aes + "_hue");
    s.aesName = aes;

    Param p;
    ParamNumeric pn;
    ParamVector pv;

    p = new ParamScaleLegend("legend", s.aesName, false);
    p.setTitle("");
    ((ParamScaleLegend) p).setAes(aes);
    p.setViewType(ParamScaleLegend.VIEW_SCALE);
    s.params.add(p);

    p = new ParamNone("Colour");
    p.setViewType(ParamNone.VIEW_SEPERATOR);
    s.params.add(p);

    p = new ParamVector();
    p.setName("h");
    p.setTitle("Hue range");
    p.setViewType(Param.VIEW_TWO_VALUE_ENTER);
    p.setValue(new String[] {"15", "375"});
    p.setDefaultValue(new String[] {"15", "375"});
    s.params.add(p);

    pn = new ParamNumeric();
    pn.setName("l");
    pn.setTitle("Luminance [0, 100]");
    pn.setViewType(Param.VIEW_ENTER);
    pn.setValue(new Double(65));
    pn.setDefaultValue(new Double(65));
    pn.setLowerBound(new Double(0));
    pn.setUpperBound(new Double(100));
    s.params.add(pn);

    pn = new ParamNumeric();
    pn.setName("c");
    pn.setTitle("Chroma");
    pn.setViewType(Param.VIEW_ENTER);
    pn.setValue(new Double(100));
    pn.setDefaultValue(new Double(100));
    pn.setLowerBound(new Double(0));
    s.params.add(pn);

    pn = new ParamNumeric();
    pn.setName("h.start");
    pn.setTitle("Hue start");
    pn.setViewType(Param.VIEW_ENTER);
    pn.setValue(new Double(0));
    pn.setDefaultValue(new Double(0));
    pn.setLowerBound(new Double(0));
    s.params.add(pn);

    pn = new ParamNumeric();
    pn.setName("direction");
    pn.setTitle("Colour wheel direction");
    pn.setViewType(Param.VIEW_COMBO);
    pn.setValue(new Double(1.0));
    pn.setDefaultValue(new Double(1.0));
    pn.setOptions(new String[] {"1.0", "-1.0"});
    pn.setLabels(new String[] {"clockwise", "counter clockwise"});
    s.params.add(pn);

    p = new ParamNone("Data");
    p.setViewType(ParamNone.VIEW_SEPERATOR);
    s.params.add(p);

    pv = new ParamVector();
    pv.setName("limits");
    pv.setTitle("Included levels");
    pv.setNumeric(false);
    s.params.add(pv);

    return s;
  }