Examples of RenderingOptions


Examples of com.barrybecker4.simulation.fluid.rendering.RenderingOptions

    }

    public FluidSimulator( FluidEnvironment environment ) {
        super("Fuild");
        environment_ = environment;
        renderOptions = new RenderingOptions();
        commonInit();
    }
View Full Code Here

Examples of com.barrybecker4.simulation.fluid.rendering.RenderingOptions

        controlsPanel.add(legend_);
    }

    private JPanel createCheckBoxes() {

        RenderingOptions renderOpts =  simulator_.getRenderer().getOptions();

        // not yet supported.
        //useConcurrentCalculation_ = createCheckBox("Parallel calculation",
        //        "Will take advantage of multiple processors for calculation if present.", false);

        useConcurrentRendering_ = createCheckBox("Parallel rendering",
                "Will take advantage of multiple processors for rendering if present.", renderOpts.isParallelized());

        useLinearInterpolation_ = createCheckBox("Use linear interpolation",
                "If checked, use linear interpolation when rendering, to give a smoother look.",
                renderOpts.getUseLinearInterpolation());

        showVelocities_ = createCheckBox("Show velocities", "if checked, show velocity vectors",
                                          renderOpts.getShowVelocities());
        showGrid_ = createCheckBox("Show grid",
                "Draw the background grid that shows the cells.", renderOpts.getShowGrid());

        JPanel checkBoxes = new JPanel(new GridLayout(0, 2));

        //checkBoxes.add(useConcurrentCalculation_);
        checkBoxes.add(useConcurrentRendering_);
View Full Code Here

Examples of com.barrybecker4.simulation.fluid.rendering.RenderingOptions

    }

    public void reset() {
        sliderGroup_.reset();
        // make sure we honor current check selections
        RenderingOptions renderOpts =  simulator_.getRenderer().getOptions();
        renderOpts.setShowGrid(showGrid_.isSelected());
        renderOpts.setShowVelocities(showVelocities_.isSelected());
        renderOpts.setUseLinearInterpolation(useLinearInterpolation_.isSelected());
    }
View Full Code Here

Examples of com.barrybecker4.simulation.fluid.rendering.RenderingOptions

    /**
     * One of the buttons was pressed
     */
    public void actionPerformed(ActionEvent e) {
        EnvironmentRenderer renderer = simulator_.getRenderer();
        RenderingOptions renderOpts =  renderer.getOptions();

        if (e.getSource() == useConcurrentCalculation_) {
            // gs_.setParallelized(!gs_.isParallelized());
        }
        else if (e.getSource() == useConcurrentRendering_) {
            renderOpts.setParallelized(!renderOpts.isParallelized());
        }
        else if (e.getSource() == useLinearInterpolation_) {
            renderOpts.setUseLinearInterpolation(!renderOpts.getUseLinearInterpolation());
        }
        else if (e.getSource() == showVelocities_) {
            renderOpts.setShowVelocities(!renderOpts.getShowVelocities());
        }
        else if (e.getSource() == showGrid_) {
            renderOpts.setShowGrid(!renderOpts.getShowGrid());
        }
    }
View Full Code Here

Examples of net.rim.device.api.browser.field.RenderingOptions

    /**
     * Creates a new BrowserContentManagerDemo object
     */
    public BrowserContentManagerDemo() {
        _browserContentManager = new BrowserContentManager(0);
        final RenderingOptions renderingOptions =
                _browserContentManager.getRenderingSession()
                        .getRenderingOptions();

        // Turn on images in html. Change 'true' to 'false'
        // to disable image rendering.
        renderingOptions.setProperty(RenderingOptions.CORE_OPTIONS_GUID,
                RenderingOptions.SHOW_IMAGES_IN_HTML, true);

        _mainScreen = new MainScreen();
        _mainScreen.add(new LabelField("Label before the content",
                Field.FOCUSABLE));
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.