Examples of SliderProperties


Examples of com.barrybecker4.ui.sliders.SliderProperties

        SliderProperties[] props = new SliderProperties[1];

        String creatureName = creaturePop_.getName();

        props[0] = new SliderProperties(creatureName + BIRTH_RATE_LABEL,
                1.9, creaturePop_.getMaxBirthRate(), creaturePop_.getInitialBirthRate(), 1000.0);

        return props;
    }
View Full Code Here

Examples of com.barrybecker4.ui.sliders.SliderProperties

    private SliderProperties[] createSliderProperties() {

        SliderProperties[] sliderProps;
        sliderProps = new SliderProperties[] {
                //                                      MIN   MAX    INITIAL    SCALE
                new SliderProperties(VISCOSITY_SLIDER, 0.0, 0.1, GridUpdater.DEFAULT_VISCOSITY, 100),
                new SliderProperties(B0_SLIDER, 1.0, 2.0, GridUpdater.DEFAULT_B0, 100),
                new SliderProperties(TIMESTEP_SLIDER, 0.001, 0.4, 0.01, 1000)};
         return sliderProps;
    }
View Full Code Here

Examples of com.barrybecker4.ui.sliders.SliderProperties

    private SliderProperties[] createSliderProperties() {
        LocomotionParameters params = new LocomotionParameters();
        SliderProperties[] sliderProps;
        sliderProps = new SliderProperties[]{
                //                                     MIN  MAX   INITIAL   SCALE
                new SliderProperties(DIRECTION_SLIDER, -1.0, 1.0, params.getDirection(), 100),
                new SliderProperties(WAVE_SPEED_SLIDER, 0.0001, 0.1, params.getWaveSpeed(), 1000),
                new SliderProperties(WAVE_AMPLITUDE_SLIDER, 0.000, 0.3, params.getWaveAmplitude(), 100),
                new SliderProperties(WAVE_PERIOD_SLIDER, .5, 5.0, params.getWavePeriod(), 100),
                new SliderProperties(MASS_SCALE_SLIDER, 0.1, 6.0, params.getMassScale(), 100),
                new SliderProperties(SPRING_CONST_SLIDER, 0.1, 4.0, params.getSpringK(), 100),
                new SliderProperties(SPRING_DAMPING_SLIDER, 0.1, 4.0, params.getSpringDamping(), 100),
                new SliderProperties(SCALE_SLIDER, 0.2, 2.0, snakeSim_.getScale(), 100),
                new SliderProperties(TIMESTEP_SLIDER, 0.001, 0.5, SnakeSimulator.INITIAL_TIME_STEP, 1000)};
         return sliderProps;
    }
View Full Code Here

Examples of com.barrybecker4.ui.sliders.SliderProperties

    private SliderProperties[] createSliderProperties()  {

        SliderProperties[] props = new SliderProperties[3];

        String creatureName = creaturePop_.getName();
        props[0] = new SliderProperties(creatureName + POPULATION_LABEL,
                0, 2000, creaturePop_.getInitialPopulation());
        props[1] = new SliderProperties(creatureName + BIRTH_RATE_LABEL,
                0, creaturePop_.getMaxBirthRate(), creaturePop_.getInitialBirthRate(), 1000);
        props[2] = new SliderProperties(creatureName + DEATH_RATE_LABEL,
                0, creaturePop_.getMaxDeathRate(), creaturePop_.getInitialDeathRate(), 1000.0);

        return props;
    }
View Full Code Here

Examples of com.barrybecker4.ui.sliders.SliderProperties

        String creatureName = type.getName();
        setBackground(type.getColor());

        double size = type.getSize();
        props[0] = new SliderProperties(creatureName + SIZE_LABEL,
                                        MIN_FACTOR * size, MAX_FACTOR * size, size, 200);
        int gestation = type.getGestationPeriod();
        props[1] = new SliderProperties(creatureName + GESTATION_LABEL,
                                        1, (int)(MAX_FACTOR * gestation), gestation);
        int starveTime = type.getStarvationThreshold();
        props[2] = new SliderProperties(creatureName + STARVATION_LABEL,
                                       (int)(MIN_FACTOR * starveTime), (int)(MAX_FACTOR * starveTime), starveTime);
        int nutrition = type.getNutritionalValue();
        props[3] = new SliderProperties(creatureName + NUTRITION_LABEL,
                                         1, (int)(MAX_FACTOR * nutrition), nutrition);
        if (normSpeed > 0) {
            props[4] = new SliderProperties(creatureName + NORM_SPEED_LABEL,
                                             0, MAX_FACTOR * normSpeed, normSpeed, 1000.0);
            double maxSpeed = type.getMaxSpeed();
            props[5] = new SliderProperties(creatureName + MAX_SPEED_LABEL,
                                             0, MAX_FACTOR * maxSpeed, maxSpeed, 1000.0);
        }
        return props;
    }
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.