Examples of RadioButton


Examples of jaron.pde.RadioButton

    flightData.getLongitude().addSignalListener(missionDisplay.createTextLine("Longitude"));
    flightData.getSpeedOverGround().addSignalListener(missionDisplay.createTextLine("Speed [km/h]"));
    flightData.getCurrentWaypointIndex().addSignalListener(missionDisplay.createTextLine("Target waypoint ID"));

    // On/off switch for the autopilot navigation modus
    switchNavigation = new RadioButton(this, "Navigate", 40, 610) {
      @Override public void switchOn() {
        super.switchOn();
        switchStabilize.switchOn();
        switchHome.switchOff();
        missionController.startMission();
      }
      @Override public void switchOff() {
        super.switchOff();
        missionController.stopMission();
      }
    };

    // On/off switch for the autopilot return to home modus
    switchHome = new RadioButton(this, "Go Home", 40, 660) {
      @Override public void switchOn() {
        super.switchOn();
        switchNavigation.switchOff();
        switchStabilize.switchOn();
        missionController.goHome();
      }
      @Override public void switchOff() {
        super.switchOff();
        missionController.stopMission();
      }
    };

    // On/off switch for the autopilot stabilization modus
    switchStabilize = new RadioButton(this, "Stabilize", 40, 560) {
      @Override public void switchOn() {
        super.switchOn();
        missionController.stopMission();
        motionController.startStabilizing();
      }
View Full Code Here

Examples of javafx.scene.control.RadioButton

        grid.setHgap(2);
        grid.setVgap(10);
        grid.setPadding(new Insets(10, 25, 10, 25));
       
        ToggleGroup group = new ToggleGroup();
        goToNumber = new RadioButton("Go To Number:");
        goToNumber.setSelected(true);
        goToNumber.setToggleGroup(group);
        goToTime = new RadioButton("Go To Time:");
        goToTime.setToggleGroup(group);
       
        keyField = new TextField();
        hField = new TextField("00");
        mField = new TextField("00");
View Full Code Here

Examples of nextapp.echo2.app.RadioButton

       
        checkBox = new CheckBox("Test CheckBox", Styles.ICON_LOGO);
        testGrid.addTestRow("Text and Icon", checkBox);
        buttonList.add(checkBox);
       
        RadioButton radioButton;
        testGrid.addHeaderRow("RadioButton");
       
        ButtonGroup buttonGroup = new ButtonGroup();

        radioButton = new RadioButton();
        radioButton.setGroup(buttonGroup);
        testGrid.addTestRow("No Content", radioButton);
        buttonList.add(radioButton);

        radioButton = new RadioButton("Test RadioButton");
        radioButton.setGroup(buttonGroup);
        testGrid.addTestRow("Text", radioButton);
        buttonList.add(radioButton);
       
        radioButton = new RadioButton(Styles.ICON_LOGO);
        radioButton.setGroup(buttonGroup);
        testGrid.addTestRow("Icon", radioButton);
        buttonList.add(radioButton);
       
        radioButton = new RadioButton("Test RadioButton", Styles.ICON_LOGO);
        radioButton.setGroup(buttonGroup);
        testGrid.addTestRow("Text and Icon", radioButton);
        buttonList.add(radioButton);

        buttonGroup = new ButtonGroup();
        Grid radioGrid = new Grid();
        radioGrid.setInsets(new Insets(10));
        for (int i = 1; i <= 4; ++i) {
            radioButton = new RadioButton(Integer.toString(i));
            radioButton.setGroup(buttonGroup);
            radioGrid.add(radioButton);
            buttonList.add(radioButton);
        }
        testGrid.addTestRow("Separate ButtonGroup", radioGrid);
       
        radioButton = new RadioButton("Test");
        buttonList.add(radioButton);
        testGrid.addTestRow("Null ButtonGroup", radioButton);

        ButtonColumn controlsColumn;
       
View Full Code Here

Examples of org.apache.pivot.wtk.RadioButton

        disabledButtonSelectionColor = theme.getColor(7);
    }

    @Override
    public int getPreferredWidth(int height) {
        RadioButton radioButton = (RadioButton)getComponent();
        Button.DataRenderer dataRenderer = radioButton.getDataRenderer();

        dataRenderer.render(radioButton.getButtonData(), radioButton, false);

        int preferredWidth = BUTTON_DIAMETER
            + dataRenderer.getPreferredWidth(height)
            + spacing * 2;

 
View Full Code Here

Examples of org.apache.pivot.wtk.RadioButton

        return preferredWidth;
    }

    @Override
    public int getPreferredHeight(int width) {
        RadioButton radioButton = (RadioButton)getComponent();
        Button.DataRenderer dataRenderer = radioButton.getDataRenderer();

        dataRenderer.render(radioButton.getButtonData(), radioButton, false);

        if (width != -1) {
            width = Math.max(width - (BUTTON_DIAMETER + spacing), 0);
        }
View Full Code Here

Examples of org.apache.pivot.wtk.RadioButton

        return preferredHeight;
    }

    @Override
    public Dimensions getPreferredSize() {
        RadioButton radioButton = (RadioButton)getComponent();
        Button.DataRenderer dataRenderer = radioButton.getDataRenderer();

        dataRenderer.render(radioButton.getButtonData(), radioButton, false);

        int preferredWidth = BUTTON_DIAMETER
            + dataRenderer.getPreferredWidth(-1)
            + spacing * 2;

 
View Full Code Here

Examples of org.apache.pivot.wtk.RadioButton

        return new Dimensions(preferredWidth, preferredHeight);
    }

    @Override
    public int getBaseline(int width, int height) {
        RadioButton radioButton = (RadioButton)getComponent();

        int baseline = -1;

        Button.DataRenderer dataRenderer = radioButton.getDataRenderer();
        dataRenderer.render(radioButton.getButtonData(), radioButton, false);

        int clientWidth = Math.max(width - (BUTTON_DIAMETER + spacing), 0);
        baseline = dataRenderer.getBaseline(clientWidth, height);

        return baseline;
View Full Code Here

Examples of org.apache.pivot.wtk.RadioButton

        return baseline;
    }

    @Override
    public void paint(Graphics2D graphics) {
        RadioButton radioButton = (RadioButton)getComponent();
        int width = getWidth();
        int height = getHeight();

        // Paint the button
        Graphics2D buttonGraphics = (Graphics2D)graphics.create();
        paintButton(buttonGraphics, radioButton, height);
        buttonGraphics.dispose();

        // Paint the content
        Button.DataRenderer dataRenderer = radioButton.getDataRenderer();
        dataRenderer.render(radioButton.getButtonData(), radioButton, false);
        dataRenderer.setSize(Math.max(width - (BUTTON_DIAMETER + spacing * 2), 0), height);

        Graphics2D contentGraphics = (Graphics2D)graphics.create();
        contentGraphics.translate(BUTTON_DIAMETER + spacing, 0);
        contentGraphics.clipRect(0, 0, dataRenderer.getWidth(), dataRenderer.getHeight());
        dataRenderer.paint(contentGraphics);
        contentGraphics.dispose();

        // Paint the focus state
        if (radioButton.isFocused()) {
            BasicStroke dashStroke = new BasicStroke(1.0f, BasicStroke.CAP_ROUND,
                BasicStroke.JOIN_ROUND, 1.0f, new float[] {0.0f, 2.0f}, 0.0f);

            graphics.setStroke(dashStroke);
            graphics.setColor(buttonBorderColor);
View Full Code Here

Examples of org.apache.pivot.wtk.RadioButton

        disabledButtonSelectionColor = theme.getColor(7);
    }

    @Override
    public int getPreferredWidth(int height) {
        RadioButton radioButton = (RadioButton)getComponent();
        Button.DataRenderer dataRenderer = radioButton.getDataRenderer();

        int preferredWidth = BUTTON_DIAMETER;

        Object buttonData = radioButton.getButtonData();
        if (buttonData != null) {
            dataRenderer.render(buttonData, radioButton, false);
            preferredWidth += dataRenderer.getPreferredWidth(height)
                + spacing * 2;
        }
View Full Code Here

Examples of org.apache.pivot.wtk.RadioButton

        return preferredWidth;
    }

    @Override
    public int getPreferredHeight(int width) {
        RadioButton radioButton = (RadioButton)getComponent();
        Button.DataRenderer dataRenderer = radioButton.getDataRenderer();

        int preferredHeight = BUTTON_DIAMETER;

        Object buttonData = radioButton.getButtonData();
        if (buttonData != null) {
            if (width != -1) {
                width = Math.max(width - (BUTTON_DIAMETER + spacing), 0);
            }
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.