com.tcay.slalom.UI.client.ICFPenaltyAssessmentMAYBE.java Source code

Java tutorial

Introduction

Here is the source code for com.tcay.slalom.UI.client.ICFPenaltyAssessmentMAYBE.java

Source

/*
 * This file is part of SlalomApp.
 *
 *     SlalomApp is free software: you can redistribute it and/or modify
 *     it under the terms of the GNU General Public License as published by
 *     the Free Software Foundation, either version 3 of the License, or
 *     (at your option) any later version.
 *
 *     SlalomApp is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU General Public License for more details.
 *
 *     You should have received a copy of the GNU General Public License
 *     along with SlalomApp.  If not, see <http://www.gnu.org/licenses/>.
 */

package com.tcay.slalom.UI.client;

import com.jgoodies.forms.layout.CellConstraints;
import com.jgoodies.forms.layout.FormLayout;

import javax.swing.*;
import java.awt.*;

/**
 * SlalomScoring
 * Teton Cay Group Inc. 2013
 * <p/>
 * User: allen
 * Date: 11/7/13
 * Time: 5:12 PM
 */
public class ICFPenaltyAssessmentMAYBE {
    private JPanel panel1;
    private JRadioButton aMissedGateInRadioButton;
    private JRadioButton bHeadPartOfRadioButton;
    private JRadioButton cPassedThroughTheRadioButton;
    private JRadioButton dWashedBackThroughRadioButton;
    private JRadioButton ePaddlersDidnTRadioButton;
    private JRadioButton fIntentionallyMovedGateRadioButton;
    private JRadioButton gUpsideDownInRadioButton;

    {
        // GUI initializer generated by IntelliJ IDEA GUI Designer
        // >>> IMPORTANT!! <<<
        // DO NOT EDIT OR ADD ANY CODE HERE!
        $$$setupUI$$$();
    }

    /**
     * Method generated by IntelliJ IDEA GUI Designer
     * >>> IMPORTANT!! <<<
     * DO NOT edit this method OR call it in your code!
     *
     * @noinspection ALL
     */
    private void $$$setupUI$$$() {
        panel1 = new JPanel();
        panel1.setLayout(new CardLayout(0, 0));
        final JPanel panel2 = new JPanel();
        panel2.setLayout(new FormLayout("fill:d:grow",
                "center:d:grow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:d:grow"));
        panel1.add(panel2, "Card1");
        final JPanel panel3 = new JPanel();
        panel3.setLayout(new FormLayout("fill:d:grow", "center:d:grow,top:3dlu:noGrow,center:max(d;4px):noGrow"));
        CellConstraints cc = new CellConstraints();
        panel2.add(panel3, cc.xy(1, 15));
        final JLabel label1 = new JLabel();
        label1.setIcon(new ImageIcon(getClass().getResource("/com/tcay/slalom/images/ICFPenaltyDiagram.png")));
        label1.setText("Label");
        panel3.add(label1, cc.xy(1, 3, CellConstraints.CENTER, CellConstraints.DEFAULT));
        final JPanel panel4 = new JPanel();
        panel4.setLayout(new FormLayout("fill:d:grow", "center:d:grow,top:3dlu:noGrow,center:max(d;4px):noGrow"));
        panel2.add(panel4, cc.xy(1, 1));
        aMissedGateInRadioButton = new JRadioButton();
        aMissedGateInRadioButton.setText("(A) Missed gate in sequential order");
        panel4.add(aMissedGateInRadioButton, cc.xy(1, 3));
        bHeadPartOfRadioButton = new JRadioButton();
        bHeadPartOfRadioButton.setIcon(new ImageIcon(
                getClass().getResource("/com/tcay/slalom/images/ICFPenaltyHeadAndBoatNotInGateTogether.png")));
        bHeadPartOfRadioButton.setSelected(false);
        bHeadPartOfRadioButton.setText("(B) Head  part of boat NOT in the gate together");
        bHeadPartOfRadioButton.setMnemonic(' ');
        bHeadPartOfRadioButton.setDisplayedMnemonicIndex(9);
        panel2.add(bHeadPartOfRadioButton, cc.xy(1, 3));
        cPassedThroughTheRadioButton = new JRadioButton();
        cPassedThroughTheRadioButton.setIcon(
                new ImageIcon(getClass().getResource("/com/tcay/slalom/images/ICFPenaltyWrongDirection.png")));
        cPassedThroughTheRadioButton.setText("(C) Passed through the gate in wrong direction");
        panel2.add(cPassedThroughTheRadioButton, cc.xy(1, 5));
        dWashedBackThroughRadioButton = new JRadioButton();
        dWashedBackThroughRadioButton.setIcon(new ImageIcon(
                getClass().getResource("/com/tcay/slalom/images/ICFPenaltyWashedBackThroughGateLine.png")));
        dWashedBackThroughRadioButton.setText("(D) Washed back through gate line");
        panel2.add(dWashedBackThroughRadioButton, cc.xy(1, 7));
        ePaddlersDidnTRadioButton = new JRadioButton();
        ePaddlersDidnTRadioButton.setIcon(new ImageIcon(
                getClass().getResource("/com/tcay/slalom/images/ICFPenaltyDidntGoThroughas1Unit.png")));
        ePaddlersDidnTRadioButton.setText("(E) Paddlers didn't go through as one unit");
        panel2.add(ePaddlersDidnTRadioButton, cc.xy(1, 9));
        fIntentionallyMovedGateRadioButton = new JRadioButton();
        fIntentionallyMovedGateRadioButton.setIcon(new ImageIcon(
                getClass().getResource("/com/tcay/slalom/images/ICFPenaltyIntentionallyMovedGate.png")));
        fIntentionallyMovedGateRadioButton.setText("(F) Intentionally moved gate");
        panel2.add(fIntentionallyMovedGateRadioButton, cc.xy(1, 11));
        gUpsideDownInRadioButton = new JRadioButton();
        gUpsideDownInRadioButton
                .setIcon(new ImageIcon(getClass().getResource("/com/tcay/slalom/images/ICFPenaltyUpsideDown.png")));
        gUpsideDownInRadioButton.setText("(G) Upside down in gate");
        panel2.add(gUpsideDownInRadioButton, cc.xy(1, 13));
    }

    /**
     * @noinspection ALL
     */
    public JComponent $$$getRootComponent$$$() {
        return panel1;
    }
}