Examples of changeScale()


Examples of eu.planets_project.pp.plato.model.tree.Leaf.changeScale()

    private PositiveFloatScale posFloat = new PositiveFloatScale();
   
    @Test
    public void testScaleBooleanValue(){
        Leaf leaf = new Leaf();
        leaf.changeScale(booleanScale);
        // test as parent Scale - this is the way it is used within the application
        Scale scale = leaf.getScale();
        assert("Yes/No".equals(((BooleanScale)scale).getRestriction()));
        ((RestrictedScale)scale).setRestriction("meine/eigene");
        assert("Yes/No".equals(((RestrictedScale)scale).getRestriction()));
View Full Code Here

Examples of eu.planets_project.pp.plato.model.tree.Leaf.changeScale()

    }
   
    @Test
    public void testScaleIntRangeValue(){
        Leaf leaf = new Leaf();
        leaf.changeScale(intRangeScale);
        Scale scale = leaf.getScale();
        assert("0/5".equals(((RestrictedScale)scale).getRestriction()));
        ((RestrictedScale)scale).setRestriction("-5/-1");
        assert("-5/-1".equals(((RestrictedScale)scale).getRestriction()));
        ((RestrictedScale)scale).setRestriction("aa/bbb");
View Full Code Here

Examples of eu.planets_project.pp.plato.model.tree.Leaf.changeScale()

    }
   
    @Test
    public void testChangeScaleType(){
        Leaf leaf = new Leaf();
        leaf.changeScale(booleanScale);
        leaf.changeScale(intRangeScale);
        Scale scale = leaf.getScale();
       
        assert(scale instanceof IntRangeScale);
        assert("0/5".equals(((RestrictedScale)scale).getRestriction()));
View Full Code Here

Examples of eu.planets_project.pp.plato.model.tree.Leaf.changeScale()

   
    @Test
    public void testChangeScaleType(){
        Leaf leaf = new Leaf();
        leaf.changeScale(booleanScale);
        leaf.changeScale(intRangeScale);
        Scale scale = leaf.getScale();
       
        assert(scale instanceof IntRangeScale);
        assert("0/5".equals(((RestrictedScale)scale).getRestriction()));
       
View Full Code Here

Examples of eu.planets_project.pp.plato.model.tree.Leaf.changeScale()

        Scale scale = leaf.getScale();
       
        assert(scale instanceof IntRangeScale);
        assert("0/5".equals(((RestrictedScale)scale).getRestriction()));
       
        leaf.changeScale(yanScale);
        scale = leaf.getScale();
        assert(scale instanceof YanScale);
        assert("Yes/Acceptable/No".equals(((RestrictedScale)scale).getRestriction()));
        assert("Yes/Acceptable/No".equals(((OrdinalScale)scale).getRestriction()));
        assert("Yes/Acceptable/No".equals(((YanScale)scale).getRestriction()));       
View Full Code Here

Examples of eu.planets_project.pp.plato.model.tree.Leaf.changeScale()

        childNode.setName("Image properties");
        rootN.addChild(childNode);

        Leaf leafWithUnit = new Leaf();
        leafWithUnit.setName("Amount of Pixel");
        leafWithUnit.changeScale(new PositiveIntegerScale());
        leafWithUnit.getScale().setUnit("px");
        childNode.addChild(leafWithUnit);

        Leaf ordinalLeaf = new Leaf();
        ordinalLeaf.setName("Karma");
View Full Code Here

Examples of eu.planets_project.pp.plato.model.tree.Leaf.changeScale()

        Leaf ordinalLeaf = new Leaf();
        ordinalLeaf.setName("Karma");
        OrdinalScale ordinalScale = new OrdinalScale();
        ordinalScale.setRestriction("Good/Bad/Evil");
        ordinalLeaf.changeScale(ordinalScale);
        rootN.addChild(ordinalLeaf);

        Leaf numericLeaf = new Leaf();
        numericLeaf.setName("Filesize (in Relation to Original)");
        numericLeaf.changeScale(new PositiveFloatScale());
View Full Code Here

Examples of eu.planets_project.pp.plato.model.tree.Leaf.changeScale()

        ordinalLeaf.changeScale(ordinalScale);
        rootN.addChild(ordinalLeaf);

        Leaf numericLeaf = new Leaf();
        numericLeaf.setName("Filesize (in Relation to Original)");
        numericLeaf.changeScale(new PositiveFloatScale());
        numericLeaf.getScale().setUnit("MB");
        rootN.addChild(numericLeaf);

        Leaf singleLeaf = new Leaf();
        singleLeaf.setName("A Single-Leaf");
View Full Code Here

Examples of eu.planets_project.pp.plato.model.tree.Leaf.changeScale()

        numericLeaf.getScale().setUnit("MB");
        rootN.addChild(numericLeaf);

        Leaf singleLeaf = new Leaf();
        singleLeaf.setName("A Single-Leaf");
        singleLeaf.changeScale(new PositiveFloatScale());
        singleLeaf.getScale().setUnit("tbd");
        singleLeaf.setSingle(true);
        rootN.addChild(singleLeaf);

        Leaf restrictedLeaf = new Leaf();
View Full Code Here

Examples of eu.planets_project.pp.plato.model.tree.Leaf.changeScale()

        Leaf restrictedLeaf = new Leaf();
        restrictedLeaf.setName("IntRange 0-10");
        IntRangeScale range = new IntRangeScale();
        range.setLowerBound(0);
        range.setUpperBound(10);
        restrictedLeaf.changeScale(range);
        rootN.addChild(restrictedLeaf);

        q.getTree().setRoot(rootN);

        q.getTree().initValues(q.getAlternativesDefinition().getAlternatives(),
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.